Skip to content

Releases: irfanalidv/AgentEnsemble

v0.3.0 — First Public Release

03 Apr 06:07

Choose a tag to compare

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 loops
  • StateGraphAgent — custom node-based workflows
  • RAGAgent — document Q&A with fallback strategies
  • HybridAgent — LLM routes SEARCH → RAG → VALIDATE → ANSWER automatically
  • RouterAgent — LLM picks the best agent for the task
  • PlannerAgent — decomposes complex tasks into subtasks
  • StructuredAgent — Pydantic-validated structured outputs

5 Orchestration Patterns

  • SwarmOrchestrator — parallel agents via asyncio.gather
  • PipelineOrchestrator — sequential agent workflow
  • DebateOrchestrator — solvers propose → feedback rounds → aggregator votes
  • Supervisor — central coordinator with optional LLM-based routing
  • WorkflowGraph — composable DAG with nodes and edges

Tools

  • @function_tool — decorate any function, schema auto-generated
  • SearchTool — Serper or DuckDuckGo
  • RAGTool — index URLs, ask questions
  • ValidationTool, ToolRegistry

Production Runtime

  • Runner.run() / Runner.arun() — sync and async execution
  • RunConfig — retries, hooks, session, tracing
  • TraceHooks — full observability: run/LLM/tool events, token usage, cost estimation
  • InMemorySession / SQLiteSession — multi-turn context memory
  • interrupt_before_tools — pause before sensitive tools, resume with human approval

⚡ Quick Start

pip install agentensemble==0.3.0
# or simply
pip install agentensemble
from 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