Gaia Build Agentのロゴ

Gaia Build Agent

組織人気
amd
gaia-build-agent

SDKを使ってGAIAエージェントを一から構築します。パッケージのひな形を作成し、Agentサブクラスを記述し、@tool関数を登録し、再利用可能なツールミックスインを組み合わせ、モデルとシステムプロンプトを設定してローカルでテストした後、公開作業に引き継ぎます。GAIAリポジトリまたはユーザー作成パッケージ向けに、新しいエージェント(ベースのAgentを継承するPythonクラス)を作成する場合に使用します。既存エージェントのプロンプト調整(prompt-engineer)、既存クラスへのツール追加(python-developer)、構築済みエージェントの出荷やリリース(agent-hub-releaseスキルとdocs/guides/hub-publishing.mdxを使用)には使いません。agent-hub-releaseスキルと併用します。このスキルは構築を担当し、もう一方は公開を担当します。

Add to TypingMind

概要

公開者amd
リポジトリgaia
スキル名gaia-build-agent
スター
1.6K
フォーク
176
同梱ファイル
指示のみ
ライセンスMIT
リンク
  • Markdown形式の指示

    モデルが必要に応じて読み込むSKILL.mdファイルです。関連するリクエストがあったときだけトークンを消費します。

  • どのLLMでも利用可能

    AIスキルはプロバイダー固有のコードではなく、通常のMarkdownなので、GPT、Claude、Gemini、Grok、ローカルモデルで利用できます。

  • 指示だけで完結

    モデルに必要なものはすべて指示に含まれているため、別途同期するファイルはありません。

  • オープンソース

    amdがGitHubで公開しています。インストールする前にソースを確認してください。

インストール

AIスキル「Gaia Build Agent」をTypingMindにインストールすれば、どのLLMでも利用できます。SKILL.mdを読み取れる別のAIエージェントに追加することもできます。

1

TypingMindにインストール

TypingMindはGitHubフォルダから直接スキルをインストールします。SKILL.mdを読み取り、リソースファイルをまとめてローカルに保存します。

  1. アプリを開き、「プラグイン」→「スキル」に移動します。
  2. 「GitHubからインストール」を選択します。
  3. 以下のスキルフォルダのURLを貼り付けて確定します。
    https://github.com/amd/gaia/tree/main/.claude/skills/gaia-build-agent
  4. スキルを利用したいチャットごとに、そのスキルを有効にしてください。
「プラグイン」→「スキル」→「スキルを追加」→「GitHubのURLから」を選択し、フォルダのURLを貼り付けて「続行」を押します。
2

別のAIエージェントにインストール

Agent Skills形式を読み取れるAIエージェントなら、このスキルを利用できます。フォルダをそのAIエージェントのスキルディレクトリにコピーしてください。

Claude Code — .claude/skills
git clone --depth 1 https://github.com/amd/gaia.git /tmp/gaia
mkdir -p .claude/skills
cp -r /tmp/gaia/.claude/skills/gaia-build-agent .claude/skills/gaia-build-agent
コピー後、新しいスキルを読み込むためにClaude Codeを再起動してください。

TypingMindで使用

TypingMindのチャットでGaia Build Agentを有効にするだけで、あとはモデルが対応します。名前と説明がシステムプロンプトに含まれ、関連するリクエストがあると、モデルが指示の全文を自動で読み込みます。手動で呼び出す必要はなく、実際に使用されるまでトークンを消費しません。

関連するリクエストがあるとすぐに、モデルが自動的にGaia Build Agentを読み込みます。

どのAIモデルでも利用可能

AIスキルはプロバイダー固有のコードではなく、通常のMarkdownで書かれた指示です。そのため、Gaia Build Agentは作成時に想定されたモデルに縛られません。TypingMindに一度インストールすれば、ご自身のAPIキーを使って、GPT-5、Claude、Gemini、Grok、DeepSeek、Mistral、Llama、またはご自身で実行するローカルモデルで利用できます。

  • 必要なときだけ読み込み

    システムプロンプトには名前と説明だけが含まれます。関連するリクエストが初めてあったときに指示を取得するため、スキルを使わない間は指示の読み込みにトークンを消費しません。

  • チャットの途中でモデルを切り替え

    スキルはコードではなく指示なので、モデルを切り替えてもそのまま使えます。次のモデルも同じSKILL.mdを読み込みます。

