Skip to content

Bots: generate each bot's Agent Card from its row and grants #87

Done

Description

@juancguerrerodev

Why

Spec docs/superpowers/specs/2026-11-25-multi-bot-design.md, 6.3: "Agent Card per bot: name, description (its role, short), skills (one entry per skill group it holds, with examples), capabilities (streaming: false, pushNotifications: true), version. Cards are generated by code from the bot's row and grants; the model never writes a card." PDR-030 repeats it. The bus skills will use the cards to tell the model which bots it can reach, and EP-21 (V2) will carry the same cards over A2A's network bindings.

It needs only wave 1's bot row, so it can start now.

What to do

  1. Write the failing tests first, in packages/core/test/agent-card.test.ts (new).
  2. Create packages/core/src/agent-card.ts (new) with agentCard(bot: Bot): AgentCard:
    • name: the bot's name;
    • description: the role, on one line and cut short with quoteSafe (packages/core/src/quote.ts), with the untrusted markers neutralized as botRoleText does in packages/model/src/prompt.ts;
    • skills: one entry per group in heldGroups(bot) (packages/core/src/bots.ts), never a group in RESERVED_GROUPS, each with the group as its id and a short English description with one example in each language, as code constants (cards are read by models, not shown on a screen);
    • capabilities: { streaming: false, pushNotifications: true };
    • version: a constant.
  3. Use A2A 1.0's field names for these fields. Leave out what only a network binding needs (an address, security schemes), with a comment that says so.
  4. Export it from packages/core/src/index.ts.

Done when

  • A test shows a card lists exactly the groups the bot holds, Hermit's lists every group but the reserved ones, and a grant change changes the card.
  • A test shows a role with </untrusted>, quotation marks or line breaks stays one safe line in description.
  • A test shows the same bot always gives the same card.

How to check

pnpm --filter @hermit/core test test/agent-card.test.ts
pnpm check:privacy && pnpm typecheck && pnpm lint && pnpm test

Depends on

Nothing.

Keep in mind

  • Code writes the card. The model never writes or edits one (spec 6.3).
  • No network and no signing: signed cards (JWS) are V2 (spec 6.3, "Later").
  • Made-up bots in tests (Viajes, Recetas, Noticias).

Activity

  1. added
    help wanted
    accepted
    agent-friendly
    on Nov 26, 2026
  2. added this to the Bots milestone on Nov 26, 2026
  3. santinofuentesAI commented on Nov 27, 2026

    @santinofuentesAI
    Contributor

    Taking this issue. Opening a pull request with agentCard(bot) in @hermit/core and all gates green.

  4. juancguerrerodev commented on Nov 27, 2026

    @juancguerrerodev
    ContributorAuthor

    Thanks, it's yours, and I'll review #133. 🦀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

acceptedagent-friendlyhelp wanted

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions