Porting Agent To Hub logo

Porting Agent To Hub

OrganizationPopular
amd
porting-agent-to-hub

Use when taking an existing in-repo GAIA agent to a published, day-one-usable hub package — porting a legacy agent under hub/agents/<id>/, deciding whether an agent should ship at all, or answering why an agent 'is not ready to publish'. Also use when an agent's manifest advertises capability its code does not deliver, or when an agent has a README but no SPEC/SKILL/CHANGELOG/SCORECARD.

Overview

Publisheramd
Repositorygaia
Skill nameporting-agent-to-hub
Stars
1.6K
Forks
176
Bundled files
Instructions only
LicenseMIT
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • Self-contained

    Everything the model needs lives in the instructions — no extra files to sync.

  • Open source

    Published by amd on GitHub. Read the source before you install it.

Installation

Install the Porting Agent To Hub AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/amd/gaia/tree/main/.claude/skills/porting-agent-to-hub
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

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/porting-agent-to-hub .claude/skills/porting-agent-to-hub
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Porting Agent To Hub in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Porting Agent To Hub on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Porting Agent To Hub is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

Porting an Agent to a Hub-Native Package

Take an agent that exists only as in-repo Python and make it a published package a user can install from the Agent Hub and use in Agent UI v2 immediately.

The email agent is the template — hub/agents/email/python/ + hub/agents/email/npm/ + .github/workflows/release_agent_email.yml. It is the only agent in the repo that clears the bar; every phase below points at the file in it you are mirroring.

This skill is the porting flow. For adjacent work use: gaia-build-agent (a NEW agent) · agent-hub-release (cutting the release) · adding-eval-scorecard (the scorecard mechanics) · integrate-hub-agent (consuming one from an app).

The Iron Rule

Generalize before you document.

Docs, SPEC, SKILL and SCORECARD written against behavior that is about to change are wasted work — and a scorecard is meaningless until the capability is stable. Phases run in order. Do not jump to the parity kit because it looks mechanical.

Phase 0 — Decide whether it should ship at all

Not every agent should be ported. Before any work, get a verdict: PORT / MERGE INTO <target> / DISCARD (keep as in-repo example) / DEFER.

Check for a more general agent that already covers the use case — in in the other hub agents, and in ChatAgent's profiles. Duplicating a capability into the catalog is worse than not shipping.

Signals it is not a catalog agent: category: examples / security_tier: experimental; absent from setup.py's AGENT_WHEEL_PACKAGES; no gaia.agent entry point; a module docstring saying it exists to validate some other feature; a named successor already in flight.

Phase 1 — Capability-truth audit

Read the manifest's description, tags, tools_count and interfaces:, then prove each claim against the code. Assume the manifest is lying until checked — in the 2026-07 fleet audit it was wrong for most agents, in both directions.

  • Does every advertised verb have a reachable tool? (An agent advertising CSV analysis that composes no file mixin cannot open a file.)
  • Does every conversation_starter have a tool behind it? Agent UI shows these as first-run prompts, so a starter for a missing capability means the user's first click fails. Worse than a stale description — check these first.
  • Does tools_count match the real @tool surface plus composed mixins? It lives in two places — gaia-agent.yaml and the build_registration() call in __init__.py. Check both; the registry copy is what the UI reads.
  • Do the agent's own defaults work end to end? (A language="python" default that fails a TypeScript-only validator is a mis-scope, not a bug.)
  • Does interfaces: claim a mode nothing serves — and is the dependency for that mode even declared? api_server/mcp_server need amd-gaia[api] in both pyproject.toml and the manifest's python.dependencies. Most agents declare the interface against plain amd-gaia, so the mode is not merely unimplemented, it is uninstallable — and it fails on a clean install, not in CI. word-count is the package that gets this right.
  • Are preflights checking the right thing? docker --version tests the binary; the agent needs the daemon. A preflight can be present and still wrong.

Record every gap. This list is the port's actual scope.

Phase 2 — Generalize and harden

  • Close every Phase 1 gap: implement the advertised capability, or narrow the manifest to the truth. Both are valid; shipping the mismatch is not.
  • Remove single-instance / single-machine assumptions — an author's own service schema baked into a system prompt is the canonical case.
  • Inject configuration instead of hardcoding paths, URLs, models, ports.
  • Fail loudly (CLAUDE.md): no except …: pass, no default-to-empty, no swallowed retry. Errors name what failed, what to do, and where to look.
  • Declare and preflight external dependencies (a daemon, a binary, credentials, VRAM). Check the service, not just the binary on PATH.

Phase 3 — Behavioral tests

The fleet-wide failure mode: tests import the agent, construct it, and assert a tool name appears in the registry. They never call a tool.

Every @tool needs a test that invokes it, over a fixture harness (temp FS, mocked network, temp scratchpad DB) with _TOOL_REGISTRY isolation. Cover the cold state a new user is in — empty index, empty DB, first run.

Phase 4 — Eval: corpus first, then scorecard