スキルの指示

モデルが読み込むSKILL.mdの内容です。スキルはモデルが従う指示なので、インストールする前に確認してください。

Building a GAIA Agent

How to take an idea to a working, testable GAIA agent — a Python class that runs locally on AI PCs. This skill covers build; publishing is its sibling agent-hub-release skill and the author guide docs/guides/hub-publishing.mdx. The full prose walkthrough is docs/guides/custom-agent.mdx.

Read CLAUDE.md first — the "No Silent Fallbacks", code-reuse, testing, and eval rules all apply to a new agent.

The mental model

A GAIA agent is one Python class that inherits from the base Agent (src/gaia/agents/base/agent.py) and exposes capabilities as @tool-decorated methods. The base class owns the agent loop, tool registry, state, error recovery, and (via mixins) MCP / OpenAI-API exposure — you write the prompt + the tools, not the plumbing. There are no YAML agent manifests for in-core agents (removed in v0.17.5); a publishable hub package adds a gaia-agent.yaml manifest on top (see the publish skill).

Steps

  1. Scaffold. gaia agent init my-agent generates a starter package at ./my-agent/. For a publishable hub package in this repo, add --layout hub so it lands at hub/agents/<id>/python/:

    bash
    gaia agent init my-agent -o hub/agents/ --layout hub

    Then mirror an existing package for structure: hello-world or word-count for a minimal one, email for a full published agent.

  2. Write the Agent subclass. Inherit from Agent (or a closer base like ChatAgent, which the flagship GaiaAgent extends). Leave model_id unset — that inherits the base default, Gemma-4-E4B-it-GGUF (DEFAULT_MODEL_NAME), which is right for nearly every agent. Every agent sharing one model is what keeps a single model resident, so switching agents never triggers an eviction + cold reload. Only set model_id when the agent genuinely needs a different model (e.g. the email agent picks the NPU model gemma4-it-e2b-FLM when one is present and servable), and say why. Keep the constructor thin.

  3. Register tools with @tool. Each @tool method is a capability the LLM can call; its docstring is the schema the model sees, so write it for the model (one line of intent + each arg). Return structured data or an actionable error — never swallow exceptions into a placeholder (No Silent Fallbacks).

  4. Reuse, don't reinvent — compose mixins. Before writing file/web/RAG/shell/SQL logic, check KNOWN_TOOLS in src/gaia/agents/registry.py: rag, file_io, file_search, shell, browser, scratchpad, code_index, vlm, sd, … Compose them by name instead of duplicating. New shared logic → add a mixin and register it in KNOWN_TOOLS.

  5. System prompt. Implement _get_system_prompt() — state the agent's job, when to use which tool, and the output contract. This is an LLM-affecting surface, so it's covered by the eval rule below.

  6. Make it discoverable. An in-core agent is added to src/gaia/agents/registry.py (and a gaia <cmd> subparser in src/gaia/cli.py if it's a CLI command). A hub package is auto-discovered from its gaia-agent.yaml manifest — no registry.py edit; just make sure the manifest's python.entry_module / entry_class point at your class.

  7. Test it — actually run it. Unit tests with a mocked LLM for tool logic (tests/), then run the real CLI a user would (gaia <cmd> ... or python my_agent.py) — never only the Python module. Follow the gaia-testing skill for real-world evidence.

  8. Eval if it touches LLM behavior. If you wrote/changed a system prompt, tool docstrings, the tool schema, the model, or error classification, you MUST run gaia eval agent against the relevant category before calling it done, and compare to a baseline only if one is committed for the same agent — none is yet, so report the scores you measured (CLAUDE.md eval rule). Unit tests don't catch LLM regressions.

Then publish

Once it runs and is documented (README/SPEC/SKILL per the doc-sync rule), ship it:

  • Standard wheel → Hub + PyPI (PR route, no token): the hub-publishing.mdx guide.
  • Frozen-binary + npm sidecar (like the email agent): the agent-hub-release skill.
  • Taking an agent that already exists to a publishable, Agent-UI-usable state (the parity kit, the generalize-before-documenting rule, the day-one gate): the porting-agent-to-hub skill.

Reference

Output style

Follow CLAUDE.md → "How You Communicate".

よくある質問

AIスキル「Gaia Build Agent」では何ができますか?

SDKを使ってGAIAエージェントを一から構築します。パッケージのひな形を作成し、Agentサブクラスを記述し、@tool関数を登録し、再利用可能なツールミックスインを組み合わせ、モデルとシステムプロンプトを設定してローカルでテストした後、公開作業に引き継ぎます。GAIAリポジトリまたはユーザー作成パッケージ向けに、新しいエージェント(ベースのAgentを継承するPythonクラス)を作成する場合に使用します。既存エージェントのプロンプト調整(prompt-engineer)、既存クラスへのツール追加(python-developer)、構築済みエージェントの出荷やリリース(agent-hub-releaseスキルとdocs/guides/hub-publishing.mdxを使用)には使いません。agent-hub-releaseスキルと併用します。このスキルは構築を担当し、もう一方は公開を担当します。

TypingMindでGaia Build Agentを使うメリットは何ですか?

一度インストールすれば、どのモデルでも使えるからです。Gaia Build Agentはプロバイダー固有のコードではなく、通常のMarkdownで記述されているため、同じスキルをGPT-5、Claude、Gemini、Grok、ローカルモデルで利用できます。チャットの途中でモデルを切り替えても、そのまま使い続けられます。TypingMindは自分のAPIキーで動作するため、シート単位のサブスクリプションではなく、プロバイダーに直接料金を支払います。スキルとチャットは自分のストレージに保持されます。

TypingMindにGaia Build Agentをインストールするにはどうすればよいですか?

TypingMindで「プラグイン」→「スキル」→「GitHubからインストール」を開き、https://github.com/amd/gaia/tree/main/.claude/skills/gaia-build-agentを貼り付けてください。TypingMindがSKILL.mdを読み込み、チャットごとに有効にできるスキルとしてインストールします。

Gaia Build Agentを使えるAIモデルはどれですか?

TypingMindに接続したどのモデルでも利用できます。AIスキルはプロバイダー固有のコードではなく、通常のMarkdownで書かれた指示です。そのため、GPT、Claude、Gemini、Grok、ローカルモデルのいずれも、リクエストの内容がこのスキルの用途に合ったときに、このスキルを読み込めます。

Gaia Build Agentで使えるAIモデルの数に制限はありますか?

数に制限はありません。スキルに対応したモデルであれば、GPT、Claude、Gemini、Grok、DeepSeek、Mistral、Llamaなど、どのモデルでもGaia Build Agentを利用できます。すべてTypingMind上で、自分のAPIキーを使って利用できます。

AIスキル「Gaia Build Agent」は無料ですか?

はい。amdがMITライセンスのもとでGitHubに公開しています。ご利用のAIプロバイダーに支払うのは、使用したトークンの料金だけです。

AIスキルとは何ですか?

AIスキルは、特定のタスクの実行方法をAIモデルに教える、再利用可能な指示のセットです。オープンなAgent Skills形式に従い、名前と説明を含むSKILL.mdファイルに加え、モデルが必要とするスクリプト、テンプレート、参照ファイルで構成されます。モデルはリクエストがスキルに合致したときだけ指示を読み込むため、インストール済みのスキルも、使うまでは費用がかかりません。

AIスキルは、プラグインやMCPサーバーとどう違いますか?

プラグインやMCPサーバーは、モデルが呼び出せる新しいツールを提供します。ツールとは、どこかで実行され、結果を返すコードです。一方、AIスキルは、タスクへの取り組み方、従うべき手順、望ましい出力の例といった知識や進め方をモデルに伝えます。スキルは通常のMarkdownで記述されているため、サーバー、APIキー、実行環境は不要で、どのモデルでも利用できます。

すべて見る

今すぐ自分専用のAIワークスペースを作成

ニュースレターに登録すると、新機能や今後のプレゼント企画のお知らせが届きます👇