{"id":27316916,"url":"https://github.com/ruska-ai/a2a-langgraph","last_synced_at":"2026-04-04T22:31:48.935Z","repository":{"id":287500364,"uuid":"964936105","full_name":"enso-labs/a2a-langgraph","owner":"enso-labs","description":"🤖💬🤖 Agent-to-Agent (A2A Protocol) built on top of LangGraph ","archived":false,"fork":false,"pushed_at":"2025-04-12T05:02:06.000Z","size":184,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-04-12T08:43:30.996Z","etag":null,"topics":["a2a","agentic-ai","agents","ai","anthropic","claude","google","jsonrpc","langchain","langgraph","mcp","openai","protocol","python","uvicorn","vertex"],"latest_commit_sha":null,"homepage":"https://a2a.enso.sh","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/enso-labs.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-04-12T04:09:24.000Z","updated_at":"2025-04-12T05:02:10.000Z","dependencies_parsed_at":"2025-04-12T05:38:09.184Z","dependency_job_id":null,"html_url":"https://github.com/enso-labs/a2a-langgraph","commit_stats":null,"previous_names":["enso-labs/a2a-langgraph"],"tags_count":0,"template":true,"template_full_name":null,"purl":"pkg:github/enso-labs/a2a-langgraph","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/enso-labs%2Fa2a-langgraph","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/enso-labs%2Fa2a-langgraph/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/enso-labs%2Fa2a-langgraph/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/enso-labs%2Fa2a-langgraph/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/enso-labs","download_url":"https://codeload.github.com/enso-labs/a2a-langgraph/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/enso-labs%2Fa2a-langgraph/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":268016311,"owners_count":24181651,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-07-31T02:00:08.723Z","response_time":66,"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":["a2a","agentic-ai","agents","ai","anthropic","claude","google","jsonrpc","langchain","langgraph","mcp","openai","protocol","python","uvicorn","vertex"],"created_at":"2025-04-12T08:38:59.375Z","updated_at":"2025-12-30T21:53:55.119Z","avatar_url":"https://github.com/enso-labs.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 🤖 A2A Protocol 💬 from Enso Labs 🤖\n\nThis sample demonstrates a currency conversion agent built with [LangGraph](https://langchain-ai.github.io/langgraph/) and exposed through the A2A protocol. It showcases conversational interactions with support for multi-turn dialogue and streaming responses. For more information checkout the OFFICIAL repo at https://github.com/google/A2A/tree/main\n\n## Docker Deploy\n\n```bash\n# Pull Image\ndocker pull ghcr.io/enso-labs/a2a-langgraph\n\n# Run Image\ndocker run -p 10000:10000 --name a2a \\\n-e GOOGLE_API_KEY=$GOOGLE_API_KEY \\\nghcr.io/enso-labs/a2a-langgraph\n\n# Check Logs\ndocker logs -f a2a\n```\n\n## Prerequisites\n\n- Python 3.13 or higher\n- UV\n- Access to an LLM and API Key\n\n## Setup \u0026 Running\n\n1. Navigate to the samples directory:\n\n   ```bash\n   cd samples/python/agents/langgraph\n   ```\n\n2. Create an environment file with your API key:\n\n   ```bash\n   echo \"GOOGLE_API_KEY=your_api_key_here\" \u003e .env\n   ```\n\n3. Run the agent:\n\n   ```bash\n   # Basic run on default port 10000\n   uv run .\n\n   # On custom host/port\n   uv run . --host 0.0.0.0 --port 8080\n   ```\n\n4. In a separate terminal, run an A2A [client](/samples/python/hosts/README.md):\n\n   ```bash\n   uv run hosts/cli\n   ```\n\n## Technical Implementation\n\n- **LangGraph ReAct Agent**: Uses the ReAct pattern for reasoning and tool usage\n- **Streaming Support**: Provides incremental updates during processing\n- **Checkpoint Memory**: Maintains conversation state between turns\n- **Push Notification System**: Webhook-based updates with JWK authentication\n- **A2A Protocol Integration**: Full compliance with A2A specifications\n\n## Limitations\n\n- Only supports text-based input/output (no multi-modal support)\n- Uses Frankfurter API which has limited currency options\n- Memory is session-based and not persisted between server restarts\n\n## Examples\n\n**Synchronous request**\n\nRequest:\n\n```\nPOST http://localhost:10000\nContent-Type: application/json\n\n{\n  \"jsonrpc\": \"2.0\",\n  \"id\": 11,\n  \"method\": \"tasks/send\",\n  \"params\": {\n    \"id\": \"129\",\n    \"sessionId\": \"8f01f3d172cd4396a0e535ae8aec6687\",\n    \"acceptedOutputModes\": [\n      \"text\"\n    ],\n    \"message\": {\n      \"role\": \"user\",\n      \"parts\": [\n        {\n          \"type\": \"text\",\n          \"text\": \"How much is the exchange rate for 1 USD to INR?\"\n        }\n      ]\n    }\n  }\n}\n```\n\nResponse:\n\n```\n{\n  \"jsonrpc\": \"2.0\",\n  \"id\": 11,\n  \"result\": {\n    \"id\": \"129\",\n    \"status\": {\n      \"state\": \"completed\",\n      \"timestamp\": \"2025-04-02T16:53:29.301828\"\n    },\n    \"artifacts\": [\n      {\n        \"parts\": [\n          {\n            \"type\": \"text\",\n            \"text\": \"The exchange rate for 1 USD to INR is 85.49.\"\n          }\n        ],\n        \"index\": 0\n      }\n    ],\n    \"history\": []\n  }\n}\n```\n\n**Multi-turn example**\n\nRequest - Seq 1:\n\n```\nPOST http://localhost:10000\nContent-Type: application/json\n\n{\n  \"jsonrpc\": \"2.0\",\n  \"id\": 10,\n  \"method\": \"tasks/send\",\n  \"params\": {\n    \"id\": \"130\",\n    \"sessionId\": \"a9bb617f2cd94bd585da0f88ce2ddba2\",\n    \"acceptedOutputModes\": [\n      \"text\"\n    ],\n    \"message\": {\n      \"role\": \"user\",\n      \"parts\": [\n        {\n          \"type\": \"text\",\n          \"text\": \"How much is the exchange rate for 1 USD?\"\n        }\n      ]\n    }\n  }\n}\n```\n\nResponse - Seq 2:\n\n```\n{\n  \"jsonrpc\": \"2.0\",\n  \"id\": 10,\n  \"result\": {\n    \"id\": \"130\",\n    \"status\": {\n      \"state\": \"input-required\",\n      \"message\": {\n        \"role\": \"agent\",\n        \"parts\": [\n          {\n            \"type\": \"text\",\n            \"text\": \"Which currency do you want to convert to? Also, do you want the latest exchange rate or a specific date?\"\n          }\n        ]\n      },\n      \"timestamp\": \"2025-04-02T16:57:02.336787\"\n    },\n    \"history\": []\n  }\n}\n```\n\nRequest - Seq 3:\n\n```\nPOST http://localhost:10000\nContent-Type: application/json\n\n{\n  \"jsonrpc\": \"2.0\",\n  \"id\": 10,\n  \"method\": \"tasks/send\",\n  \"params\": {\n    \"id\": \"130\",\n    \"sessionId\": \"a9bb617f2cd94bd585da0f88ce2ddba2\",\n    \"acceptedOutputModes\": [\n      \"text\"\n    ],\n    \"message\": {\n      \"role\": \"user\",\n      \"parts\": [\n        {\n          \"type\": \"text\",\n          \"text\": \"CAD\"\n        }\n      ]\n    }\n  }\n}\n```\n\nResponse - Seq 4:\n\n```\n{\n  \"jsonrpc\": \"2.0\",\n  \"id\": 10,\n  \"result\": {\n    \"id\": \"130\",\n    \"status\": {\n      \"state\": \"completed\",\n      \"timestamp\": \"2025-04-02T16:57:40.033328\"\n    },\n    \"artifacts\": [\n      {\n        \"parts\": [\n          {\n            \"type\": \"text\",\n            \"text\": \"The current exchange rate is 1 USD = 1.4328 CAD.\"\n          }\n        ],\n        \"index\": 0\n      }\n    ],\n    \"history\": []\n  }\n}\n```\n\n**Streaming example**\n\nRequest:\n\n```\n{\n  \"jsonrpc\": \"2.0\",\n  \"id\": 12,\n  \"method\": \"tasks/sendSubscribe\",\n  \"params\": {\n    \"id\": \"131\",\n    \"sessionId\": \"cebd704d0ddd4e8aa646aeb123d60614\",\n    \"acceptedOutputModes\": [\n      \"text\"\n    ],\n    \"message\": {\n      \"role\": \"user\",\n      \"parts\": [\n        {\n          \"type\": \"text\",\n          \"text\": \"How much is 100 USD in GBP?\"\n        }\n      ]\n    }\n  }\n}\n```\n\nResponse:\n\n```\ndata: {\"jsonrpc\":\"2.0\",\"id\":12,\"result\":{\"id\":\"131\",\"status\":{\"state\":\"working\",\"message\":{\"role\":\"agent\",\"parts\":[{\"type\":\"text\",\"text\":\"Looking up the exchange rates...\"}]},\"timestamp\":\"2025-04-02T16:59:34.578939\"},\"final\":false}}\n\ndata: {\"jsonrpc\":\"2.0\",\"id\":12,\"result\":{\"id\":\"131\",\"status\":{\"state\":\"working\",\"message\":{\"role\":\"agent\",\"parts\":[{\"type\":\"text\",\"text\":\"Processing the exchange rates..\"}]},\"timestamp\":\"2025-04-02T16:59:34.737052\"},\"final\":false}}\n\ndata: {\"jsonrpc\":\"2.0\",\"id\":12,\"result\":{\"id\":\"131\",\"artifact\":{\"parts\":[{\"type\":\"text\",\"text\":\"Based on the current exchange rate, 1 USD is equivalent to 0.77252 GBP. Therefore, 100 USD would be approximately 77.252 GBP.\"}],\"index\":0,\"append\":false}}}\n\ndata: {\"jsonrpc\":\"2.0\",\"id\":12,\"result\":{\"id\":\"131\",\"status\":{\"state\":\"completed\",\"timestamp\":\"2025-04-02T16:59:35.331844\"},\"final\":true}}\n```\n\n## Learn More\n\n- [A2A Protocol Documentation](https://google.github.io/A2A/#/documentation)\n- [LangGraph Documentation](https://langchain-ai.github.io/langgraph/)\n- [Frankfurter API](https://www.frankfurter.app/docs/)\n- [Google Gemini API](https://ai.google.dev/gemini-api)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fruska-ai%2Fa2a-langgraph","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fruska-ai%2Fa2a-langgraph","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fruska-ai%2Fa2a-langgraph/lists"}