AutoGen + Ertas
Build multi-agent systems with AutoGen using Ertas-trained models as specialized agent brains for collaborative problem-solving and complex task automation.
Overview
AutoGen is an open-source multi-agent framework developed by Microsoft Research that enables building applications where multiple AI agents collaborate through conversation to solve complex tasks. Instead of a single LLM handling everything, AutoGen orchestrates conversations between specialized agents — a planner agent decomposes tasks, a coder agent writes solutions, a critic agent reviews outputs, and a user proxy agent handles human-in-the-loop interactions. This division of labor mirrors how human teams work and produces significantly better results on complex, multi-step problems.
AutoGen's conversation-driven architecture supports both fully autonomous agent teams and human-supervised workflows where agents request approval before taking critical actions. The framework handles message routing, conversation state management, termination conditions, and error recovery automatically. Agents can use tools, execute code in sandboxed environments, and access external data sources. For enterprise teams building sophisticated AI workflows that go beyond single-prompt interactions, AutoGen provides the orchestration layer that coordinates multiple specialized models into coherent problem-solving pipelines.
How Ertas Integrates
Ertas-trained models integrate with AutoGen by configuring each agent with a different fine-tuned model optimized for its specific role. After training multiple specialist models in Ertas Studio — one for planning, one for domain analysis, one for code generation, one for quality review — you assign each model to the corresponding AutoGen agent. This creates a multi-agent system where every agent is an expert in its specific function, rather than relying on a single general-purpose model for all roles.
The impact on agent system performance is dramatic. A generic model acting as a code review agent might miss domain-specific anti-patterns, but a model fine-tuned on your codebase's review history catches exactly the patterns your team cares about. A planning agent trained on your organization's task decomposition patterns generates better work breakdown structures than a general model guessing at your workflow. Ertas makes it practical to train these specialist models because LoRA adapters are small and training is efficient — you can maintain a library of role-specific adapters sharing the same base model, deployed to the same inference server with Ollama or vLLM.
Getting Started
- 1
Identify agent roles and fine-tune specialist models
Map out your multi-agent workflow and identify the specialist roles. Fine-tune a separate model in Ertas Studio for each role using role-specific training data.
- 2
Deploy models to inference endpoints
Serve each fine-tuned model via Ollama (which supports multiple models simultaneously) or deploy separate vLLM instances for higher throughput.
- 3
Configure AutoGen agents with model assignments
Create AutoGen agents and assign each one its dedicated Ertas-trained model via the OpenAI-compatible API configuration.
- 4
Define conversation flows and termination conditions
Set up the multi-agent conversation topology — which agents talk to each other, how tasks are delegated, and when the conversation terminates.
- 5
Run and optimize the agent team
Execute multi-agent workflows and analyze conversation logs. Identify which agents need better training data and retrain in Ertas Studio for continuous improvement.
from autogen import AssistantAgent, UserProxyAgent
# Configure different Ertas-trained models for each agent role
planner_config = {
"config_list": [{
"model": "ertas-planner-7b",
"base_url": "http://localhost:11434/v1",
"api_key": "not-needed",
}]
}
analyst_config = {
"config_list": [{
"model": "ertas-legal-analyst-7b",
"base_url": "http://localhost:11434/v1",
"api_key": "not-needed",
}]
}
# Create specialized agents
planner = AssistantAgent(
name="Planner",
system_message="Break down complex legal research tasks into steps.",
llm_config=planner_config,
)
analyst = AssistantAgent(
name="LegalAnalyst",
system_message="Analyze legal documents and extract key findings.",
llm_config=analyst_config,
)
user_proxy = UserProxyAgent(name="User", human_input_mode="TERMINATE")
# Start a multi-agent conversation
user_proxy.initiate_chat(
planner,
message="Analyze the merger agreement for antitrust risks.",
)Benefits
- Assign specialized fine-tuned models to each agent role for maximum expertise
- Multi-agent collaboration produces better results than single-model approaches
- LoRA adapters keep multiple specialist models efficient on shared infrastructure
- Human-in-the-loop controls for supervised autonomous workflows
- Code execution in sandboxed environments for safe automation
- Conversation logs provide rich training data for iterative model improvement
Related Resources
Fine-Tuning
GGUF
Inference
LoRA
Getting Started with Ertas: Fine-Tune and Deploy Custom AI Models
How to Fine-Tune an LLM: The Complete 2026 Guide
Fine-Tune AI Models Without Writing Code
Privacy-Conscious AI Development: Fine-Tune in the Cloud, Run on Your Terms
Running AI Models Locally: The Complete Guide to Local LLM Inference
CrewAI
LangChain
Ollama
SuperAgent
vLLM
Ertas for Legal
Ertas for Code Generation
Ertas for Data Extraction
Ertas for AI Automation Agencies
Ship AI that runs on your users' devices.
Early bird pricing starts at $14.50/mo — locked in for life. Plans for builders and agencies.