Skip to content

Integrate with agents

You have a corpus. The last question is how an agent session actually reads it during a task - pulling the right doc, citing it, and failing loudly when a query resolves to nothing.

That read path is a solved problem, and it is documented in one place rather than two: Foundry's knowledge layer. Foundry ships the retriever skill that resolves query keys against a corpus through a strict ladder (MCP, then the pinned cache, then the package, then a loud halt), and Alloy publishes the manifest and MCP contract that skill reads. Re-documenting the query mechanism here would just be a second copy to drift; instead, this page points you at the authoritative one.

Start here

  • Query Alloy directly - the recipe for resolving corpus knowledge from an agent: the query-key grammar, how to cite what you resolve, and how to wire it into a task.
  • The knowledge layer - the concept: how the retriever resolves keys, how it honors a pinned { version, view }, and how a miss becomes measured telemetry rather than a silent guess.

What you already have from this guide

Everything the retriever needs is what the tutorial produced:

  • A corpus it can resolve against - your spoke under .alloy/, or a central pin from Installation.
  • The MCP server as the canonical access path - claude mcp add alloy-corpus -- npx @engineering11/alloy-mcp (see Installation).
  • A committed { version, view } where you consume a central corpus, so every query is deterministic - see Views and coverage.

For a spoke, the retriever's rung-0 behavior (a spoke category resolves against the local corpus and is terminal) is covered in Host your own corpus. Beyond that, the two Foundry pages above are the whole story.

E11 Alloy - knowledge as a build artifact.