UNPKG

@a2alite/sdk

Version:

A Modular SDK (Server & Client) for Agent to Agent (A2A) protocol, with easy task lifecycle management

20 lines (19 loc) 842 B
import { Hono } from "hono"; import { A2AServer } from "../../server/server.ts"; /** * Creates a Hono HTTP application configured for A2A protocol communication * * This function sets up the necessary HTTP endpoints for the A2A protocol: * - POST /a2a - Main JSON-RPC endpoint for agent communication * - GET /.well-known/agent.json - Agent discovery endpoint * * The application handles both synchronous and streaming responses using Server-Sent Events. * * @param params - Configuration object * @param params.a2aServer - The A2A server instance to handle requests * @returns Promise resolving to a configured Hono application instance */ declare function createHonoApp({ a2aServer }: { a2aServer: A2AServer; }): Promise<Hono<import("hono/types").BlankEnv, import("hono/types").BlankSchema, "/">>; export { createHonoApp };