/atomic-agents:create-atomic-agentfrom atomic-agents
Guides creating and wiring an AtomicAgent with schemas, config, system prompt, provider client, history, hooks, and context providers. Activates when the user asks to create, add, build, or wire an agent.
Ships in atomic-agents. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
An agent is an LLM-backed transformer from one BaseIOSchema to another. Building one means: design the schemas, write the system prompt, wire the provider client, build the AgentConfig, instantiate AtomicAgent[In, Out].
For deep material (streaming, token counting, hooks, multi-agent memory), the authority is ../framework/references/agents.md plus providers.md, prompts.md, and memory.md. This skill is the action-oriented path: clarify → write → run.
framework skillframework skill: questions about Atomic Agents in general, or the user is doing something other than authoring an agent.Bundle into one message:
background line.BasicChatInputSchema / BasicChatOutputSchema for free-form chat. Use a custom pair for anything structured (extraction, classification, planning, routing). When custom, branch to the create-atomic-schema skill for the schema authoring.ChatHistory. No (single-shot transformer) → omit it for stateless behavior.create-atomic-context-provider skill afterwards.Skip anything already settled in context.
State the plan in one short block:
<project>/agents/<agent_name>.py (or directly in main.py for a tiny project — see ../framework/references/project-structure.md).gpt-5.6-terra, Anthropic claude-haiku-4-5, Groq llama-3.3-70b-versatile, Ollama llama3.1, Gemini gemini-2.5-flash.SystemPromptGenerator content — three sections: background, steps, output_instructions.from atomic_agents import (
AtomicAgent, AgentConfig,
BasicChatInputSchema, BasicChatOutputSchema,
)
from atomic_agents.context import ChatHistory, SystemPromptGenerator
from instructor import Mode
The full per-provider matrix lives in ../framework/references/providers.md. Quick recap:
# OpenAI — default mode is Mode.TOOLS
import os, instructor, openai
client = instructor.from_openai(openai.OpenAI(api_key=os.environ["OPENAI_API_KEY"]))
model = "gpt-5.6-terra"
api_params: dict = {}
# Anthropic — Mode.TOOLS, max_tokens REQUIRED in model_api_parameters
import anthropic
client = instructor.from_anthropic(anthropic.Anthropic(api_key=os.environ["ANTHROPIC_API_KEY"]))
model = "claude-haiku-4-5"
api_params = {"max_tokens": 4096}
# Gemini — Mode.GENAI_TOOLS, assistant_role="model"
from google import genai
client = instructor.from_genai(genai.Client(api_key=os.environ["GEMINI_API_KEY"]), mode=Mode.GENAI_TOOLS)
model = "gemini-2.5-flash"
api_params = {}
# Groq / Ollama / MiniMax — Mode.JSON in both factory and AgentConfig
from atomic_agents import AtomicAgent, AgentConfig
from atomic_agents.context import ChatHistory, SystemPromptGenerator
agent = AtomicAgent[MyInput, MyOutput](
config=AgentConfig(
client=client,
model=model,
history=ChatHistory(), # omit for stateless
system_prompt_generator=SystemPromptGenerator(
background=["You are a concise research assistant."],
steps=[
"Read the question carefully.",
"Decide what minimum information answers it.",
"Produce the answer in the required schema.",
],
output_instructions=[
"Reply under 100 words.",
"If unsure, set status='error' and explain why.",
],
),
# Provider-specific knobs — match the Instructor factory
# mode=Mode.TOOLS, # OpenAI / Anthropic / OpenRouter
# mode=Mode.JSON, # Groq / Ollama / MiniMax
# mode=Mode.GENAI_TOOLS, assistant_role="model", # Gemini
model_api_parameters=api_params or {"temperature": 0.2},
)
)
AtomicAgent[MyInput, MyOutput] — write the type parameters explicitly. The framework reads them at class-definition time. Do not rely on subclass-level input_schema / output_schema class attributes.
max_tokens in model_api_parameters → API rejects every call.assistant_role="model" → role mismatch on every turn.Mode.TOOLS → tools formatted in a way the provider does not accept; flip to Mode.JSON.system_role=None and reasoning_effort in model_api_parameters.out = agent.run(MyInput(...))
print(out)
Quick smoke test without paying for a real call:
uv run python -c "from <project>.agents.<agent_name> import agent; print(type(agent).__name__, '->', agent.input_schema.__name__, '/', agent.output_schema.__name__)"
If output validation fails repeatedly, the parse:error hook has the details — see ../framework/references/hooks.md for registration.
Tell the user:
agent.run(...) (and run_async, run_stream, run_async_stream when appropriate).create-atomic-tool skill.create-atomic-context-provider skill.create-atomic-schema skill.../framework/references/orchestration.md.../framework/references/hooks.md.../framework/references/memory.md.instructor.from_* — structured outputs silently stop working.BaseModel instead of BaseIOSchema for the agent's input or output type.AgentConfig.mode out of sync with the Instructor factory mode.assistant_role="assistant" on Gemini — must be "model".max_tokens on Anthropic — every call fails.ChatHistory in a long-running service — monitor agent.get_context_token_count().utilization or set max_messages.For deep material — streaming, async, token counting, hooks, multi-agent history — load ../framework/references/agents.md.
What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub eigenwise/atomic-agents --plugin atomic-agents7 skills in this plugin
/create-atomic-context-providerBuild a `BaseDynamicContextProvider` that injects a named, titled block into an agent's system prompt at every `run()` — current time, user identity, retrieved RAG docs, session state, cached DB schema. Use when the user asks to "add a context provider", "inject X into the prompt", "give the agent dynamic context", "wire up RAG", "make a `BaseDynamicContextProvider`", or runs `/atomic-agents:create-atomic-context-provider`./create-atomic-schemaDesign and write a `BaseIOSchema` input/output pair for an Atomic Agents agent or tool — docstrings, field descriptions, validators, error variants. Use when the user asks to "create a schema", "design the input/output schema", "define an `IOSchema`", "write a `BaseIOSchema`", "model the agent's output", or runs `/atomic-agents:create-atomic-schema`./create-atomic-toolBuild a `BaseTool[InSchema, OutSchema]` subclass — input/output schemas, `BaseToolConfig`, `run()` (and optional `run_async()`), env-driven secrets, typed failure outputs. Use when the user asks to "add a tool", "create a tool", "wrap an API as a tool", "build a `BaseTool`", "make a calculator/search/weather tool", or runs `/atomic-agents:create-atomic-tool`.Other plugins' skills for the same job