WIP -- Work In Progress
SwarmTrainer is a modular Python framework for autonomous multi‑agent feedback loops to fine‑tune large language models. Agents such as Curator, Critic, Editor, Evaluator, and more work together to generate, critique, and refine training data. All without manual supervision. The system integrates curriculum learning, real‑time monitoring, and a UI dashboard to observe swarm behavior.
- Home page UI for selecting base model and agent configuration
- Dashboard navigation routing via dashboard.py
- Monitor page with:
- Loading logs from local directory (default logs/agents/)
- Summaries of agent performance (average score, error rate, response time)
- Detailed log view, with tabs per agent, pagination, error‑filter toggles, and raw JSON display
 
- Loading logs from local directory (default 
- Basic session and config state tracked in Streamlit session state
- Log filtering by session ID or directory path
- Backend infrastructure (API /generate,/status) is stubbed or not fully implemented
- No persistent database for logs: uses file‑based logs; formats may vary and need normalization
- Timing / latency metrics depend on log content; not all agents/traces include them yet
- Some UI elements are placeholders (e.g. “Clear All” in Monitor)
- No authentication or user management
- Performance scaling with large log volume needs work
swarm_trainer/ ├── agents/ ← agent logic (curator, critic, etc.) ├── swarm_engine/ ← orchestration / consensus / memory ├── trainer/ ← curriculum and fine‑tuning logic ├── data/ ← raw / generated / annotated datasets ├── app/ │ ├── pages/ │ │ ├── home.py ← base model selection + launch UI │ │ └── monitor.py ← agent metrics & logs UI │ └── dashboard.py ← app entrypoint + sidebar routing ├── configs/ │ └── agent_profiles.yaml ← agent parameters (temperature, behavior, etc.) ├── api/ ← planned HTTP endpoints ├── utils/ │ └── logger.py ← structured logging utilities └── README.md ← you are here
- Clone the repo
git clone https://github.com/moonrunnerkc/swarm_trainer.git cd swarm_trainer
Create and activate a Python virtual environment
bash python3 -m venv venv source venv/bin/activate Install dependencies (Streamlit, PyYAML, etc.)
pip install -r requirements.txt Ensure you have a logs/agents/ directory (or point Monitor to wherever your logs are) with appropriately named YAML log files.
Run the dashboard UI streamlit run app/dashboard.py
📅 Planned Features / Roadmap Feature Status Notes
Agent‑based self‑supervised curriculum builder 🚧 In design Agents will generate data, critique, edit, and vote API endpoints for triggering training & checking status 🚧 Planned To communicate with backend controller More robust logging & standardization 🚧 WIP Uniform schemas, timestamps, structured metrics Resource usage / GPU / memory monitoring 🚧 Planned To show hardware telemetry during runs User roles / multi‑user support 🚧 Future Not in scope currently
💡 Contributing & Style Notes
All new pages/modules must expose a render() function for UI pages
Stick to existing file structure; do not rearrange modules or rename agents without plan
Use the configs/agent_profiles.yaml as single source of truth for agent behavior
Follow existing style: clear, typed, defensive, human readable
Document assumptions in function docstrings
📬 Contact Made by Bradley R. Kinnard