gaia-build-agent

Scaffold, implement, and test new GAIA agents as Python Agent subclasses with @tool methods.

1.6k|168|Updated Dec 16, 2024
One-click install
npx skills add https://github.com/amd/gaia --skill gaia-build-agent-amd
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: gaia-build-agent
Source: https://github.com/amd/gaia/tree/main/.claude/skills/gaia-build-agent
Command: npx skills add https://github.com/amd/gaia --skill gaia-build-agent-amd

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Building a new GAIA agent requires knowing the framework's conventions: inheriting from the base Agent class, registering @tool-decorated methods, composing reusable tool mixins, setting system prompts, and wiring up discovery. This Skill guides the entire build workflow so a new agent runs locally and passes tests without reinventing plumbing. ## Core Features & Use Cases - End-to-End Scaffolding: Uses gaia agent init to generate a starter package, with a --layout hub option for publishable hub packages. - Agent Implementation Guidance: Covers writing the Agent subclass, registering @tool functions with model-facing docstrings, composing KNOWN_TOOLS mixins (rag, file_io, shell, browser, etc.), and implementing _get_system_prompt(). - Testing and Eval Discipline: Enforces running the real CLI, unit-testing tool logic with a mocked LLM, and running gaia eval agent against baselines whenever LLM-affecting surfaces change. - Use Case: You want to add a new in-core agent to the GAIA repo. The Skill walks you from gaia agent init my-agent through registry wiring, real CLI testing, and eval comparison, then hands off to the agent-hub-release skill for publishing. ## Quick Start Ask the AI to build a new GAIA agent named my-agent, scaffold it with the SDK, register its tools, and test it through the real CLI.

Frequently Asked Questions about gaia-build-agent

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I create a new GAIA agent in Python?

Run `gaia agent init my-agent` to scaffold a starter package, then write a class inheriting from the base Agent in src/gaia/agents/base/agent.py. Register capabilities as @tool-decorated methods and implement _get_system_prompt() to define the agent's behavior.

How do I register tools for a GAIA agent?

Decorate methods with @tool; the docstring becomes the schema the model sees, so write one line of intent plus each argument. Before writing new logic, check KNOWN_TOOLS in src/gaia/agents/registry.py and compose existing mixins like rag, file_io, shell, or browser.

Should I set model_id when building a GAIA agent?

Leave model_id unset so the agent inherits the base default, Gemma-4-E4B-it-GGUF. Sharing one model across agents keeps a single model resident and avoids eviction and cold reloads when switching agents. Only override it when the agent genuinely needs a different model.

How is a hub package agent discovered differently from an in-core agent?

In-core agents are added to src/gaia/agents/registry.py and optionally get a CLI subparser. Hub packages are auto-discovered from their gaia-agent.yaml manifest, so no registry edit is needed as long as python.entry_module and entry_class point at your class.

When do I need to run gaia eval agent for a new agent?

Run it whenever you write or change LLM-affecting surfaces: system prompts, tool docstrings, tool schemas, the model, or error classification. Compare results against the committed baseline, since unit tests with a mocked LLM do not catch LLM behavior regressions.

When should I not use the gaia-build-agent skill?

Do not use it for tuning an existing agent's prompt, adding a single tool to an existing class, or releasing an already-built agent. Those cases belong to prompt-engineering work, general Python development, or the agent-hub-release skill respectively.