Metadata-Version: 2.4
Name: agent-curriculum
Version: 0.1.0
Summary: Curriculum learning for agent training — difficulty-scored stages
License-File: LICENSE
Requires-Python: >=3.10
Requires-Dist: click>=8.0
Requires-Dist: numpy>=1.24
Requires-Dist: pydantic>=2.0
Requires-Dist: pyyaml>=6.0
Requires-Dist: rich>=13.0
Description-Content-Type: text/markdown

# AgentCurriculum

[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](LICENSE) [![Python 3.10+](https://img.shields.io/badge/python-3.10%2B-blue.svg)](https://www.python.org/downloads/) [![Tests](https://img.shields.io/badge/tests-0-yellow.svg)](tests/)


Curriculum learning for coding agents — train through progressive difficulty stages.

## Overview

AgentCurriculum ranks agent traces by difficulty and builds a 5-stage training curriculum where the model learns basic tool use first, then progressively harder multi-step reasoning and error recovery.

## Stages

| Stage | Name | Difficulty | Tools | Errors | LR | LoRA r |
|-------|------|-----------|-------|--------|----|--------|
| 1 | Basic | 0.0–0.2 | <5 | 0 | 2e-4 | 64 |
| 2 | Intermediate | 0.2–0.4 | <15 | ≤2 | 1e-4 | 64 |
| 3 | Advanced | 0.4–0.6 | <30 | ≤5 | 5e-5 | 32 |
| 4 | Expert | 0.6–0.8 | <60 | ≤10 | 3e-5 | 32 |
| 5 | Master | 0.8–1.0 | <100 | ≤20 | 1e-5 | 16 |

## Installation

```bash
pip install agent-curriculum
```

## Quick Start

```python
from agent_curriculum import DifficultyScorer, StageBuilder, CurriculumTrainer

# Score traces by difficulty
scorer = DifficultyScorer()
scores = scorer.score_file("traces.jsonl")

# Build curriculum stages
builder = StageBuilder(scorer=scorer)
stages = builder.build_stages("traces.jsonl")
builder.generate_configs("configs/")

# Train through the curriculum
trainer = CurriculumTrainer(base_model="Qwen/Qwen2.5-14B")
results = trainer.train_curriculum("traces.jsonl", start_stage=1, end_stage=5)
```

## License

MIT

## Ecosystem

Part of the [FableForge](../) ecosystem — 21 open-source projects built from 210K real agent traces:

| Project | Description |
| --- | --- |
| **[Anvil](../anvil)** | Self-verified coding agent |
| **[VerifyLoop](../verifyloop)** | Plan→Execute→Verify→Recover framework |
| **[ErrorRecovery](../error-recovery)** | Self-healing middleware (3,725 error patterns) |
| **[FableForge-14B](../fableforge-14b)** | The fine-tuned 14B model (4-stage training) |
| **[ShellWhisperer](../shell-whisperer)** | 1.5B edge agent (phone/RPi, 50ms) |
| **[ReasonCritic](../reason-critic)** | Verification model (130 benchmark tasks) |
| **[TraceCompiler](../trace-compiler)** | Compile traces → LoRA skills |
| **[AgentRuntime](../agent-runtime)** | Persistent agent daemon (systemd for AI) |
| **[AgentSwarm](../agent-swarm)** | Multi-agent from real trace transitions |
| **[AgentTelemetry](../agent-telemetry)** | Datadog for agents (token tracking, costs) |
| **[BenchAgent](../bench-agent)** | HumanEval for tool-use (107 tasks) |
| **[AgentDev](../agent-dev)** | VSCode extension with verification |
| **[TraceViz](../trace-viz)** | Trace replay visualizer (Next.js) |
| **[AgentSkills](../agent-skills)** | npm for agent behaviors |
| **[AgentCurriculum](../agent-curriculum)** | 5-stage progressive training |
| **[AgentFuzzer](../agent-fuzzer)** | Adversarial testing for agents |
| **[AgentConstitution](../agent-constitution)** | Safety guardrails from traces |
| **[CostOptimizer](../cost-optimizer)** | Token cost reduction (50-80%) |
| **[AgentProfiler](../agent-profiler)** | Behavioral fingerprinting |
| **[TrajectoryDistiller](../trajectory-distiller)** | Trace→training data pipeline |
| **[Fable5-Dataset](../fable5-dataset)** | HuggingFace dataset release |
