Skip to main content
Two-tier skill discovery: public skills appear on the well-known card, private skills only surface to allowlisted partner DIDs.

Code

Create acme-compliance-agent.py with the code below, or save it directly from your editor.

Skill Configuration

Create skills/public-greet/skill.yaml (advertised on the public catalog):
Create skills/cbam-line-classify/skill.yaml (only visible to allowlisted DIDs):
The other two manifests (skills/public-status/skill.yaml and skills/eudr-due-diligence/skill.yaml) follow the same shape — public ones go into skills, private ones into private_skills.

How It Works

Two-tier skill catalog
  • skills: skills listed here go on GET /.well-known/agent.json, the unauthenticated public agent card every Bindu discovery client reads.
  • private_skills: identical manifest shape, but these only appear on GET /agent/private.json. The public card never mentions them.
  • The private endpoint returns the merged catalog (public + private) when authorized, so allowlisted partners see the full product surface in one call.
Allowlist enforcement
  • allowed_dids: a list of partner agent DIDs (did:bindu:org:agent:id). Only callers whose request is signed by one of these DIDs get a 200 on /agent/private.json.
  • No token at all → 401.
  • Valid token but DID not on the allowlist → 403.
  • Valid token + allowlisted DID → 200 with the merged catalog.
  • The gate runs on the agent card endpoint, not on message/send. To gate the handler itself by caller DID, inspect the request context inside handler and short-circuit.
expose=False for B2B endpoints
  • The example sets deployment.expose = False so the agent stays out of any public Bindu discovery index — it’s intended as a partner-only endpoint that interested parties learn about out-of-band, then fetch /agent/private.json to see the real surface.
Why use it
  • Lets you advertise a generic public face (greet, status) while keeping proprietary capabilities (CBAM classification, EUDR due-diligence) reserved for partners you’ve explicitly authorized.
  • No fork in the handler logic, no separate agent — same Bindu agent, two visibility tiers on the catalog.

Dependencies

No LLM, no API key — pure protocol demo.

Environment Setup

No environment variables are required to run the demo. To exercise the gated path with real auth, set:
With AUTH__ENABLED=false the private endpoint is reachable without a token (the gate is skipped); flip auth on to enforce the allowlist.

Run

Inspect both surfaces:

Example API Calls

Returns only the public skills:
Returns the merged catalog (public + private) when the DID is on allowed_dids:
Without the bearer token you get 401; with a valid token from a DID not on the allowlist you get 403.

Frontend Setup

Open http://localhost:5173 and try to chat with the ACME compliance agent. The frontend will only see the public skills (greet, status) — to exercise the private surface, sign requests with a DID on the allowlist.