Advisor Orchestrator Worker
One model is a bottleneck. A team with one brain, twenty hands, and a board advisor is not.
- Claude
- Gemini
Agent Skills ·Intermediate
Automatically optimize your agent skills using a multi-agent system built with Google ADK (Agent Development Kit) and Gemini. Upload a skill, let the agents generate test scenarios and evaluation criteria, then watch as three specialized ADK agents collaborate to improve your skill through iterative optimization.
GOOGLE_API_KEYLicense Apache-2.0 · content curated and maintained by Doutor AI.
Automatically optimize your agent skills using a multi-agent system built with Google ADK (Agent Development Kit) and Gemini. Upload a skill, let the agents generate test scenarios and evaluation criteria, then watch as three specialized ADK agents collaborate to improve your skill through iterative optimization.
This app implements an automated skill improvement loop inspired by Karpathy's autoresearch methodology, powered by a team of ADK agents:
| Agent | Role | What It Does |
|---|---|---|
| Executor | Skill Runner & Scorer | Executes the skill against test scenarios, scores outputs against evaluation criteria, and generates initial test scenarios during analysis |
| Analyst | Failure Diagnostician | Examines failed evaluations, identifies root causes, and recommends a mutation strategy. Uses Pydantic output_schema for guaranteed structured JSON |
| Mutator | Prompt Editor | Makes exactly ONE targeted change to the skill prompt based on the analyst's diagnosis. Uses Pydantic output_schema for guaranteed structured JSON |
add_example, add_constraint, restructure, or add_edge_case)self-improving-agent-skills/
├── backend/ # FastAPI server + ADK optimization engine
│ ├── app.py # REST API endpoints + SSE streaming
│ ├── adk_optimizer.py # Multi-agent optimizer (Executor, Analyst, Mutator)
│ └── requirements.txt
├── frontend/ # Next.js + React + Tailwind
│ ├── src/
│ │ ├── app/ # Main page + layout
│ │ └── components/ # Upload, Config, Running, Results steps
│ ├── package.json
│ └── *.config.ts
│ ├── code-reviewer/
│ └── content-writer/
└── README.md
gemini-3.8-flash by default; pick another model in the UI or set GEMINI_MODEL) - structured output via output_schema on Analyst and Mutator agentscd backend
# Create virtual environment
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
# Install dependencies
pip install -r requirements.txt
# Set up environment (optional - the app will prompt for your API key in the UI)
cp .env.example .env
# Edit .env and add your GOOGLE_API_KEY
# Run server
python app.py
# Server runs on http://localhost:8891
cd frontend
# Install dependencies
npm install
# Run development server
npm run dev
# App runs on http://localhost:3000
Skills follow the agentskills.io specification:
my-skill/
├── SKILL.md # Required: YAML frontmatter + instructions
├── scripts/ # Optional: executable code
├── references/ # Optional: additional docs
└── assets/ # Optional: templates, resources
Example SKILL.md:
name: my-skill
description: What this skill does and when to use it
license: MIT
metadata:
author: your-name
version: "1.0"
My Skill
Your skill instructions here...
Zip any skill folder and upload it - for instance this repo's own
project-graveyard:
cd agent_skills
zip -r project-graveyard.zip project-graveyard/
The app's "examples" picker also lists sibling skills from this repo
automatically - real skills, not toys.
The Executor agent analyzes your skill and generates:
You can edit, add, or remove scenarios and criteria before optimization begins.
The Executor agent runs the skill against all scenarios and scores each output against all evaluation criteria. This establishes the starting score.
For each round, the three agents collaborate:
output_schema)output_schema)| Method | Endpoint | Description |
|---|---|---|
POST | /api/upload | Upload skill zip file (max 10MB, text files only) |
POST | /api/upload-files | Upload multiple files (folder upload) |
GET | /api/models | The default Gemini model and suggested alternatives |
POST | /api/analyze | Generate scenarios and evals (requires Gemini API key; optional model) |
POST | /api/regenerate | Regenerate scenarios and evals (optional model) |
POST | /api/update-config | Save user's selected/edited config |
POST | /api/start/{session_id} | Start optimization (optional model) |
GET | /api/stream/{session_id} | SSE stream of optimization progress |
POST | /api/stop/{session_id} | Stop optimization |
GET | /api/download/{session_id} | Download improved skill |
GET | /api/examples | List available example skills |
POST | /api/examples/{name}/load | Load an example skill |
GET | /api/status/{session_id} | Poll-based status endpoint |
GET | /health | Health check |
The Gemini API key is passed from the frontend with each request. Optionally set GOOGLE_API_KEY in .env for local development. Server runs on port 8891.
The Gemini model is chosen per request: the UI sends the id from its model field, and a request without one runs on the server default. That default is gemini-3.8-flash, or whatever GEMINI_MODEL is set to when the server starts:
GEMINI_MODEL=gemini-3.1-pro-preview python app.py
Any Gemini model id is accepted; a value that does not look like one is refused with a 400 rather than replaced. GET /api/models reports the current default, which the UI shows in the field.
Upload limits:
.md, .txt, .json, .yaml, .py, .js, .ts, etc.)Sessions expire after 1 hour automatically.
API key is entered in the UI, stored in component state (not persisted), and sent with each request. The key is passed to the backend which sets GOOGLE_API_KEY for ADK agent authentication.
In RunningStep.tsx, adjust max_rounds (capped at 50):
body: JSON.stringify({
max_rounds: 20, // Default: 20, max: 50
}),
The model comes from the UI field or GEMINI_MODEL (see Configuration above); DEFAULT_MODEL in adk_optimizer.py is the last resort:
DEFAULT_MODEL = "gemini-3.8-flash"
The tests replace the optimizer with a fake, so they need no API key and make no Gemini calls:
cd backend
pip install pytest httpx
pytest
cd frontend
npm run build
Both servers support hot reload. Edit code and see changes immediately.
This tool applies Andrej Karpathy's autoresearch methodology (using LLMs to iteratively improve their own prompts) to agent skills. The key insight: rather than manually tweaking prompts, define success criteria and let the AI optimize itself - now powered by a team of specialized ADK agents.
Original concept: https://github.com/karpathy/autoresearch
One model is a bottleneck. A team with one brain, twenty hands, and a board advisor is not.
git blame tells you who last changed a line. Commit Archaeologist reconstructs why the line exists.
Dependency Doctor inspects one dependency manifest for surface-level, direct-manifest footguns. It catches unpinned versions, standard-library shadowi…
Need a tailor-made solution?
Not sure where to start with AI in your business? Get a free assessment and a tailored plan - no commitment.
Doutor AI gives you 1,859 ready-to-copy AI prompts, by industry and in plain English - plus a complete technical library for those who want to go further.