$ show superagentxai/superagentx
SuperAgentX is a modular, open-source multi-agent AI framework designed for orchestrating autonomous agents that plan, act, and execute real-world workflows. It supports 100+ LLM providers (OpenAI, Azure, Gemini, Claude, Bedrock, Ollama, LiteLLM) and 10,000+ MCP tools via the Model Context Protocol. The architecture centers on `AgentXPipe` pipelines that sequence or parallelize agents, each composed of an `Engine` that wraps an LLM client and a set of tool handlers. Handlers are defined using a `@tool` decorator pattern that auto-generates LLM function schemas. The framework includes built-in human-in-the-loop approval channels (console, Slack, Teams), persistent memory with SQLite and vector stores (Chroma, OpenSearch), full observability via OpenTelemetry and SQL-based telemetry, and a CLI for project scaffolding. It also features a production-grade browser automation engine based on Playwright for tasks where APIs are unavailable.
The LLM identified 5 files worth highlighting for reuse:
Defines the abstract `HumanApprovalChannel` class with a single `request_approval` method. This is a clean strategy pattern for implementing human-in-the-loop approval across different communication channels (console, Slack, Teams). It is fully isolated (only imports from `abc` and `typing`) and can be extracted into any project needing a pluggable approval mechanism.
Provides the `BaseHandler` class and the `@tool` decorator. Handlers define async methods decorated with `@tool`, which automatically generate OpenAI-compatible function schemas from type hints and docstrings. This pattern is reusable for any LLM tool framework and demonstrates non-obvious skill in bridging Python methods to LLM function calling. Requires the companion `decorators.py` module for full extraction.
Implements the `Memory` abstraction that combines SQLite-based conversation history with vector store semantic search. It supports conversation IDs, context injection into prompts, and pluggable storage backends. The design is clean and modular, making it reusable for any conversational AI system needing both short-term history and long-term semantic retrieval. Requires the `config` and `LLMClient` modules for embedding generation.
Defines the abstract `VectorStore` interface with methods for adding, searching, and deleting vectors. It uses an `LLMClient` for embedding generation, allowing different vector databases (Chroma, OpenSearch) to be swapped without changing the embedding logic. This pattern is reusable for any RAG system and demonstrates clean separation of concerns.
Provides `pipe_trace`, `agent_span`, and `engine_telemetry` decorators that automatically create OpenTelemetry spans or SQL-based trace entries for pipeline execution. The decorators handle context propagation, error recording, and attribute injection. This pattern is reusable for any Python application needing structured observability with minimal code changes.