{"id":30821141,"url":"https://github.com/satendrakumar/multiple-agents-on-single-a2a-server","last_synced_at":"2026-06-19T01:31:23.459Z","repository":{"id":310068987,"uuid":"1038517301","full_name":"satendrakumar/multiple-agents-on-single-a2a-server","owner":"satendrakumar","description":"Run multiple agents on single A2A Server","archived":false,"fork":false,"pushed_at":"2025-08-20T11:27:46.000Z","size":117,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-09-06T10:45:42.388Z","etag":null,"topics":["agent2agent","agentic-ai","agents","google-adk","llm","python"],"latest_commit_sha":null,"homepage":"https://deeplearningdispatch.com/2025/08/16/running-multiple-a2a-agents-on-a-single-server/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/satendrakumar.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-08-15T10:52:37.000Z","updated_at":"2025-08-31T20:52:55.000Z","dependencies_parsed_at":"2025-08-16T11:42:36.141Z","dependency_job_id":null,"html_url":"https://github.com/satendrakumar/multiple-agents-on-single-a2a-server","commit_stats":null,"previous_names":["satendrakumar/a2a-multiple-agents-on-single-host","satendrakumar/multiple-agents-on-single-a2a-server"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/satendrakumar/multiple-agents-on-single-a2a-server","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/satendrakumar%2Fmultiple-agents-on-single-a2a-server","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/satendrakumar%2Fmultiple-agents-on-single-a2a-server/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/satendrakumar%2Fmultiple-agents-on-single-a2a-server/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/satendrakumar%2Fmultiple-agents-on-single-a2a-server/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/satendrakumar","download_url":"https://codeload.github.com/satendrakumar/multiple-agents-on-single-a2a-server/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/satendrakumar%2Fmultiple-agents-on-single-a2a-server/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34514282,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-18T02:00:06.871Z","response_time":128,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["agent2agent","agentic-ai","agents","google-adk","llm","python"],"created_at":"2025-09-06T10:45:39.711Z","updated_at":"2026-06-19T01:31:23.432Z","avatar_url":"https://github.com/satendrakumar.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# multiple-agents-on-single-a2a-server\n\nThis repository demonstrates how to run **multiple A2A agents** on the **same host** using the A2A protocol.\nEach agent is served at a **unique URL path**, making it possible to host different agents without requiring multiple servers or ports.\n\n---\n\n## 📌 Example Setup\n\nThree agents running on the same host:\n\n| Agent Name            | Agent card URL                                                                                                    |\n|-----------------------|-------------------------------------------------------------------------------------------------------------------|\n| Conversational Agent  | [http://localhost:8000/a2a/conversation/agent-card.json](http://localhost:8000/a2a/conversation/agent-card.json) |\n| Trending topics Agent | [http://localhost:8000/a2a/trending/agent-card.json](http://localhost:8000/a2a/trending/agent-card.json) |\n| Analyzer Agent        | [http://localhost:8000/a2a/analyzer/agent-card.json](http://localhost:8000/a2a/analyzer/agent-card.json) |\n\n\n---\n\n## 🚀 Running Agents Locally\n\n1.  Clone the repository\n    ```bash\n    git clone https://github.com/satendrakumar/multiple-agents-on-single-a2a-server.git\n    cd multiple-agents-on-single-a2a-server\n    ```\n\n2.  Install dependencies (using uv)\n    ```bash\n    uv sync\n    ```\n\n3.  Set environment variables\n    *   Copy `.env-sample` to `.env`\n        ```bash\n        cp .env-sample .env\n        ```\n    *   Update values as needed\n\n4.  Start the agents\n    ```bash\n    uv run main.py\n    ```\n\n---\n\n## 🧪 Testing Agents using A2AClient:\n\n  Run the provided client app to send test requests:\n\n  ```bash\n    uv run a2a_client_app.py\n  ```\n\n## Testing Agents Using CURL request:\n   ```bash\n   Request:\n   curl --location 'http://localhost:8000/a2a/conversation/' \\\n        --header 'Content-Type: application/json' \\\n        --header 'Accept: text/event-stream' \\\n        --data '{\n            \"id\": \"6a39c736-fff7-45f8-b2b0-c44e705d2474\",\n            \"jsonrpc\": \"2.0\",\n            \"method\": \"message/stream\",\n            \"params\": {\n                \"configuration\": {\n                    \"acceptedOutputModes\": [],\n                    \"blocking\": \"True\"\n                },\n                \"message\": {\n                    \"contextId\": \"8bffff7b-3abc-4d85-bcce-0bcdbe321017\",\n                    \"kind\": \"message\",\n                    \"messageId\": \"82642fd2-f270-4a56-a7d9-5d26fddabc95\",\n                    \"parts\": [\n                        {\n                            \"kind\": \"text\",\n                            \"text\": \"Who is PM of India?\"\n                        }\n                    ],\n                    \"role\": \"user\"\n                }\n            }\n        }'\n    Reponse:\n    {\n        \"id\": \"6a39c736-fff7-45f8-b2b0-c44e705d2474\",\n        \"jsonrpc\": \"2.0\",\n        \"result\": {\n            \"artifact\": {\n                \"artifactId\": \"9474e1ac-1e35-425c-9c18-238b07739e6d\",\n                \"parts\": [\n                    {\n                        \"kind\": \"text\",\n                        \"text\": \"As of today, August 16, 2025, the Prime Minister of India is **Narendra Modi**.\\n\\nHe has been serving as the Prime Minister since May 26, 2014, and was sworn in for his third consecutive term on June 9, 2024, following the 2024 Parliamentary elections.\"\n                    }\n                ]\n            },\n            \"contextId\": \"8bffff7b-3abc-4d85-bcce-0bcdbe321017\",\n            \"kind\": \"artifact-update\",\n            \"lastChunk\": true,\n            \"taskId\": \"23a93002-686b-4c8a-8bb6-ec649acea0c3\"\n        }\n    }\n\n\n# Rquest with File:\n    curl --location --request POST 'http://localhost:8000/a2a/conversation/' \\\n    --header 'Content-Type: application/json' \\\n    --header 'Accept: text/event-stream' \\\n    --data-raw '{\n        \"id\": \"6a39c736-fff7-45f8-b2b0-c44e705d2474\",\n        \"jsonrpc\": \"2.0\",\n        \"method\": \"message/stream\",\n        \"params\": {\n            \"configuration\": {\n                \"acceptedOutputModes\": [],\n                \"blocking\": \"True\"\n            },\n            \"message\": {\n                \"contextId\": \"8bffff7b-3abc-4d85-bcce-0bcdbe321017\",\n                \"kind\": \"message\",\n                \"messageId\": \"82642fd2-f270-4a56-a7d9-5d26fddabc95\",\n                \"parts\": [\n                    {\n                        \"kind\": \"file\",\n                        \"file\": {\n                            \"name\": \"Attention Is All You Need\",\n                            \"uri\": \"gs://data-repository/documents/Attention-Is-All-You-Need.pdf\",\n                            \"mime_type\": \"application/pdf\"\n                        }\n                    },\n                    {\n                        \"kind\": \"text\",\n                        \"text\": \"What is Self-Attention ?\"\n                    }\n                ],\n                \"role\": \"user\"\n            }\n        }\n    }'\n   ```\n\n\n---\n\n## How to run inside Docker:\n```bash\n# Docker build\ndocker build -t multiple-agents-on-single-a2a-server:v1.0.0 .\n# Docker run\ndocker run --env-file ./.env -e PORT=8000 -p 8000:8000  multiple-agents-on-single-a2a-server:v1.0.0\n```\n\n\n---\n\n## Notes\n\n- This setup demonstrates hosting multiple agents via unique URL paths behind a single application server.\n- If you run behind a reverse proxy, ensure the `/a2a/...` paths are forwarded to the app.\n- For local development, keep your working directory at the project root so relative imports and paths resolve correctly.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsatendrakumar%2Fmultiple-agents-on-single-a2a-server","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsatendrakumar%2Fmultiple-agents-on-single-a2a-server","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsatendrakumar%2Fmultiple-agents-on-single-a2a-server/lists"}