diff --git a/a2as.yaml b/a2as.yaml new file mode 100644 index 0000000..c95b4f9 --- /dev/null +++ b/a2as.yaml @@ -0,0 +1,385 @@ +manifest: + version: "0.1.2" + schema: https://a2as.org/cert/schema + subject: + name: gbaeke/multi_agent_aca + source: https://github.com/gbaeke/multi_agent_aca + branch: main + commit: "ca20cd91" + scope: [a2a_simple/agent_executor.py, a2a_task/agent.py, a2a_task/agent_executor.py, conversation/cli_sk.py, conversation/main.py, + mcp/main.py, rag/agent_executor.py, rag/main.py, web/agent_executor.py, web/agent_factory.py, web/tools.py] + issued: + by: A2AS.org + at: '2026-01-26T16:10:47Z' + signatures: + digest: sha256:xjiludq9XSYcHlBMm9XIAkdHpnyqiQ9W9kgmx67j6NM + key: ed25519:3n_s4wV8l25q56khccXXk2MaAm_yYvnQcISeDE-k2fc + sig: ed25519:Fja3Jw_QRrDHJTR9matHHm_ggoNbl_Qo0sNoA_ufsPbyT9TI5hvs4SvN7JLACeFUiAeqFwxlokPTWoFAe3FPCw + +agents: + agent: + type: instance + models: [model] + params: + class: StreamingAgent + name: name + hooks: self.streaming_hooks + instructions: [instructions] + agent.create_agent_from_config: + type: factory + models: [model] + tools: [tool_list] + params: + function: create_agent_from_config + name: name + hooks: MyAgentHooks() + handoffs: [agent_handoffs] + instructions: [instructions] + +models: + model: + type: variable + agents: [agent.create_agent_from_config, agent] + +tools: + get_current_date: + type: decorator + params: + description: Get the current date. + tool_list: + type: variable + agents: [agent.create_agent_from_config] + params: + dynamic: "True" + +teams: + agent.create_agent_from_config: + type: handoff + agents: [agent.create_agent_from_config] + +imports: + A2ACardResolver: a2a.client.A2ACardResolver + A2AClient: a2a.client.A2AClient + A2AStarletteApplication: a2a.server.apps.A2AStarletteApplication + Agent: agents.Agent + AgentCapabilities: a2a.types.AgentCapabilities + AgentCard: a2a.types.AgentCard + AgentExecutor: a2a.server.agent_execution.AgentExecutor + AgentHooks: agents.AgentHooks + AgentSkill: a2a.types.AgentSkill + AIProjectClient: azure.ai.projects.AIProjectClient + all_tools: tools.all_tools + Any: typing.Any + AsyncGenerator: typing.AsyncGenerator + asyncio: asyncio + atexit: atexit + CalculatorAgentExecutor: agent_executor.CalculatorAgentExecutor + ChatCompletionAgent: semantic_kernel.agents.ChatCompletionAgent + ChatHistoryAgentThread: semantic_kernel.agents.ChatHistoryAgentThread + cl: chainlit + Client: fastmcp.Client + Coroutine: typing.Coroutine + create_agent_from_config: agent_factory.create_agent_from_config + dataclass: dataclasses.dataclass + datetime: datetime.datetime + DefaultAzureCredential: azure.identity.DefaultAzureCredential + DefaultRequestHandler: a2a.server.request_handlers.DefaultRequestHandler + Dict: typing.Dict + Enum: enum.Enum + EventQueue: a2a.server.events.event_queue.EventQueue + FastMCP: fastmcp.FastMCP + function_tool: agents.function_tool + httpx: httpx + InMemoryTaskStore: a2a.server.tasks.InMemoryTaskStore + InternalError: a2a.types.InternalError + json: json + jsonschema: jsonschema + Kernel: semantic_kernel.Kernel + kernel_function: semantic_kernel.functions.kernel_function + KernelArguments: semantic_kernel.functions.kernel_arguments.KernelArguments + List: typing.List + ListSortOrder: azure.ai.agents.models.ListSortOrder + load_dotenv: dotenv.load_dotenv + logging: logging + ManagedIdentityCredential: azure.identity.ManagedIdentityCredential + MCPStreamableHttpPlugin: semantic_kernel.connectors.mcp.MCPStreamableHttpPlugin + Message: a2a.types.Message + MessageSendParams: a2a.types.MessageSendParams + new_agent_text_message: a2a.utils.new_agent_text_message + new_task: a2a.utils.new_task + OpenAIChatCompletion: semantic_kernel.connectors.ai.open_ai.OpenAIChatCompletion + os: os + Part: a2a.types.Part + Path: pathlib.Path + RagAgentExecutor: agent_executor.RagAgentExecutor + redis: redis + RequestContext: a2a.server.agent_execution.context.RequestContext + Role: a2a.types.Role + RunContextWrapper: agents.RunContextWrapper + Runner: agents.Runner + SendMessageRequest: a2a.types.SendMessageRequest + ServerError: a2a.utils.errors.ServerError + signal: signal + StreamEventType: agent.StreamEventType + StreamingAgent: agent.StreamingAgent + sys: sys + TaskState: a2a.types.TaskState + TaskUpdater: a2a.server.tasks.TaskUpdater + TextPart: a2a.types.TextPart + time: time + TimePlugin: semantic_kernel.core_plugins.time_plugin.TimePlugin + Union: typing.Union + urlparse: urllib.parse.urlparse + uuid: uuid + uvicorn: uvicorn + WebAgentExecutor: agent_executor.WebAgentExecutor + WebSearchTool: agents.WebSearchTool + +functions: + __init__: + type: sync + module: web.agent_executor + args: [self] + _emit_event: + type: async + module: a2a_task.agent + args: [self, event_type, data] + _get_config_from_file: + type: sync + module: web.agent_factory + args: [agent_name] + params: + returns: dict + _get_config_from_redis: + type: sync + module: web.agent_factory + args: [agent_name] + params: + returns: dict + _load_agent_schema: + type: sync + module: web.agent_factory + params: + returns: dict + _send_a2a_message: + type: async + module: mcp.main + args: [query, base_url] + params: + returns: str + _validate_agent_config: + type: sync + module: web.agent_factory + args: [config, agent_name] + params: + returns: dict + cancel: + type: async + module: web.agent_executor + args: [self, context, event_queue] + cleanup_handler: + type: sync + module: conversation.main + cleanup_http_client: + type: async + module: mcp.main + cleanup_mcp_client: + type: async + module: conversation.main + cleanup_on_shutdown: + type: async + module: mcp.main + create_agent_from_config: + type: sync + module: web.agent_factory + args: [agent_name, agents_as_tools, agent_handoffs] + params: + returns: Agent + execute: + type: async + module: web.agent_executor + args: [self, context, event_queue] + get_agent_config: + type: sync + module: web.agent_factory + args: [agent_name] + params: + returns: dict + get_current_date: + type: tool + module: web.tools + params: + returns: str + get_http_client: + type: async + module: mcp.main + get_mcp_client: + type: async + module: conversation.main + invoke: + type: async + module: web.agent_executor + args: [self, question] + params: + returns: str + invoke_stream: + type: async + module: a2a_task.agent + args: [self, query] + params: + returns: AsyncGenerator + main: + type: sync + module: web.main + on_chat_end: + type: async + module: conversation.main + on_chat_start: + type: async + module: conversation.main + on_end: + type: sync + module: web.agent_factory + args: [self, context, agent, result] + on_message: + type: async + module: conversation.main + args: [message] + on_start: + type: sync + module: web.agent_factory + args: [self, context, agent] + on_tool_end: + type: sync + module: web.agent_factory + args: [self, context, agent, tool, result] + on_tool_start: + type: sync + module: web.agent_factory + args: [self, context, agent, tool] + rag_search: + type: async + module: conversation.main + args: [self, query] + params: + returns: str + rag_tool: + type: async + module: mcp.main + args: [question] + params: + returns: str + signal_handler: + type: sync + module: mcp.main + args: [signum, frame] + web_search: + type: async + module: conversation.main + args: [self, query] + params: + returns: str + web_tool: + type: async + module: mcp.main + args: [query] + params: + returns: str + +variables: + AGENT_INSTRUCTIONS: + type: env + params: + caller: [os.getenv] + path: [conversation.main] + AGENT_NAME: + type: env + params: + caller: [os.getenv] + path: [conversation.main] + ASSISTANT_ID: + type: env + params: + caller: [os.getenv] + path: [rag.agent_executor] + CLIENT_ID: + type: env + params: + caller: [os.getenv] + path: [rag.agent_executor] + FOUNDRY_PROJECT: + type: env + params: + caller: [os.getenv] + path: [rag.agent_executor] + INTERNAL_PORT: + type: env + params: + caller: [os.getenv] + path: [rag.main, web.main] + LOG_LEVEL: + type: env + params: + caller: [os.getenv] + path: [conversation.main] + MCP_PORT: + type: env + params: + caller: [os.getenv] + path: [mcp.main] + MCP_SERVER_URL: + type: env + params: + caller: [os.getenv] + path: [conversation.main] + OPENAI_API_KEY: + type: env + params: + caller: [os.environ.get] + path: [a2a_task.agent, web.agent_executor] + RAG_A2A_BASE_URL: + type: env + params: + caller: [os.getenv] + path: [rag.main, mcp.main] + USE_REDIS: + type: env + params: + caller: [os.getenv] + path: [web.agent_factory] + WEB_A2A_BASE_URL: + type: env + params: + caller: [os.getenv] + path: [mcp.main, web.main] + +files: + agent_config_schema.json: + type: literal + actions: [read] + params: + caller: [_load_agent_schema] + path: [Path.parent] + config_file: + type: variable + actions: [read] + params: + caller: [open, json.load] + alias: [f] + schema_file: + type: variable + actions: [read] + params: + caller: [open, json.load] + alias: [f] + +networks: + localhost: + type: api + actions: [GET] + urls: [/, /mcp] + protocols: [http] + ports: ["9997", "9996", "8080"] + params: + caller: [main] + links: [url]