| name | agent-apprenticeship-ecosystem |
| description | Use Agent Apprenticeship to train AI agents through real-world tasks, reusable experience, and ecosystem learning signals |
| triggers | ["set up agent apprenticeship for learning from real tasks","run an agent workflow with apprenticeship loops","contribute agent experience to the ecosystem","search for agent training signals and reusable experience","create experience packs from ecosystem learning","configure mentor modes for agent training","share agent execution traces with the community","pull ecosystem experience for agent improvement"] |
Agent Apprenticeship Ecosystem Skill
Skill by ara.so — AI Agent Skills collection.
Overview
Agent Apprenticeship creates a living ecosystem where AI agents learn from real-world work through iterative workflow loops, reusable experience, and collective training signal exchange. It enables agents to execute long-horizon tasks while generating training signals that improve the entire ecosystem.
The system supports:
- Iterative workflow loops with mentor guidance (model-assisted, expert-led, or hybrid)
- Reusable learning signals from 500+ seed tasks and 1000+ execution traces
- Ecosystem contribution of agent experience packages
- Experience Packs that transfer learning across tasks
- Economic value tracking for agent task execution
Installation
npx agent-apprenticeship init
npm install -g agent-apprenticeship
apprentice --version
apprentice doctor
The CLI provides both short (apprentice) and long (agent-apprenticeship) commands.
Initial Setup
npx agent-apprenticeship init
apprentice settings
apprentice doctor
apprentice configure
apprentice configure model
Environment Configuration
Store API keys in ~/.agent-apprenticeship/.env.local:
OPENAI_API_KEY=sk-...
ANTHROPIC_API_KEY=sk-ant-...
GEMINI_API_KEY=...
OPENROUTER_API_KEY=sk-or-...
Or use shell environment variables:
export OPENAI_API_KEY="sk-..."
export ANTHROPIC_API_KEY="sk-ant-..."
export AA_MAX_ITERATIONS=3
Apprentice Agents
Agent Apprenticeship auto-detects installed agent CLIs:
- Codex
- Cursor
- Claude Code
- OpenClaw
- OpenCode
- Hermes Agent
- Custom (with command templates)
Custom Agent Configuration
apprentice configure agent custom --command-template "my-agent run --workspace {workspace} --prompt-file {prompt_file}"
Running Tasks
Basic Task Execution
apprentice run "Create a short market map for AI procurement tools."
apprentice run "Build a release checklist for an AI agent project." --mentor-mode model-assisted
export AA_MAX_ITERATIONS=5
apprentice run "Design a multi-step deployment pipeline."
Mentor Modes
apprentice run "..." --mentor-mode model-assisted
apprentice run "..." --mentor-mode expert-led
apprentice run "..." --mentor-mode hybrid
Mentor Mode Details:
model-assisted: Mentor Model Provider handles the entire loop automatically
expert-led: Human expert provides checkpoints at each iteration
hybrid: Model provides drafts, human reviews and approves/edits
Working with Bundles
After a run completes, Agent Apprenticeship generates a contribution bundle containing:
- Task definition and execution trace
- Agent work episodes and rollouts
- Learning signals and lessons
- Artifacts and outputs
Bundle Inspection
apprentice bundle inspect ./runs/2026-06-22_143022/bundle.zip
apprentice bundle check ./runs/2026-06-22_143022/bundle.zip
apprentice bundle contribute ./runs/2026-06-22_143022/bundle.zip
Ecosystem Integration
Ecosystem Configuration
apprentice ecosystem configure --repo Forsy-AI/agent-apprenticeship
apprentice ecosystem configure --auto-share manual
apprentice ecosystem configure --auto-share ask
apprentice ecosystem configure --auto-share automatic
apprentice ecosystem status
Requirements for ecosystem sharing:
- GitHub CLI (
gh) installed and authenticated
- Ecosystem repository configured
- Valid bundle format
Searching and Exploring
apprentice ecosystem list
apprentice ecosystem search cloud
apprentice ecosystem search "deployment pipeline"
apprentice ecosystem search kubernetes
apprentice ecosystem inspect aa-seed-task-501
apprentice ecosystem pull aa-seed-task-501
Contributing Experience
apprentice ecosystem contribute ./runs/2026-06-22_143022/bundle.zip
apprentice run "..."
Experience Packs
Experience Packs transform ecosystem experience into reusable learning signals for future tasks.
Creating Experience Packs
apprentice learn create aa-seed-task-501
apprentice learn preview pack_12345
apprentice learn replay pack_12345
apprentice learn keep pack_12345
apprentice learn revert pack_12345
Using Experience Packs
apprentice run "Create incident response checklist." --experience-pack pack_12345
apprentice run "Deploy microservice architecture." --use-active-experience-packs
apprentice run "Prototype new feature." --no-experience-packs
Seed Dataset
The Agent Apprenticeship seed dataset includes:
- 500+ curated real-world tasks
- 495 reusable agent lessons
- 1000+ full agent execution traces
- 1000+ agent work episodes
Access the seed dataset:
ls seed_dataset/
apprentice ecosystem search --filter seed
apprentice ecosystem inspect aa-seed-task-001
Configuration Management
View Current Settings
apprentice settings
apprentice ecosystem status
apprentice doctor
Update Configuration
apprentice configure
apprentice configure model
apprentice ecosystem configure --repo your-org/your-repo
apprentice ecosystem configure --auto-share ask
Common Workflows
Workflow 1: Simple Task Execution
apprentice run "Create API documentation for user authentication."
apprentice bundle inspect ./runs/2026-06-22_150033/bundle.zip
apprentice ecosystem contribute ./runs/2026-06-22_150033/bundle.zip
Workflow 2: Learning from Ecosystem
apprentice ecosystem search "API documentation"
apprentice ecosystem inspect aa-seed-task-215
apprentice ecosystem pull aa-seed-task-215
apprentice learn create aa-seed-task-215
apprentice run "Document GraphQL API endpoints." --experience-pack pack_67890
Workflow 3: Iterative Complex Task
export AA_MAX_ITERATIONS=10
apprentice run "Design and implement a CI/CD pipeline with security scanning." --mentor-mode hybrid
apprentice bundle inspect ./runs/2026-06-22_153044/bundle.zip
apprentice learn create ./runs/2026-06-22_153044/bundle.zip
apprentice learn keep pack_11223
Workflow 4: Domain-Specific Agent Training
apprentice ecosystem search kubernetes
apprentice ecosystem pull aa-seed-task-301
apprentice ecosystem pull aa-seed-task-302
apprentice ecosystem pull aa-seed-task-303
apprentice learn create aa-seed-task-301
apprentice learn create aa-seed-task-302
apprentice learn create aa-seed-task-303
apprentice learn keep pack_301
apprentice learn keep pack_302
apprentice learn keep pack_303
apprentice run "Deploy multi-region Kubernetes cluster with observability." --use-active-experience-packs
Repository Structure
When contributing to or exploring the ecosystem, the public repository follows this structure:
seed_dataset/ # Initial 500+ curated tasks
ecosystem/ # Community experience
contributions/ # Contributed bundles
schemas/ # Bundle and trace schemas
examples/ # Example usage and integrations
Advanced Configuration
Max Iterations
Control the depth of iterative workflow loops:
apprentice settings
export AA_MAX_ITERATIONS=7
apprentice run "..."
apprentice run "..." --max-iterations 7
Custom Mentor Models
When configuring model providers, you can specify custom models:
apprentice configure model
Workspace Management
Agent Apprenticeship creates isolated workspaces for each run:
~/.agent-apprenticeship/runs/
~/.agent-apprenticeship/runs/2026-06-22_143022/
workspace/
artifacts/
bundle.zip
trace.json
Troubleshooting
Agent Not Detected
which codex
which cursor
which claude-code
apprentice configure
apprentice configure agent custom --command-template "..."
API Key Issues
apprentice doctor
cat ~/.agent-apprenticeship/.env.local
export OPENAI_API_KEY="sk-..."
apprentice doctor
apprentice configure model
Bundle Validation Failures
apprentice bundle check ./runs/2026-06-22_143022/bundle.zip
apprentice bundle inspect ./runs/2026-06-22_143022/bundle.zip
Ecosystem Connection Issues
gh auth status
gh auth login
apprentice ecosystem status
apprentice ecosystem configure --repo Forsy-AI/agent-apprenticeship
Experience Pack Issues
apprentice learn list
apprentice learn preview pack_12345
apprentice learn revert pack_12345
apprentice learn clear
Integration Examples
CI/CD Integration
#!/bin/bash
export OPENAI_API_KEY="${OPENAI_API_KEY}"
export AA_MAX_ITERATIONS=3
apprentice run "Generate deployment checklist for $SERVICE_NAME" \
--mentor-mode model-assisted \
--no-experience-packs
if [ $? -eq 0 ]; then
apprentice ecosystem contribute ./runs/latest/bundle.zip
fi
Python Script Integration
import subprocess
import os
import json
def run_agent_task(task_description, experience_packs=None):
"""Run an agent apprenticeship task from Python."""
cmd = ["apprentice", "run", task_description]
if experience_packs:
for pack in experience_packs:
cmd.extend(["--experience-pack", pack])
result = subprocess.run(
cmd,
capture_output=True,
text=True,
env={**os.environ, "AA_MAX_ITERATIONS": "5"}
)
return result.returncode == 0, result.stdout
success, output = run_agent_task(
"Create API documentation for user service",
experience_packs=["pack_12345"]
)
if success:
print("Task completed successfully")
print(output)
Automated Learning Pipeline
#!/bin/bash
TASKS=$(apprentice ecosystem search "API design" --json | jq -r '.[].id')
for task_id in $TASKS; do
apprentice ecosystem pull "$task_id"
apprentice learn create "$task_id"
done
apprentice run "Design REST API for analytics platform" \
--use-active-experience-packs \
--mentor-mode hybrid
apprentice ecosystem contribute ./runs/latest/bundle.zip
Best Practices
- Start with seed dataset: Explore
aa-seed-task-* tasks to understand ecosystem patterns
- Use appropriate mentor mode:
model-assisted for automation, expert-led for high-value tasks, hybrid for balance
- Create experience packs strategically: Focus on reusable patterns, not one-off tasks
- Contribute quality bundles: Ensure tasks complete successfully before contributing
- Search before creating: Check ecosystem for similar tasks to avoid duplication
- Iterate gradually: Start with low
AA_MAX_ITERATIONS, increase for complex tasks
- Review traces: Use
bundle inspect to understand agent learning patterns
- Manage active packs: Keep only relevant experience packs active for better performance