troubleshoot
できること
Atomic Agentsのコードで起きるエラーを、手順を追って診断します。よくあるエラーメッセージを、既知の対処法と照らし合わせます。エージェントがクラッシュしたり、誤った結果を返したりする開発者向けです。
使う場面
- ✓エージェントの出力スキーマで検証エラーが出たとき。
- ✓エージェントの出力が空だったり、形式が崩れていたりするとき。
- ✓フレームワークを更新したあとに、インポートエラーが出たとき。
スキルのリンク
https://github.com/Eigenwise/atomic-agents/blob/main/claude-plugin/atomic-agents/skills/troubleshoot/SKILL.mdコピーしてAI(Claude、ChatGPT、Cursor)に貼り付け、指示に従うよう頼んでください。
使い方
いちばん簡単な方法:メッセージをコピーしてAIに貼り付けるだけ。AIがスキルを読んで指示に従います。
貼り付け用メッセージ
Claude Code、Codex、Cursorの場合:プロジェクトのフォルダで実行するとスキルがインストールされます。
SKILL.mdをダウンロードして、エージェントのスキル用フォルダに入れてください。
AIへの頼み方の例
“私のAtomic Agentsアプリで出力のValidationErrorが出ています。トレースバックを確認して、何が問題かを教えてください。”
毎週5つの新しいスキル。1分で読めます。
仕組み
スキルは、完全なエラーと、それを発生させるコードを尋ねます。メッセージを既知の原因と照合し、修正を適用して、失敗した例を再実行して確認します。
技術的な内容(元のSKILL.md)
作者による元のテキスト(英語)をGitHubからそのまま表示しています。
Troubleshoot an Atomic Agents App
Diagnostic workflow for the "it's broken" moment. Most atomic-agents failures are one of a dozen known causes with mechanical fixes. Match the symptom, apply the fix, verify by re-running.
Workflow
- Capture the failure. Get the exact traceback or wrong-output sample plus the code that produces it (agent construction, schemas, client wiring). If the user pasted only a fragment of the error, ask for the full traceback before guessing.
- Match against the symptom table below. The quoted strings are the framework's real messages — match on them.
- Apply the fix and re-run the failing snippet. Do not declare the problem solved without a passing re-run.
- No match? Load the reference for the failing area (table at the bottom) and reason from there. For a whole-codebase audit rather than one failure, delegate to the
atomic-reviewersubagent instead.
Symptom table
Import and definition errors
| Symptom | Cause | Fix |
|---|---|---|
ImportError/ModuleNotFoundError on atomic_agents.lib.*, atomic_agents.agents.base_agent, or BaseAgent |
v1 import paths, removed in v2 | Import from the top level: from atomic_agents import AtomicAgent, AgentConfig, BaseIOSchema, BaseTool; context pieces from atomic_agents.context |
ValueError: <Name> must have a non-empty docstring to serve as its description at import time |
BaseIOSchema subclass without a docstring |
Add a docstring describing the schema — it flows into the LLM prompt, so write it for the model |
ValidationError when constructing AgentConfig, complaining about client |
Raw provider SDK client passed; AgentConfig.client requires an Instructor-wrapped client |
Wrap it: instructor.from_openai(...), instructor.from_anthropic(...), instructor.from_genai(...) |
TypeError about missing type parameters, or output typed as BasicChatOutputSchema when a custom schema was expected |
AtomicAgent instantiated without generics |
Write AtomicAgent[InputSchema, OutputSchema](config=...) — the type parameters carry runtime information (they drive Instructor's response_model) |
Provider errors at run time
| Symptom | Cause | Fix |
|---|---|---|
Anthropic error mentioning max_tokens is required |
Anthropic requires it per request | model_api_parameters={"max_tokens": 4096} on AgentConfig |
| Gemini error about invalid role / role ordering | Gemini names the assistant role model |
assistant_role="model" on AgentConfig; use instructor.from_genai(...) with mode=Mode.GENAI_TOOLS and match AgentConfig.mode |
Empty output, None fields, or JSON-parse noise on Groq / Ollama / MiniMax |
Provider needs JSON mode; factory and config modes disagree | Create the client with Mode.JSON and set mode=Mode.JSON on AgentConfig — the two must always match |
| Works on OpenAI, breaks on another provider with no code change | Provider quirks live in AgentConfig, not the agent |
Check the per-provider matrix in framework/references/providers.md |
Wrong or degraded behavior (no exception)
| Symptom | Cause | Fix |
|---|---|---|
Pydantic ValidationError from inside run() after retries |
Model can't satisfy the output schema | Improve field description=s and the schema docstring first; loosen over-tight constraints; only then consider a stronger model. Inspect attempts via the parse:error hook |
| Agent "forgets" earlier turns | Fresh ChatHistory created per call, or none passed |
Create one ChatHistory and reuse it across run() calls |
| Context/cost grows without bound in long sessions | Unbounded history | Set max_context_tokens on AgentConfig — oldest turns are trimmed automatically |
Every run() is slow before the LLM call even starts |
Blocking I/O in a context provider's get_info() |
get_info() runs on every run(); move fetching out, cache, or make the provider hold precomputed state |
history.load(...) "doesn't work" |
Called as a classmethod | load is an instance method that mutates in place: history = ChatHistory(); history.load(saved). dump() returns a JSON string |
MCP interop
| Symptom | Cause | Fix |
|---|---|---|
AttributeError: STREAMABLE_HTTP |
No such member | MCPTransportType.HTTP_STREAM (others: SSE, STDIO) |
| MCP tools fetch but calls fail | Transport/endpoint mismatch | See MCP section of [framework/references/tools.md](../framework/referen |
よくある質問
エラーの全文が必要ですか?
はい。スキルは、原因を推測する前に、完全なトレースバックを求めます。
修正が効いたか確認してくれますか?
はい。スキルは、問題が解決したと判断する前に、失敗したコードを再実行するよう説明しています。
一覧にないエラーの場合はどうしますか?
スキルは、失敗している分野の参考資料を確認し、そこから原因を考えるよう説明しています。
詳細
作者による元の説明
Diagnose and fix a failing or misbehaving Atomic Agents app — import errors, schema validation failures, empty or malformed LLM output, provider role/mode errors, history and context problems, MCP transport errors. Use when the user reports an error, traceback, or wrong behavior in atomic-agents code, asks "why is my agent not working / crashing / returning garbage", or pastes a `ValidationError`, `ImportError`, or provider API error from an atomic-agents project.
repo: Eigenwise/atomic-agents
人気
- GitHubのスター
- 6.3k
- ランキング
- #14243
- ライセンス
- 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のイシューを探し、取り組むものを選び、修正を含むプルリクエストを開くようエージェントを支援します。レビューコメントへの対応も含みます。