A Python-based system for generating agent applications from templates. This MVP provides the core functionality for automated agent generation using Claude Code patterns.
- Python 3.12 Backend: Modern Python implementation
- Template-Based Generation: Jinja2 template engine for flexible code generation
- Pydantic Models: Type-safe data validation and serialization
- Modular Design: Clean separation of concerns with core, models, templates, utils
- Agent Specification: Structured input for agent requirements
- Template System: YAML-based template definitions with Jinja2 templating
- Code Generation: Produces executable Python source code
- Documentation Generation: Automatic README and usage guides
- Dependency Management: Automated requirements.txt generation
- Data Analyst Agent: For data processing, analysis, and report generation
- (More templates can be easily added)
pip install Jinja2 PyYAML pydantic click- Create a specification file (
agent_spec.yaml):
agent_type: data_analyst
name: SalesAnalyzer
description: "Analyzes sales data and generates comprehensive reports"
requirements:
- name: data_loading
description: "Load sales data from CSV files"
priority: 1
- name: sales_analysis
description: "Analyze sales trends and patterns"
priority: 1
dependencies:
- pandas
- matplotlib
- seaborn
output_formats:
- html
- json- Generate the agent:
PYTHONPATH=src python maf_cli.py generate agent_spec.yaml- Use the generated agent:
cd output/SalesAnalyzer
pip install -r requirements.txt
python SalesAnalyzer_agent.pysrc/
meta_agent_factory/
core/ # Core generation logic
models/ # Data models and schemas
templates/ # Agent templates (YAML + Jinja2)
utils/ # Utility functions
- Python 3.12: Primary implementation language
- Jinja2: Template engine for code generation
- Pydantic: Data validation and serialization
- PyYAML: Template configuration parsing
- Click: Command-line interface
The MVP is fully functional and ready for:
- Adding more agent templates
- Enhancing template capabilities
- Adding web API interface
- Improving validation and error handling
- Adding testing and CI/CD pipelines
See test_spec.yaml for a complete example specification and the generated output in output/SalesAnalyzer/.