framework
できること
Atomic Agentsフレームワークの概要と、主な構成要素ごとの参考メモをまとめたものです。型付きの入力と出力を使ってLLMアプリを作るPython開発者向けです。
使う場面
- ✓PythonプロジェクトでAtomic Agentsを使っていて、正しい書き方を知りたいとき。
- ✓エージェント、ツール、コンテキストプロバイダーがどう連携するかを知りたいとき。
- ✓Atomic AgentsのプロジェクトにAIプロバイダーを接続したいとき。
スキルのリンク
https://github.com/Eigenwise/atomic-agents/blob/main/claude-plugin/atomic-agents/skills/framework/SKILL.mdコピーしてAI(Claude、ChatGPT、Cursor)に貼り付け、指示に従うよう頼んでください。
使い方
いちばん簡単な方法:メッセージをコピーしてAIに貼り付けるだけ。AIがスキルを読んで指示に従います。
貼り付け用メッセージ
Claude Code、Codex、Cursorの場合:プロジェクトのフォルダで実行するとスキルがインストールされます。
SKILL.mdをダウンロードして、エージェントのスキル用フォルダに入れてください。
AIへの頼み方の例
“私のAtomic Agentsプロジェクトでは、エージェント、ツール、スキーマはどのように連携しますか?”
毎週5つの新しいスキル。1分で読めます。
仕組み
スキルは、エージェント、その設定、スキーマ、ツールといった主要なクラスを一覧にします。作業に必要な分野ごとに、詳しい参考メモを案内します。
技術的な内容(元のSKILL.md)
作者による元のテキスト(英語)をGitHubからそのまま表示しています。
Atomic Agents Framework
Atomic Agents is a lightweight Python framework for building LLM applications with typed, structured input and output. It layers on top of Instructor and Pydantic so every interaction between user, agent, tool, and context is a validated schema.
This skill orients Claude on the framework and routes to focused reference files as the task requires.
Core abstractions
| Concept | Class | Role |
|---|---|---|
| Schema | BaseIOSchema |
Typed input/output contract — every agent/tool I/O is one |
| Agent | AtomicAgent[In, Out] |
LLM-backed transformer from input schema to output schema |
| Config | AgentConfig |
Wires client, model, history, prompt, roles, API params |
| Prompt | SystemPromptGenerator |
Three-section prompt: background, steps, output_instructions |
| History | ChatHistory |
Conversation state, serializable, token-counted |
| Tool | BaseTool[In, Out] |
Deterministic capability the agent can invoke |
| Context | BaseDynamicContextProvider |
Dynamic section injected into the system prompt at runtime |
All communication between these uses BaseIOSchema subclasses with docstring-required descriptions.
Canonical imports
from atomic_agents import (
AtomicAgent, AgentConfig,
BasicChatInputSchema, BasicChatOutputSchema,
BaseIOSchema, BaseTool, BaseToolConfig,
)
from atomic_agents.context import (
ChatHistory, Message,
SystemPromptGenerator, BaseDynamicContextProvider,
)
# Optional: MCP interop
from atomic_agents.connectors.mcp import fetch_mcp_tools, MCPTransportType
Do not use legacy paths like atomic_agents.lib.base.* or atomic_agents.agents.base_agent — those were retired. Import from the top-level package where possible.
Minimum viable agent
import os, instructor, openai
from atomic_agents import AtomicAgent, AgentConfig, BasicChatInputSchema, BasicChatOutputSchema
from atomic_agents.context import ChatHistory
client = instructor.from_openai(openai.OpenAI(api_key=os.environ["OPENAI_API_KEY"]))
agent = AtomicAgent[BasicChatInputSchema, BasicChatOutputSchema](
config=AgentConfig(
client=client,
model="gpt-5-mini",
history=ChatHistory(),
)
)
reply = agent.run(BasicChatInputSchema(chat_message="Hello"))
print(reply.chat_message)
AtomicAgent and BaseTool use PEP 695 generics — the type parameters carry runtime information, so write them explicitly and keep them accurate. Full runnable version: atomic-examples/quickstart/quickstart/1_0_basic_chatbot.py.
Targeted creation skills
For the four most common authoring tasks, dedicated atomic skills give a step-by-step workflow (clarify → write → verify → hand off) instead of just reference material. Prefer them when the user is actively building something specific.
| User intent | Atomic skill |
|---|---|
| "create a schema" / "design the input/output schema" | atomic-agents:create-atomic-schema |
"create an agent" / "add another agent" / "wire up an AtomicAgent" |
atomic-agents:create-atomic-agent |
"add a tool" / "wrap an API as a tool" / "build a BaseTool" |
atomic-agents:create-atomic-tool |
| "add a context provider" / "inject X into the prompt" / "wire up RAG" | atomic-agents:create-atomic-context-provider |
| "my agent is broken / crashing / returning garbage" + a traceback or error | atomic-agents:troubleshoot |
These skills auto-trigger on the matching phrasing. The reference files below are what they (and you) load for deeper material.
Decision routing
Pick the reference file that matches the task. Each is loaded only when read.
| Task | Reference |
|---|---|
| Design or validate an input/output schema | references/schemas.md |
| Build, configure, or run an agent | references/agents.md |
| Write a tool the agent will invoke | references/tools.md |
| Inject dynamic data into the system prompt | references/context-providers.md |
| Structure the system prompt | references/prompts.md |
| Coordinate multiple agents | references/orchestration.md |
| Manage conversation state and multi-agent memory | references/memory.md |
| Register telemetry, retries, or logging | references/hooks.md |
| Swap LLM provider or configure roles | [references/provi |
よくある質問
Atomic Agentsとは何ですか?
型付きで検証された入力と出力を使って、LLMアプリを作るための軽量なPythonフレームワークです。
何の上に構築されていますか?
スキルは、InstructorとPydanticの上に構築されていると説明しています。
マルチエージェント構成にも対応していますか?
はい。スキルは、複数のエージェントをまたぐオーケストレーションをフレームワークの一部として挙げています。
詳細
作者による元の説明
Guide for the Atomic Agents Python framework — schemas, agents, tools, context providers, prompts, orchestration, and provider configuration. Use when code imports from `atomic_agents`, defines an `AtomicAgent`, `BaseTool`, or `BaseIOSchema`, or the user asks about multi-agent orchestration or LLM-provider wiring in an atomic-agents project.
repo: Eigenwise/atomic-agents
人気
- GitHubのスター
- 6.3k
- ランキング
- #14241
- ライセンス
- MIT
- 更新日
- 2026/10/29
コメント
- …
このリポジトリの他のスキル
create-atomic-agent
6.3kエージェントが、型付きの入力と出力、システムプロンプト、選んだAIプロバイダーを持つ新しいAtomic Agentsのエージェントを作れるよう支援します。
create-atomic-context-provider
6.3kエージェントが、Atomic Agentsのエージェントにコンテキストのプロバイダーを追加し、時刻や取得した文書などの新しい詳細がプロンプトに現れるよう支援します。
create-atomic-schema
6.3kエージェントが、明確なフィールドの説明とともに、Atomic Agentsのエージェントとツールのための型付きの入力と出力のスキーマを設計できるよう支援します。
create-atomic-tool
6.3kAtomicAgentsアプリ向けに、エージェントが呼び出せる型付きツールを作成するのを支援します。
似ているスキル
diffs
394k編集内容の実際の共有可能な差分を、手書きの要約ではなく、ビューアーのリンクや画像ファイルとして作成するようエージェントを支援します。
coding-agent
394kCodex、Claude Code、OpenCodeに大きめのコーディング作業をバックグラウンドのワーカーとして渡し、その進捗を確認するようエージェントを支援します。
gh-issues
394kGitHubのイシューを探し、取り組むものを選び、修正を含むプルリクエストを開くようエージェントを支援します。レビューコメントへの対応も含みます。