Hosted agent interfaces

What it does

apps/site hosts the public documentation and agent interfaces. A capability is one named action with shared input, output, and failure definitions and a server-side implementation.ΒΆ

Run a program instead of several calls

Use POST /api/execute with a JSON code string. The MCP execute tool runs the same job.ΒΆ

Code mode21 runs several capability calls in one program inside a restricted environment. joinInterest cannot run there.ΒΆ

Source: callable definitions in apps/mischief/src/capabilities/index.ts at 445b1a20b51a5492f8e586daeb9306e8011b7673, lines 34–45.ΒΆ

const found = await tools.search({ query: "cartridges", limit: 1 });
const page = await tools.read({ id: found.matches[0].id });
return { title: page.title, id: page.id };

The program passes the search result directly to read.ΒΆ

MCP supports protocol versions 2026-07-28, 2025-11-25, 2025-06-18, 2025-03-26, and 2024-11-05. The newest is stateless. Older clients initialize sessions backed by a Durable Object, Cloudflare’s feature for persistent state and compute.ΒΆ

A2A answers documentation questions through search and read. RPC means remote procedure call: a client calls a named operation on the server. Browser RPC serves the browser separately.ΒΆ

The standard

These routes exist today. A reusable cartridge36 for agent interfaces remains planned. A cartridge is a package for one job, with its implementation and required infrastructure.ΒΆ

Content asset cache

ContentStore shares completed catalogs, search indexes, learning decks, and graph views within one Worker isolate. Concurrent cold requests each perform their own asset reads. The cache stores a value only after its read and validation succeed. Failed or interrupted reads leave the cache empty.ΒΆ

Pending reads must not use a shared promise, fiber, latch, or response body. Those values can belong to the first request’s runtime context. Warm requests reuse decoded data without new asset I/O.ΒΆ

test/cold-content-runtime.test.ts sends concurrent first requests through a fresh local Worker. Its asset adapter adds a delay to make cold reads overlap. The test uses workerd, production content routes, and the reader wrapper.ΒΆ

How to check

  1. Read the MCP connection card.ΒΆ
  2. Read the A2A card.ΒΆ
  3. Read OpenAPI.ΒΆ
  4. Compare the descriptions with apps/site/src/capabilities/index.ts.ΒΆ
  5. Use the tools/list request in llms.txt.ΒΆ
  6. Search for a public document.ΒΆ
  7. Read the document.ΒΆ
  8. Run pnpm --filter @rat-stack/site test for protocol routing, rate limiting, and sandbox behavior.ΒΆ
  9. Confirm the live cards and capability list before advertising a new agent path.ΒΆ
  10. Run pnpm --filter @rat-stack/site exec vitest run test/cold-content-runtime.test.ts to check cold-request isolation.ΒΆ

Check a new deploy live as well as running local tests.ΒΆ

Sources

  1. Hosted application routes. GitHub joelhooks/rat-stack. Discovery, content negotiation, and protocol routing. Accessed 2026-10-01.
  2. Agent discovery content. GitHub joelhooks/rat-stack. MCP versions, connection examples, and discovery cards. Accessed 2026-10-01.
  3. Hosted capability registry. GitHub joelhooks/rat-stack. The hosted content and execute capability list. Accessed 2026-10-01.
  4. Code-mode Worker loader. GitHub joelhooks/rat-stack. Isolated execution and outbound network limits. Accessed 2026-10-01.
  5. Native rate limits. GitHub joelhooks/rat-stack. Request counters and per-stage namespaces. Accessed 2026-10-01.

Last changed 2026-10-10 in 978dccc. Source on GitHub. Change log.

Linked from

  1. Agent guide. An Effect stack so pure (aspirational) Kit Langton will blush.

    Hosted agent interfaces β€” Discovery documents, HTTP, MCP, A2A, and bounded code mode expose the public reference to agents.

  2. Change log. What changed in the files served here, newest first.

    Hosted agent interfaces β€” edited: docs: point live docs, skills and Brain pages at apps/site

  3. Full agent guide. An Effect stack so pure (aspirational) Kit Langton will blush.
  4. Rat Stack systems | rat-stack. The systems rat-stack ships, the standard each keeps, and how to check it.

    Hosted agent interfaces β€” Discovery documents, HTTP, MCP, A2A, and bounded code mode expose the public reference to agents.

  5. rat-stack. An Effect stack so pure (aspirational) Kit Langton will blush.

    The hosted agent interfaces run in Mischief; extracting them into a separate cartridge is still work to do.

  6. Source change history (log.md). The generated change log as Markdown.

    Hosted agent interfaces β€” edited: docs: point live docs, skills and Brain pages at apps/site

Unlinked mentions (1)