Skip to content

Agent Manifest

Use @bnomei/emdash-mika/agent when publishing or projecting Mika operation descriptors.

The manifest builder reads Mika’s operation descriptors and projects their agent metadata into a JSON document. Public operations include plugin JSON route metadata. Trusted, admin, and hidden operations describe policy expectations but do not become callable public routes by being included in a manifest.

Important surfaces include:

  • createMikaAgentManifest();
  • mikaAgentManifestJsonSchema;
  • MIKA_AGENT_MANIFEST_VERSION;
  • MIKA_AGENT_IDEMPOTENCY_KEY_HEADER;
  • MikaAgentActionDescriptor;
  • MikaAgentManifest;
  • MikaAgentOperationMetadata;
  • operation visibility, capability, risk, actor, proof, confirmation, and idempotency metadata.

By default, createMikaAgentManifest() includes public and trusted operations. The copied public endpoint in the runnable template calls createMikaAgentManifest({ include: ["public"] }) so /.well-known/mika-agent.json advertises only public, read-only route metadata. Use broader includes only behind a host-owned protected tool surface.

Each operation descriptor includes:

  • name, namespace, and method from Mika’s operation descriptor;
  • public and requiresRequestContext flags;
  • agent metadata, including visibility, capability, scopes, effect, risk, actor requirement, confirmation policy, idempotency policy, resources, and proof kinds;
  • route metadata only for public operations;
  • action metadata when the operation is available through Astro Actions.

If agent.idempotency is recommended or required, the metadata includes idempotencyKey.keyHeader with the Idempotency-Key header and marks the idempotency owner as host.

Include value Use it for
public Public manifest and .well-known/mika-agent.json metadata.
trusted Host-owned protected projections after auth, confirmation, idempotency, and provider policy exist.
admin Operator/admin projections, not storefront metadata.
hidden Internal/service operations that should not be advertised as tools.

The copied manifest endpoint should stay public-only unless the host has built the protected tool surface separately.

The package template ships pages/.well-known/mika-agent.json.ts for hosts to copy into src/pages/.well-known/mika-agent.json.ts. After copy, the host owns that Astro API route. It exports prerender = false and returns the public manifest, the JSON Schema id, a route base path of /_emdash/api/plugins/mika, and short protected-flow summaries for checkout and invoice/account reads. The seeded GitHub template carries the same endpoint as runnable example code.

The package also ships src/templates/astro/pages/llms.txt.ts and an agent-ready storefront example, but it does not ship a hidden hosted agent server or MCP server. Any ACP, MCP, OpenAPI, UCP, AP2, MPP, or similar protocol surface is a host-owned projection around Mika’s operation semantics.

  • ../emdash-mika/src/agent.ts
  • ../emdash-mika/src/api/agent-types.ts
  • ../emdash-mika/src/api/operation-agent-metadata.ts
  • ../emdash-mika/src/templates/astro/pages/.well-known/mika-agent.json.ts
  • ../emdash-mika/src/templates/astro/pages/llms.txt.ts
  • ../emdash-mika/src/templates/astro/examples/agent-ready-storefront.md
  • ../emdash-mika-template/src/pages/.well-known/mika-agent.json.ts