Two halves, and the expensive one is not the code:

  • The oracle (not automatable): a labelled, human-curated ground-truth corpus plus a deterministic fixture harness so the eval needs no live service and no LLM judge. Email's lives in tests/fixtures/email/ — _stub_inbox.mbox plus a per-task ground truth (action_items_, briefing_, drafting_, followups_, longthread_) driven through FakeGmailBackend. ls it; there is no single ground_truth.json.
  • The mechanism: the adapter, SCORECARD.md, the scorecard_gate.py wiring and a refresh workflow → use adding-eval-scorecard.

Pick the metric before starting, and prefer deterministic exact-match over a judge. Where no honest metric exists, say so in the scorecard rather than reporting a number that means nothing.

Beware the measurement trap: an agent_type in the scenario corpus may name a ChatAgent prompt profile, not your package. A green scenario can be measuring something else entirely.

Phase 5 — The parity kit (what email has)

SurfaceMirror from emailConsumed by
README SPEC SKILL CHANGELOG EVALUATIONhub/agents/email/npm/hub page + Agent UI (the Worker reads all of them)
CAPABILITY_MATRIX.mdpackaging/capability_matrix.pythe "what can it do" surface
SCORECARD.mdpackaging/gen_scorecard.pyrelease gate
server.py, api_routes.py, query_routes.py/health, /version, POST /v1/<id>/query (SSE)the daemon + UI chat
openapi.<id>.json, specification.htmlexport_openapi.py, spec_html.pythe contract
playground + playground_urlplayground_html.py"try before install"
packaging/freeze, stamp_version, smoke_test, lock, publishthe release
npm clienthub/agents/email/npm/src/integrators

Generate these; do not hand-write them per agent. Anything derivable from the manifest and the tool registry should be — tools_count especially. A number a human types is a number that drifts.

Doc-root gotcha: email's canonical docs live in its npm package, not the Python one. Do not assume python/README.md is the source of truth.

Phase 6 — Versioning and CI/CD

Each agent versions and ships independently.

  • One source of version truth (version.py), propagated by a stamp script, with a test asserting pyproject.toml ≡ gaia-agent.yaml ≡ version.py.
  • Tag namespace agent-pkg-<id>-v* — never v*, which fires the core release.
  • Its own test / eval / scorecard-refresh / release workflows, generated from the manifest. → agent-hub-release for the release lane itself.
  • After publishing, assert the live catalog entry matches the repo manifest for that version. Published-vs-repo drift is real and silent.

Phase 7 — Day-one usability gate

Publishing is not the finish line — usable on install is. Script it:

catalog index → install → daemon spawns the sidecar → /health passes → /query returns a rendered SSE stream in the UI → the playground URL loads.

If any step needs a human, the agent is not day-one usable. Also confirm an AgentSidecarSpec exists (or the spec table is manifest-driven), every declared renderTypes[] has a renderer with a fallback, and conversation_starters are present.

Red flags — stop and go back a phase

  • Writing SPEC/SKILL/SCORECARD while the capability is still being changed
  • Typing a tools_count by hand
  • A scorecard produced without a corpus, or with hand-authored numbers
  • "The tests pass" when no test calls a tool
  • Copy-pasting another agent's workflow instead of generating it
  • Porting an agent nobody gave a Phase 0 verdict for
  • Treating interfaces: api_server: true as satisfied because the manifest says so
  • Checking a capability claim in gaia-agent.yaml only — the same claims are duplicated, unguarded, in build_registration()
  • Concluding "it works" from a dev box that already has the extras installed

Reporting the port

The docs you write (README/SPEC/SKILL/CHANGELOG) and your report back to the user both follow CLAUDE.md → How You Communicate: lead with what the agent now does for a user and what still doesn't work, then the phase-by-phase evidence underneath. Name any gate you skipped — an unstated skip reads as a pass.

Reference

  • Template: hub/agents/email/python/, hub/agents/email/npm/
  • Generic 5-interface server (TUI/CLI/pipe/API/MCP, manifest-gated): src/gaia/agents/base/server.py — run_agent_cli()
  • Sidecar registration: src/gaia/daemon/sidecars/spec.py
  • Manifest parsing: src/gaia/hub/manifest.py
  • Catalog readers: workers/agent-hub/src/storage.ts
  • Scorecard format: docs/reference/eval-scorecard.mdx

Frequently asked questions

What does the Porting Agent To Hub AI skill do?

Use when taking an existing in-repo GAIA agent to a published, day-one-usable hub package — porting a legacy agent under hub/agents/<id>/, deciding whether an agent should ship at all, or answering why an agent 'is not ready to publish'. Also use when an agent's manifest advertises capability its code does not deliver, or when an agent has a README but no SPEC/SKILL/CHANGELOG/SCORECARD.

Why use Porting Agent To Hub on TypingMind?

Because you install it once and use it with any model. Porting Agent To Hub is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Porting Agent To Hub in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/amd/gaia/tree/main/.claude/skills/porting-agent-to-hub. TypingMind reads its SKILL.md and installs it as a skill you can enable per chat.

Which AI models can use Porting Agent To Hub?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Porting Agent To Hub?

As many as you like. As long as a model supports skills, you can use Porting Agent To Hub with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Porting Agent To Hub AI skill free?

Yes. It is published on GitHub by amd under the MIT license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