How do I create an AG2/autogen agent for a third-party integration?
I maintain a third-party library and want to expose it as an AG2 (formerly AutoGen) agent without AG2 maintaining the integration. This issue requested an agent library/framework for exactly that, citing LlamaIndex and FalkorDB. Is there now a supported way to do this, and where is it?
Originally asked on GitHub: https://github.com/ag2ai/ag2/issues/67
1 answer
This is now implemented in the beta package. The maintainer closed the issue (2026-04-25) pointing to
autogen.beta: it provides aPluginclass inautogen/beta/agent.py. Third parties can bundle tools, middleware, observers, and prompts into a self-contained plugin that attaches to anyAgent. There is also aToolprotocol that gives external developers a clean interface for custom integrations, so AG2 does not need to maintain the integration itself.To use it, build your integration as a
Pluginagainstautogen.betaand attach it to anAgent, or implement theToolprotocol for a tool-like integration. The thread does not include a code sample or exact installation command, so check theautogen.betamodule for the current API. If the plugin/tool interface does not cover your use case, the maintainer asks you to open a targeted issue againstautogen.beta.Did this work for you?
Related questions
- AG2 0.5 upgrade breaks `from autogen import ...` — how to fix?
- How to use context variables in AG2 OnCondition handoff strings?
- AG2 + Gemini function calling: 400 "function response turn must come immediately after a function call turn"
- ag2 LLMConfig.where(tags='tool') fails when tags is a list in OAI_CONFIG_LIST
- How to get structured outputs from Bedrock in ag2 when response_format is ignored?