Releases: irfanalidv/AgentEnsemble
Releases · irfanalidv/AgentEnsemble
v0.3.0 — First Public Release
AgentEnsemble v0.3.0 — First Public Release 🎉
Production-ready multi-agent orchestration for Python. Build ReAct agents,
Swarms, Pipelines, Debate systems, Routers, Planners, and WorkflowGraphs —
with built-in observability, cost tracking, session memory, and human-in-loop
support. Comparable to LangGraph, CrewAI, and AutoGen.
✨ What's included
7 Agent Types
ReActAgent— LLM-driven tool use with reasoning loopsStateGraphAgent— custom node-based workflowsRAGAgent— document Q&A with fallback strategiesHybridAgent— LLM routes SEARCH → RAG → VALIDATE → ANSWER automaticallyRouterAgent— LLM picks the best agent for the taskPlannerAgent— decomposes complex tasks into subtasksStructuredAgent— Pydantic-validated structured outputs
5 Orchestration Patterns
SwarmOrchestrator— parallel agents viaasyncio.gatherPipelineOrchestrator— sequential agent workflowDebateOrchestrator— solvers propose → feedback rounds → aggregator votesSupervisor— central coordinator with optional LLM-based routingWorkflowGraph— composable DAG with nodes and edges
Tools
@function_tool— decorate any function, schema auto-generatedSearchTool— Serper or DuckDuckGoRAGTool— index URLs, ask questionsValidationTool,ToolRegistry
Production Runtime
Runner.run()/Runner.arun()— sync and async executionRunConfig— retries, hooks, session, tracingTraceHooks— full observability: run/LLM/tool events, token usage, cost estimationInMemorySession/SQLiteSession— multi-turn context memoryinterrupt_before_tools— pause before sensitive tools, resume with human approval
⚡ Quick Start
pip install agentensemble==0.3.0
# or simply
pip install agentensemblefrom agentensemble import ReActAgent, SearchTool, Runner
agent = ReActAgent(name="research", tools=[SearchTool()], max_iterations=5)
result = Runner.run(agent, "What are the latest AI breakthroughs in 2024?")
print(result["result"])🔍 Observability out of the box
from agentensemble import ReActAgent, Runner, RunConfig, TraceHooks, SearchTool
agent = ReActAgent(name="research", tools=[SearchTool()], max_iterations=3)
config = RunConfig(trace_hooks=TraceHooks())
result = Runner.run(agent, "Who won the 2024 Nobel Prize in Physics?", config=config)
print(result["metadata"]["total_usage"]) # {'input_tokens': 1247, 'output_tokens': 89, ...}
print(result["metadata"]["cost_usd"]) # 0.00293🤝 Human-in-loop
config = RunConfig(interrupt_before_tools=["execute_payment"])
result = Runner.run(agent, "Pay $50 to Alice", config=config)
if result.get("__interrupted__"):
print("Paused for approval:", result["pending_tool"])
result = Runner.run(agent, "...", config=config,
resume=result["run_state"], resume_value="Approved")📊 How it compares
| Feature | AgentEnsemble | LangGraph | CrewAI | AutoGen |
|---|---|---|---|---|
| Async API | arun() everywhere |
Yes | Yes | Yes |
| Debate pattern | ✅ DebateOrchestrator | Manual | Yes | Yes |
| Graph workflows | ✅ WorkflowGraph + StateGraph | Native | No | No |
| Session memory | ✅ InMemory + SQLite | Checkpointer | No | No |
| Observability | ✅ TraceHooks, usage, cost | LangSmith | No | No |
| Human-in-loop | ✅ interrupt_before_tools | interrupt() | No | No |
🔗 Links
- PyPI: https://pypi.org/project/agentensemble/
- Showcase: examples/showcase_all.py
- Docs / Roadmap: docs/ROADMAP_2025.md
- Author: Irfan Ali — DataCortex IQ