{"id":49685753,"url":"https://github.com/idea-idsia/ant-ai","last_synced_at":"2026-05-23T23:01:08.695Z","repository":{"id":353562149,"uuid":"1219140757","full_name":"idea-idsia/ant-ai","owner":"idea-idsia","description":"A lightweight Python framework for building multi-agent systems that communicate via A2A protocol","archived":false,"fork":false,"pushed_at":"2026-05-20T12:38:09.000Z","size":883,"stargazers_count":2,"open_issues_count":8,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-05-20T12:49:10.514Z","etag":null,"topics":["a2a-protocol","agent2agent","agents","ai","ai-agents","framework","multi-agent","open-source","python"],"latest_commit_sha":null,"homepage":"https://idea.idsia.ch/ant-ai/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/idea-idsia.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","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,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-04-23T15:12:25.000Z","updated_at":"2026-05-19T07:21:36.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/idea-idsia/ant-ai","commit_stats":null,"previous_names":["idea-idsia/ant-ai"],"tags_count":8,"template":false,"template_full_name":null,"purl":"pkg:github/idea-idsia/ant-ai","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/idea-idsia%2Fant-ai","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/idea-idsia%2Fant-ai/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/idea-idsia%2Fant-ai/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/idea-idsia%2Fant-ai/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/idea-idsia","download_url":"https://codeload.github.com/idea-idsia/ant-ai/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/idea-idsia%2Fant-ai/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33415020,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-23T22:14:44.296Z","status":"ssl_error","status_checked_at":"2026-05-23T22:14:43.778Z","response_time":53,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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-protocol","agent2agent","agents","ai","ai-agents","framework","multi-agent","open-source","python"],"created_at":"2026-05-07T10:00:25.114Z","updated_at":"2026-05-23T23:01:08.689Z","avatar_url":"https://github.com/idea-idsia.png","language":"Python","funding_links":[],"categories":["⚙️ Implementations \u0026 Libraries"],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n\n\u003cpicture\u003e\n  \u003csource media=\"(prefers-color-scheme: dark)\" srcset=\"https://raw.githubusercontent.com/idea-idsia/ant-ai/main/docs/assets/ant_h_white.png\"\u003e\n  \u003cimg alt=\"ANT AI\" src=\"https://raw.githubusercontent.com/idea-idsia/ant-ai/main/docs/assets/ant_h_dark.png\" height=\"100\"\u003e\n\u003c/picture\u003e\n\n![Python](https://img.shields.io/badge/Python-3.14%2B-3776AB?logo=python\u0026logoColor=white)\n![License](https://img.shields.io/badge/License-MIT-green)\n![PyPI - Version](https://img.shields.io/pypi/v/ant-ai?label=PyPI)\n[![Coverage](https://img.shields.io/codecov/c/github/idea-idsia/ant-ai?label=Coverage\u0026logo=codecov)](https://codecov.io/gh/idea-idsia/ant-ai)\n[![Docs](https://img.shields.io/badge/Docs-mkdocs-526cfe?logo=materialformkdocs\u0026logoColor=white)](https://idea-idsia.github.io/ant-ai/)\n\n**A lightweight Python framework for building tool-driven AI agents and multi-agent systems.**\n\n\u003c/div\u003e\n\n---\n\n`ant-ai` is a lightweight Python framework for building multi-agent systems: graph-based workflow orchestration, first-class agent-to-agent (A2A) communication via the [A2A protocol](https://github.com/a2aproject/A2A), MCP tool integration, lifecycle hooks for guardrails, and built-in observability — all on top of an LLM-agnostic core.\n\n## Why ANT AI\n\n**Multi-agent by design.** Agents communicate and delegate via the [A2A protocol](https://github.com/a2aproject/A2A) — no custom glue code required.\n\n**No lock-in.** Swap LLMs, tools, or observability backends without touching your agent logic.\n\n**Structured, not scripted.** Model complex behavior as graphs — know exactly what runs, when, and why.\n\n**Observable from day one.** Built-in tracing via [Langfuse](https://langfuse.com/) and lifecycle hooks for guardrails.\n\n## Installation\n\nRequires Python 3.14+. Install with [uv](https://docs.astral.sh/uv/):\n\n```sh\nuv add ant-ai\n```\n\nOr clone and sync for local development:\n\n```sh\ngit clone git@github.com:idea-idsia/ant-ai.git\ncd ant-ai\nuv sync --all-packages --all-groups --all-extras\n```\n\n## Quickstart\n\n### Single agent\n\n```python\nfrom ant_ai import Agent, Message, State, tool\nfrom ant_ai.llm.integrations import LiteLLMChat\n\n@tool\ndef get_weather(city: str) -\u003e str:\n    \"\"\"Return the current weather for a city.\"\"\"\n    return f\"Sunny, 22°C in {city}\"\n\nllm = LiteLLMChat(model=\"gpt-4o-mini\")\n\nagent = Agent(\n    name=\"WeatherAgent\",\n    system_prompt=\"You are a helpful weather assistant.\",\n    llm=llm,\n    tools=[get_weather],\n)\n\nstate = State(messages=[Message(role=\"user\", content=\"What's the weather in Lugano?\")])\nanswer = agent.invoke(state)\nprint(answer)\n```\n\n### Streaming events\n\n```python\nfrom ant_ai.core import FinalAnswerEvent\n\nasync for event in agent.stream(state):\n    if isinstance(event, FinalAnswerEvent):\n        print(event.content)\n```\n\n### Structured output\n\n```python\nfrom pydantic import BaseModel\n\nclass WeatherReport(BaseModel):\n    city: str\n    temperature: int\n    condition: str\n\nanswer = agent.invoke(state, response_schema=WeatherReport)\n# answer is a JSON string matching WeatherReport\n```\n\n## Development\n\n```sh\n# Install dev dependencies and pre-commit hooks\nuv sync --all-extras\nuv run pre-commit install\n\n# Run tests\nuv run pytest\n\n# Serve docs locally\nuv run mkdocs serve\n```\n\nSee [CONTRIBUTING.md](CONTRIBUTING.md) for the full contributing guide, branching model, and review process.\n\n## License\n\nThis software is licensed under the MIT license. See the [LICENSE](LICENSE) file for details.\n\n## Funding\n\nThis project is supported by the following grants.\n\n| Acknowledgement                                                                                                                                                                                                                                   |\n| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| Funded by the Swiss State Secretariat for Education, Research and Innovation (SERI), Project number 24.00596.                                                                                                                                     |\n| Funded by the European Union under Grant Agreement No. 101189745 (HIVEMIND).\u003cbr\u003e\u003cimg src=\"https://ec.europa.eu/regional_policy/images/information-sources/logo-download-center/eu_funded_en.jpg\" alt=\"Funded by the European Union\" height=\"40\"/\u003e |\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fidea-idsia%2Fant-ai","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fidea-idsia%2Fant-ai","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fidea-idsia%2Fant-ai/lists"}