Infrastructure
A toolkit for building autonomous AI agents that can evolve, understand requirements, and build new agents - all while operating within governance guardrails.
# Clone the repository
git clone https://github.com/matiasmolinas/evolving-agents.git
cd evolving-agents
# Install dependencies
pip install -r requirements.txt
pip install -e .
# Install OpenAI Agents SDK (optional)
pip install -r requirements-openai-agents.txt
# Run the Architect-Zero example
python examples/invoice_processing/architect_zero_comprehensive_demo.py
The SmartAgentBus provides intelligent routing and execution of capabilities with:
# Semantic capability discovery
result = await agent_bus.request_service(
capability_query="I need sentiment analysis for customer feedback",
input_data={"text": customer_review},
min_confidence=0.7
)
# Direct capability execution
invoice_result = await agent_bus.request_service(
capability_query="invoice_processing",
input_data={"document": invoice_pdf},
provider_id="invoice_specialist_v3"
)
Key features:
The Smart Library provides semantic discovery, storage, and evolution of components using real vector embeddings with ChromaDB:
# Semantic component discovery
similar_agents = await smart_library.semantic_search(
query="tool that can analyze invoices",
record_type="TOOL",
threshold=0.5
)
# Automatic provider registration
await agent_bus.initialize_from_library()
The framework includes a robust dependency container to manage component dependencies:
# Create a dependency container
container = DependencyContainer()
# Register core components
container.register('llm_service', llm_service)
container.register('smart_library', smart_library)
# Initialize all components with proper dependency wiring
await container.initialize()
# Get any component
system_agent = container.get('system_agent')
Create and execute multi-agent workflows from natural language requirements:
# Generate a workflow from requirements
workflow_yaml = await workflow_generator.generate_workflow(
requirements="Build a pipeline to extract and verify invoice data",
domain="finance"
)
# Execute the workflow
result = await workflow_processor.process_workflow(workflow_yaml)
Evolve existing agents to adapt to new requirements or domains:
# Evolve an agent to a new domain
evolved_agent = await evolve_component_tool.run(
parent_id=original_agent_id,
changes="Adapt to a new domain with different requirements",
target_domain="healthcare",
evolution_strategy="domain_adaptation"
)
The flagship example in examples/invoice_processing/architect_zero_comprehensive_demo.py
demonstrates:
New example in examples/capability_routing/semantic_routing_demo.py
shows:
The examples/agent_evolution/openai_agent_evolution_demo.py
demonstrates:
The examples/forms/run_conversational_form.py
demonstrates:
The framework uses a three-phase initialization pattern to manage dependencies:
This approach eliminates circular reference issues and makes the system more modular and testable.
Most agent frameworks focus on creating individual agents, not agent ecosystems that can build themselves. Key differences:
Our governance system ensures safe operation of autonomous agents:
pip install evolving-agents-framework