Agent skill

GAIA Agent Builder

by amd in amd/gaia

Walks through scaffolding, writing and testing a new GAIA agent as a Python class with the SDK, from the base Agent subclass to registered tool methods.

MITAuto-check passedAI & LLM Engineering

Install GAIA Agent Builder

skills CLI
$ npx skills add amd/gaia --skill gaia-build-agent -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install amd/gaia gaia-build-agent --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/amd/gaia.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.claude/skills/gaia-build-agent .claude/skills/gaia-build-agent && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
gaia-build-agent
GitHub stars
1.6k
Token cost
~1.5k tokens
SKILL.md length
649 words
Files
1
Skills in repo
44
Repo updated
First seen
Licence
MIT

At a glance

Walks through scaffolding, writing and testing a new GAIA agent as a Python class with the SDK, from the base Agent subclass to registered tool methods.

  • Works in 8 steps: Scaffold. gaia agent init my-agent… → Write the Agent subclass. Inherit from… → Register tools with @tool. Each @tool… → …
  • Creating a brand-new GAIA agent class from scratch
  • SKILL.md covers The mental model, Steps, Then publish and Reference, plus 1 more section
  • Calls python

What it does

The skill covers building, not publishing, a GAIA agent: a single Python class inheriting from the base Agent class, which owns the agent loop, tool registry, state and error recovery so the author only writes the system prompt and the tools. The gaia agent init command scaffolds a starter package, with a --layout hub flag for a package meant to be published later, and the guidance is to mirror an existing package such as hello-world, word-count or email for structure.

Model selection defaults to leaving model_id unset so the agent uses the shared default model, since every agent sharing one model avoids an eviction and cold reload when switching between agents; a different model is set only when the agent genuinely needs one, such as an NPU-specific model when present. Each capability is registered as an @tool-decorated method whose docstring becomes the schema the model sees, and the skill insists tools return structured data or an actionable error rather than swallow exceptions into a placeholder. The excerpt breaks off while listing the remaining build steps, and publishing is explicitly handed off to a sibling agent-hub-release skill.

When your agent uses it

  • Creating a brand-new GAIA agent class from scratch
  • Scaffolding a publishable GAIA hub package for an agent
  • Registering tool methods on a new GAIA Agent subclass

Example prompts

  • “Scaffold a new GAIA agent called weather-lookup with the hub layout.”
  • “Write the Agent subclass for my new agent and register its first tool.”
  • “Test my new GAIA agent locally before handing it off for publishing.”

Requirements

  • The GAIA SDK and its agent init CLI

Workflow steps

