Agent Autogen¶
Agent AutoGen — mvp.agent_autogen
Cluster: Agents & LLM | Type: component | MCP Tools: 30
Overview¶
Production-hardened Microsoft AutoGen multi-agent conversation wrapper that orchestrates a RoundRobinGroupChat between configurable assistant agents via a LiteLLM-backed client. Adds lifecycle management, circuit breaker protection, retry policies, structured logging, and Prometheus-style metrics — falling back gracefully when autogen-agentchat is not installed.
Launch-readiness caveat
The component and MCP plugin paths have local regression coverage for input validation, clear failure reporting, persisted run failure status, plugin import/startup, and backward-compatible helper entry points. The current local validation result is 126 passed across tests/mvp/agent_autogen and tests/mvp/plugins/test_agent_autogen_mcp.py.
This does not by itself complete the launch-plan Phase 0 criterion. Before presenting agent_autogen as frictionless for non-technical first users, run a clean-machine Claude Code MCP install smoke test: install the plugin from scratch, confirm autogen_status works, create an agent/team, run a minimal run_task or exec_chat, and verify both success output and structured failure messages.
When to use:
- Simulating structured multi-agent debates or collaborative problem-solving with 2+ agents
- Running AutoGen-style round-robin conversations with budget-controlled turn limits
- Integrating AutoGen workflows into the G6 pipeline with circuit-breaker resilience
Example:
from mvp.agent_autogen import AgentAutogenBlock, AutogenInput, AutogenMessage
block = AgentAutogenBlock(name="autogen")
result = block.infer(AutogenInput(
messages=[AutogenMessage(role="user", content="Design a REST API for a bookstore.")],
n_agents=2,
max_turns=4,
model="gpt-4o-mini",
))
# result.ok → True; result.value → AutogenOutput with conversation, last_message
Works well with: agent_langchain, agent_openai, autonomous_orchestrator
Public API¶
AgentAutogenBlock(LifecycleMixin, AIBlock[AutogenInput, AutogenOutput, None])¶
Production-hardened AutoGen multi-agent conversation block.
| Field | Type | Default |
|---|---|---|
name | str | 'agent_autogen' |
resource_bounds | ResourceBounds \| None | None |
usage | ResourceUsage | field(default_factory=ResourceUsage) |
api_key | str | '' |
timeout | float | 30.0 |
retry_policy | RetryPolicy | field(default_factory=lambda: RetryPolicy(max_attempts=3, initial_delay=1.0, jitter=True, retryable_exceptions=(ConnectionError, TimeoutError, OSError))) |
Methods:
infer(data: AutogenInput) -> Result[AutogenOutput]¶
AutogenMessage(BaseModel)¶
| Field | Type | Default |
|---|---|---|
role | str | required |
content | str | required |
AutogenInput(BaseModel)¶
Input to AgentAutogenBlock.
| Field | Type | Default |
|---|---|---|
messages | list[AutogenMessage] | required |
system_prompt | str | '' |
n_agents | int | 2 |
max_turns | int | 5 |
model | str | 'gpt-4o-mini' |
api_key | str | '' |
allow_paid_api | bool | False |
AutogenOutput(BaseModel)¶
Output from AgentAutogenBlock.
| Field | Type | Default |
|---|---|---|
conversation | list[AutogenMessage] | required |
last_message | str | required |
n_turns | int | required |
n_agents | int | required |
model | str | '' |
degraded | bool | False |
degradation_reason | str | '' |
completion_state | str | 'qualified-draft' |
warning_card | dict | Field(default_factory=dict) |
evidence | dict | Field(default_factory=dict) |
request_id | str | '' |
task_id | str | '' |
AutogenMCPBlock(AIBlock[MCPAutogenInput, MCPAutogenOutput, dict])¶
Full-featured AutoGen block with SQLite persistence and Claude CLI backend.
| Field | Type | Default |
|---|---|---|
name | str | 'autogen_mcp' |
state | dict \| None | None |
resource_bounds | Any | None |
agentic_planner | 'AutogenPlanner \| None' | None |
Methods:
infer(data: MCPAutogenInput) -> Result[MCPAutogenOutput]¶
MCPAutogenInput(BaseModel)¶
| Field | Type | Default |
|---|---|---|
op | Literal['agent_create', 'agent_get', 'agent_update', 'agent_list', 'agent_delete', 'team_create', 'team_get', 'team_list', 'team_delete', 'run_task', 'run_get', 'run_list', 'exec_chat', 'exec_sequential', 'exec_group_chat', 'exec_debate', 'exec_reflection', 'exec_handoffs', 'exec_mixture', 'exec_code', 'session_continue', 'session_resume', 'search', 'autogen_info', 'autogen_status', 'clean_env_status', 'autogen_capabilities', 'source_capabilities', 'recommend_pattern', 'list_patterns'] | required |
agent_id | str | '' |
team_id | str | '' |
run_id | str | '' |
session_id | str | '' |
request_id | str | '' |
task_id | str | '' |
name | str | '' |
description | str | '' |
system_prompt | str | '' |
allowed_tools_csv | str | '' |
pattern | str | '' |
agent_ids_csv | str | '' |
pattern_config_json | str | '{}' |
task | str | '' |
message | str | '' |
prompt | str | '' |
agents_json | str | '[]' |
topic | str | '' |
proposer_prompt | str | '' |
critic_prompt | str | '' |
judge_prompt | str | '' |
max_turns | int | 5 |
rounds | int | 2 |
query | str | '' |
top_k | int | 5 |
limit | int | 50 |
agent_count | int | 0 |
task_style | str | '' |
MCPAutogenOutput(BaseModel)¶
| Field | Type | Default |
|---|---|---|
op | str | required |
ok | bool | True |
agent_id | str | '' |
team_id | str | '' |
run_id | str | '' |
session_id | str | '' |
agent | dict[str, Any] | Field(default_factory=dict) |
team | dict[str, Any] | Field(default_factory=dict) |
run | dict[str, Any] | Field(default_factory=dict) |
agents | list[dict[str, Any]] | Field(default_factory=list) |
teams | list[dict[str, Any]] | Field(default_factory=list) |
runs | list[dict[str, Any]] | Field(default_factory=list) |
messages | list[dict[str, Any]] | Field(default_factory=list) |
summary | str | '' |
conversation | list[dict[str, Any]] | Field(default_factory=list) |
last_message | str | '' |
n_turns | int | 0 |
records | list[dict[str, Any]] | Field(default_factory=list) |
count | int | 0 |
metadata | dict[str, Any] | Field(default_factory=dict) |
message | str | '' |
error | str | '' |
degraded | bool | False |
degradation_reason | str | '' |
completion_state | str | 'qualified-draft' |
warning_card | dict[str, Any] | Field(default_factory=dict) |
evidence | dict[str, Any] | Field(default_factory=dict) |
request_id | str | '' |
task_id | str | '' |
MCP Tools¶
| Operation | Source |
|---|---|
agent_create | autogen_mcp |
agent_get | autogen_mcp |
agent_update | autogen_mcp |
agent_list | autogen_mcp |
agent_delete | autogen_mcp |
team_create | autogen_mcp |
team_get | autogen_mcp |
team_list | autogen_mcp |
team_delete | autogen_mcp |
run_task | autogen_mcp |
run_get | autogen_mcp |
run_list | autogen_mcp |
exec_chat | autogen_mcp |
exec_sequential | autogen_mcp |
exec_group_chat | autogen_mcp |
exec_debate | autogen_mcp |
exec_reflection | autogen_mcp |
exec_handoffs | autogen_mcp |
exec_mixture | autogen_mcp |
exec_code | autogen_mcp |
session_continue | autogen_mcp |
session_resume | autogen_mcp |
search | autogen_mcp |
autogen_info | autogen_mcp |
autogen_status | autogen_mcp |
clean_env_status | autogen_mcp |
autogen_capabilities | autogen_mcp |
source_capabilities | autogen_mcp |
recommend_pattern | autogen_mcp |
list_patterns | autogen_mcp |