create-atomic-agent
できること
このガイドは、入力と出力の形から、プロバイダーとの接続まで、Atomic AgentsのPythonフレームワークでAIエージェントを設計して配線する方法を説明します。構造化されたAIエージェントを作る開発者向けです。
使う場面
- ✓開発者が、Atomic Agentsのプロジェクトにプランナー、ルーター、抽出のエージェントを追加したいとき。
- ✓開発者が、フレームワーク上に単純なチャットのエージェントを作りたいとき。
- ✓開発者が、他のコードが使える構造化された出力を返すエージェントを必要とするとき。
スキルのリンク
https://github.com/Eigenwise/atomic-agents/blob/main/claude-plugin/atomic-agents/skills/create-atomic-agent/SKILL.mdコピーしてAI(Claude、ChatGPT、Cursor)に貼り付け、指示に従うよう頼んでください。
使い方
いちばん簡単な方法:メッセージをコピーしてAIに貼り付けるだけ。AIがスキルを読んで指示に従います。
貼り付け用メッセージ
Claude Code、Codex、Cursorの場合:プロジェクトのフォルダで実行するとスキルがインストールされます。
SKILL.mdをダウンロードして、エージェントのスキル用フォルダに入れてください。
AIへの頼み方の例
“サポートのチケットを読み、カテゴリと緊急度を返すAtomic Agentsのエージェントを作ってください。”
毎週5つの新しいスキル。1分で読めます。
仕組み
このスキルは、まずエージェントに何をさせたいか、どのスキーマとプロバイダーを使うかを尋ね、次にスキーマ、システムプロンプト、クライアントの設定、エージェントを書き、動くかを確認するために実行します。
技術的な内容(元のSKILL.md)
作者による元のテキスト(英語)をGitHubからそのまま表示しています。
Create an Atomic Agent
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.
When this fires vs the umbrella framework skill
- This skill: the user is creating or wiring a specific agent — "add a planner agent", "build a Q&A agent", "make a router that classifies tickets".
frameworkskill: questions about Atomic Agents in general, or the user is doing something other than authoring an agent.
Phase 1 — Clarify
Bundle into one message:
- What should the agent do? One sentence. Becomes the persona /
backgroundline. - Inputs and outputs. Use
BasicChatInputSchema/BasicChatOutputSchemafor free-form chat. Use a custom pair for anything structured (extraction, classification, planning, routing). When custom, branch to thecreate-atomic-schemaskill for the schema authoring. - Provider. OpenAI / Anthropic / Groq / Ollama / Gemini / OpenRouter / MiniMax. Default: whatever the project already uses; otherwise OpenAI.
- Conversational? Yes → wire a
ChatHistory. No (single-shot transformer) → omit it for stateless behavior. - Context providers. Anything to inject into the prompt at runtime (current time, user identity, retrieved docs)? If yes, plan to also use the
create-atomic-context-providerskill afterwards.
Skip anything already settled in context.
Phase 2 — Plan
State the plan in one short block:
- File:
<project>/agents/<agent_name>.py(or directly inmain.pyfor a tiny project — see../framework/references/project-structure.md). - Schemas: which pair, where they live.
- Provider + model + Instructor mode. Default models: OpenAI
gpt-5-mini, Anthropicclaude-haiku-4-5, Groqllama-3.3-70b-versatile, Ollamallama3.1, Geminigemini-2.5-flash. SystemPromptGeneratorcontent — three sections:background,steps,output_instructions.- History? Hooks? Context providers?
Phase 3 — Implement
Canonical imports (do not deviate)
from atomic_agents import (
AtomicAgent, AgentConfig,
BasicChatInputSchema, BasicChatOutputSchema,
)
from atomic_agents.context import ChatHistory, SystemPromptGenerator
from instructor import Mode
Wire the provider client (always Instructor-wrapped)
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-mini"
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
Build the agent
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,
よくある質問
複数のAIプロバイダーに対応していますか?
はい。OpenAI、Anthropic、Groq、Ollama、Gemini、OpenRouter、MiniMaxを挙げています。
エージェントには常にカスタムのスキーマが必要ですか?
いいえ。自由形式のチャットでは、フレームワークの基本的なチャットのスキーマを使います。
スキーマは何のためのものですか?
エージェントに入るものと出てくるものを定義する、型付きの契約です。
詳細
作者による元の説明
Build and wire an `AtomicAgent[InSchema, OutSchema]` — schemas, `AgentConfig`, `SystemPromptGenerator`, provider client, history, hooks, optional context providers. Use when the user asks to "create an agent", "add another agent", "build an `AtomicAgent`", "wire up an agent", "make a planner/router/extractor agent", or runs `/atomic-agents:create-atomic-agent`.
repo: Eigenwise/atomic-agents
人気
- GitHubのスター
- 6.3k
- ランキング
- #14237
- ライセンス
- MIT
- 更新日
- 2026/10/29
コメント
- …
このリポジトリの他のスキル
create-atomic-context-provider
6.3kエージェントが、Atomic Agentsのエージェントにコンテキストのプロバイダーを追加し、時刻や取得した文書などの新しい詳細がプロンプトに現れるよう支援します。
create-atomic-schema
6.3kエージェントが、明確なフィールドの説明とともに、Atomic Agentsのエージェントとツールのための型付きの入力と出力のスキーマを設計できるよう支援します。
create-atomic-tool
6.3kAtomicAgentsアプリ向けに、エージェントが呼び出せる型付きツールを作成するのを支援します。
framework
6.3kAtomic AgentsのPythonフレームワークを正しく使えるよう、エージェントを支援します。スキーマ、エージェント、ツール、プロバイダー設定が対象です。
似ているスキル
add-model-provider
394k安全なセットアップコマンドで新しいAIモデルプロバイダーをOpenClawに接続し、APIキーを平文で残さず、ライブテストを行うようエージェントを支援します。
acp-router
394kClaude CodeやCursorなどのコーディングアシスタントに、OpenClaw経由でタスクを渡し、その作業がそのツール内で行われるようエージェントを支援します。
browser-automation
394kログイン、タブ、応答しなくなったページからの復旧を含め、Webページを段階的に操作するようエージェントに教えます。