8 steps, taken from the first numbered list in SKILL.md.

  1. Scaffold. gaia agent init my-agent generates a starter package at
  2. Write the Agent subclass. Inherit from Agent (or a closer base like
  3. Register tools with @tool. Each @tool method is a capability the LLM can
  4. Reuse, don't reinvent — compose mixins. Before writing file/web/RAG/shell/SQL
  5. System prompt. Implement _get_system_prompt() — state the agent's job, when
  6. Make it discoverable. An in-core agent is added to
  7. Test it — actually run it. Unit tests with a mocked LLM for tool logic
  8. Eval if it touches LLM behavior. If you wrote/changed a system prompt, tool

What it can do on your machine

Read from SKILL.md and the folder at commit 05fb50b. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • python

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

GAIA Agent Builder loads about 1.5k tokens when it runs. Until then it costs about 171 tokens; SKILL.md has 649 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~171
When it runs · the whole SKILL.md, loaded when a task matches
~1.5k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from amd/gaia at commit 05fb50b, republished under its MIT licence (© amd). 649 words, ~1,516 tokens.

Download SKILL.mdSave it as .claude/skills/gaia-build-agent/SKILL.md (or your agent's skills folder).
name
gaia-build-agent
description
Build a new GAIA agent with the SDK end-to-end: scaffold the package, write the Agent subclass, register @tool functions, compose reusable tool mixins, set the model + system prompt, and test it locally — then hand off to publishing. Use when creating a NEW agent (a Python class inheriting from the base Agent) for the GAIA repo or a user-authored package, not for tuning an existing agent's prompt (prompt-engineer), adding one tool to an existing class (python-developer), or shipping/releasing an already-built agent (use the agent-hub-release skill + docs/guides/hub-publishing.mdx). Pairs with the agent-hub-release skill: this one BUILDS, that one PUBLISHES.

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.

Show full SKILL.md (92 more words)Show less

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".

© amd, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in .claude/skills/gaia-build-agent of amd/gaia.

Open the folder on GitHubat commit 05fb50b

Compare with similar skills

GAIA Agent Builder next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

GAIA Agent Builder compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
GAIA Agent Builder this skillamd/gaia1.6k—~1.5kAutomated safety check: PassMIT
Swarms Multi-Agent Frameworkkyegomez/swarms7.2k—~5.5kAutomated safety check: PassApache-2.0
Pydantic AI Harnesspydantic/pydantic-ai20k—~4.9kAutomated safety check: PassMIT
Agent Squad Python Guide2FastLabs/agent-squad7.8k—~4.7kAutomated safety check: PassApache-2.0
Add Example AgentGetBindu/Bindu10k—~1.1kAutomated safety check: NotesCustom licence
Agent BuildershareAI-lab/lab-skills314—~1.4kAutomated safety check: PassApache-2.0

Similar skills

  • Teaches the Swarms Python framework: the Agent class, tools, loops, memory and multi-agent structures such as sequential, concurrent and graph workflows.

    7.2k GitHub stars~5.5k tokensUpdated yesterday
    AI & LLM EngineeringAuto-check passed
  • Pydantic AI Harness

    pydantic/pydantic-ai

    Official

    Adds optional capabilities to Pydantic AI agents from pydantic-ai-harness, led by Code Mode, which runs many tool calls as one sandboxed Python script.

    20k GitHub stars~4.9k tokensUpdated today
    AI & LLM EngineeringAuto-check passed
  • Agent Squad Python Guide

    2FastLabs/agent-squad

    Map of the agent-squad Python framework for async multi-agent orchestration: which agent, classifier, storage and tool provider to pick, and the pitfalls to avoid.

    7.8k GitHub stars~4.7k tokensUpdated yesterday
    AI & LLM EngineeringAuto-check passed
  • Add Example Agent

    GetBindu/Bindu

    Add a new self-contained example agent under examples/. An agent skill from GetBindu/Bindu.

    10k GitHub stars~1.1k tokensUpdated 1 mo ago
    AI & LLM EngineeringAuto-check: notes
  • Agent Builder

    shareAI-lab/lab-skills

    Helps design and build AI agents for any domain around a minimal loop of capabilities, knowledge and context, adding planning or subagents only when needed.

    314 GitHub stars~1.4k tokensUpdated 22 days ago
    AI & LLM EngineeringAuto-check passed
  • Cloudbase Agent Python

    TencentCloudBase/CloudBase-AI-Toolkit

    Build production-ready AI agent backends using the CloudBase Agent Python SDK — create agents with LangGraph/CrewAI/LlamaIndex, serve them via FastAPI with AG-UI protocol streaming +…

    1.1k GitHub starsUsed in 2 repos~2.9k tokens
    AI & LLM EngineeringAuto-check: notes

More from amd/gaia

All 44 skills in this repo
  • Adds a release eval scorecard to a GAIA hub agent by writing a harness adapter, running a real eval, and wiring the result into the agent's README and release gate.

    1.6k GitHub stars~2.6k tokensUpdated today
    Auto-check passed
  • Walks through releasing a GAIA sidecar agent as a frozen binary plus npm client through the tag-triggered Agent Hub CI pipeline, with a human gate before publishing.

    1.6k GitHub stars~3.6k tokensUpdated today
    Auto-check passed
  • Mines local Claude Code session transcripts with a deterministic Python pipeline to show what the agent is actually used for, how often it fails and what it costs.

    1.6k GitHub stars~2.3k tokensUpdated today
    Auto-check passed
  • Benchmarks AMD's GAIA agent against Claude Code and across models on quality, honesty, steps, tokens, time and real cost, using gaia eval tasks.

    1.6k GitHub stars~1.8k tokensUpdated today
    Auto-check passed
  • Guides safe code changes by finding the right file with grep or semantic search, reading before editing, reproducing bugs first, and proving a fix with a real test run.

    1.6k GitHub stars~2.1k tokensUpdated today
    Auto-check passed
  • Turns a source document such as a README or spec into an executive slide deck as one self-contained HTML file that prints to PDF, one slide per page.

    1.6k GitHub stars~1.7k tokensUpdated today
    Auto-check passed

Works with

Questions about GAIA Agent Builder

What does GAIA Agent Builder do?

Walks through scaffolding, writing and testing a new GAIA agent as a Python class with the SDK, from the base Agent subclass to registered tool methods. The skill covers building, not publishing, a GAIA agent: a single Python class inheriting from the base Agent class, which owns the agent loop, tool registry, state and error recovery so the author only writes the system prompt and the tools. The gaia agent init command scaffolds a starter package, with a --layout hub flag for a package meant to be published later, and the guidance is to mirror an existing package such as hello-world, word-count or email for structure.

When should I use GAIA Agent Builder?

GAIA Agent Builder fits situations like: creating a brand-new GAIA agent class from scratch; scaffolding a publishable GAIA hub package for an agent; registering tool methods on a new GAIA Agent subclass.

How do I install GAIA Agent Builder in Claude Code?

Run `npx skills add amd/gaia --skill gaia-build-agent -a claude-code`. Or copy the skill folder (.claude/skills/gaia-build-agent in amd/gaia) into .claude/skills/gaia-build-agent in your project. Claude Code loads it when a task matches its description.

How do I install GAIA Agent Builder in Codex?

Run `npx skills add amd/gaia --skill gaia-build-agent -a codex`. Or copy the skill folder (.claude/skills/gaia-build-agent in amd/gaia) into .agents/skills/gaia-build-agent in your project. Codex loads it when a task matches its description.

Can I use GAIA Agent Builder in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add amd/gaia --skill gaia-build-agent -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/gaia-build-agent, .gemini/skills/gaia-build-agent, .github/skills/gaia-build-agent and .opencode/skills/gaia-build-agent in your project.

What does GAIA Agent Builder need to run?

Going by SKILL.md and its folder, GAIA Agent Builder needs the command-line tools its instructions call (python). Our summary lists: The GAIA SDK and its agent init CLI.

Does GAIA Agent Builder access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is GAIA Agent Builder safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does GAIA Agent Builder use?

GAIA Agent Builder is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does GAIA Agent Builder use?

About 1.5k tokens (SKILL.md is roughly 6.1k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to GAIA Agent Builder?

Skills that share tags, products or a category with GAIA Agent Builder: Swarms Multi-Agent Framework (kyegomez/swarms, 7.2k stars), Pydantic AI Harness (pydantic/pydantic-ai, 20k stars), Agent Squad Python Guide (2FastLabs/agent-squad, 7.8k stars) and Add Example Agent (GetBindu/Bindu, 10k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains GAIA Agent Builder?

amd (a GitHub organization) maintains it in amd/gaia, which has 1,580 GitHub stars. The repository holds 44 skills in this directory. The repository was last updated on October 8, 2026.

Source: amd/gaia on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.