creating-agents
Skill36 starsChanged 7 months agoMITView on GitHub
Use when creating a new Agent2 agent, scaffolding a service, or when user says "new agent" or "add agent" — generates schema, tools, config, Dockerfile, and Docker Compose entry following Agent2 conventions
- Sends data out
1 other project uses a version of this.
Adopted by
Most recently taken up by
- chinkan/RustFoxtheir own version, first seen Sep 22, 2026
Other versions1 project uses a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 1
- chinkan/RustFox★ 9same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository28 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- .github/copilot-instructions.mdCopilot instructions
- llms-full.txtllms.txt
- llms.txtllms.txt
- adding-capabilitiesSkill
- adding-knowledgeSkill
- agent-qaSkill
- brain-cloneSkill
- building-domain-expertsSkill
- creating-agentsSkill
- debugging-agentsSkill
- scandal-market-agent-builderSkill
- adding-capabilitiesSkill
- adding-knowledgeSkill
- agent-qaSkill
- brain-cloneSkill
- building-domain-expertsSkill
- creating-agentsSkill
- debugging-agentsSkill
- scandal-market-agent-builderSkill
- adding-capabilitiesSkill
- adding-knowledgeSkill
- agent-qaSkill
- brain-cloneSkill
- building-domain-expertsSkill
- debugging-agentsSkill
- scandal-market-agent-builderSkill
The file
We split this skill into the rules it gives an agent
3 rules. About 0 are common, 0 are distinctive, and 3 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈0
Distinctive · estimate
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 12
If the requested agent is a domain expert, regulated workflow, document reviewer, compliance worker, or professional brain clone, use …
- Very specific: line 35
Create all files in agents/<name>/:
- Very specific: line 68
Add a service block to docker-compose.yml.
≈ “Common” is an estimate: at least 1 in 5 of the 213,895 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Creating Agents
Overview
Scaffold a complete Agent2 agent service. One agent = one schema, one API, one Docker service.
If the requested agent is a domain expert, regulated workflow, document reviewer,
compliance worker, or professional brain clone, use brain-clone first and
study agents/procurement-compliance-officer.
When to Activate
- User says "create agent", "new agent", "scaffold agent", "add agent"
- User describes a use case that needs a new agent service
- User wants to add a new backend AI worker
Steps
1. Gather Requirements
Ask the user:
- Name (kebab-case, e.g.
support-ticket) - What it does (one sentence)
- Output fields (what the structured result should contain)
- Tools needed (what the agent should be able to call)
- Knowledge needed? (does it need to search documents?)
2. Generate Files
Create all files in agents/<name>/:
| File | What to put |
__init__.py | Empty |
schemas.py | Pydantic BaseModel with Field() descriptions. Use Literal for enums, validators for constraints. |
tools.py | One function per tool. Include docstrings. Stub implementations. |
agent.py | create_agent() with instructions= and @agent.tool_plain registrations |
config.yaml | name, description, model (empty = use DEFAULT_MODEL), port, timeout, collections |
main.py | from shared.api import create_app; app = create_app("<name>") |
Dockerfile | Copy from agents/example-agent/Dockerfile, change agent paths |
tests/promptfoo/<name>/eval.yaml | For domain agents, behavior-level evals |
3. Key Rules
# agent.py — ALWAYS use instructions=, NEVER system_prompt=
agent = create_agent(
name="my-agent",
output_type=MySchema,
instructions="You are...",
toolsets=[knowledge_server] if needs_knowledge else [],
)
# Tools — ALWAYS @agent.tool_plain, delegate to tools.py
@agent.tool_plain
def my_tool(arg: str) -> dict:
"""Docstring is the tool description the LLM sees."""
return tools.my_tool(arg)4. Wire Into Docker Compose
Add a service block to docker-compose.yml. Use next available port. Copy environment block from example-agent.
5. Verify
uv run pytest tests/ -v # Unit tests still pass
docker compose build <name> # Image builds
docker compose up -d <name> redis # Service starts
curl http://localhost:<port>/health # Health check
curl -X POST http://localhost:<port>/tasks?mode=sync \
-H "Authorization: Bearer dev-token-change-me" \
-H "Content-Type: application/json" \
-d '{"input":{"text":"test"}}' # Mock mode returns schema-valid JSONCommon Mistakes
| Mistake | Fix |
Using system_prompt= | Use instructions= — system_prompt is a compat alias |
Putting business logic in shared/ | Business logic goes in agents/<name>/tools.py |
| Hardcoding model name | Leave model: "" in config, use DEFAULT_MODEL env var |
| Forgetting Dockerfile config copy | Must mkdir -p agents/<name> && cp agent/config.yaml agents/<name>/config.yaml |
Using toolsets=None | Use toolsets=[] (empty list is safe, None can cause issues) |
| Building a domain expert from the tiny examples | Use agents/procurement-compliance-officer as the canonical full-pattern reference |
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

