Docs agents that answer for the version the customer runs
Your customer is on v2. Your docs agent answers from v3, the version with the renamed endpoint. The answer is correct, and completely useless to them.
The mixture
- 01 · Persistent memory
- Uses
- 02 · Current context
- Leads
- 03 · Traceable decisions
- Uses
- 04 · Shared context
- Light
- 05 · Scoped retrieval
- Uses
Every release makes the agent a little more wrong
Docs are versioned by nature, and retrieval is version-blind by default.
- 01
Versions overlap
v2 and v3 docs share most of their text. The agent retrieves whichever is closer to the phrasing of the question, which has nothing to do with the version the user runs.
- 02
Deprecated pages keep ranking
The deprecated guide has three years of examples and forum answers pointing at it. It outranks the new page on every query that matters.
- 03
Changelogs are not read
The breaking change is documented in one changelog line. The agent never connects that line to the forty pages it invalidates.
Mostly current context. Then three others.
Every application on Alchemyst is a different mixture of the same five jobs. That mixture is what makes this a different piece of software from the one next to it, even though the API underneath is identical.
Only the version in force reaches the window
Each page is stored with its product version. The user's version is intersected in and deprecated pages are subtracted before ranking, so the answer fits the software actually installed.
- Answers match the installed version.
- Deprecated pages stop ranking.
- Breaking changes surface with the pages they affect.
Uses · Scoped retrieval
This product, this version
Product and version scopes are intersected, so v2 users get v2 answers.
Uses · Traceable decisions
Link the source page
Every answer carries the page it came from, so users can check and your team can fix.
Uses · Persistent memory
Remember the customer's setup
Their SDK, region and plan are remembered, not asked again on every question.
That is four of the five. The fifth, shared context (what one agent learns, the next one already knows, on the same definitions), is what leads in Sales agents, Customer success and Enterprise operations instead. Same API, different mixture.
The sources you already have
Bring sources in through the data-source integrations (PostgreSQL, MongoDB, Google Docs, Google Sheets, Amazon S3), an n8n workflow, or a direct context.add call. Each one lands scoped, so retrieval can intersect it with everything else.
01 · Ingest
Scope what you ingest
Every document lands with a groupName: the sets it belongs to. Those sets are what retrieval intersects later, so the structure you choose here is the precision you get there.
context.addimport AlchemystAI from "@alchemystai/sdk";const client = new AlchemystAI(); // reads ALCHEMYST_AI_API_KEYawait client.v1.context.add({ context_type: "resource", scope: "external", source: "docs", documents: [{ content: "API v3: tokens are issued by POST /v3/auth/token. The /v2/login endpoint is removed.", }], metadata: { fileName: "v3/auth/tokens.md", groupName: ["docs", "api", "v3"], // the sets this belongs to },});02 · Write
Mark the version, not just the page
When v3 ships, v2 pages do not disappear. Keep them in their own version scope, so v2 users still get v2 answers and v3 users never see them.
context.addawait client.v1.context.add({ context_type: "resource", scope: "external", source: "docs", documents: [{ content: v2LoginPage, status: "deprecated" }], metadata: { fileName: "v2/auth/login.md", groupName: ["docs", "api", "v2"], lastModified: "2025-11-03T00:00:00Z", },});03 · Search
Search before answering
Search intersects the scopes, subtracts superseded and duplicate content, and ranks what survives. Only that reaches the model, and the whole decision is recorded as a Context Trace.
context.searchconst { contexts } = await client.v1.context.search({ query: "How do I get an access token?", scope: "external", similarity_threshold: 0.8, minimum_similarity_threshold: 0.5, metadata: { groupName: ["docs", "api", "v2"] }, // ∩ narrow scope});// − superseded, deduplicated → ranked → into the window// Every search is recorded as a Context Trace.const reply = await llm.respond(message, { context: contexts });
npm install @alchemystai/sdk or pip install alchemystai, both ship the same client. Full reference in the docs.
Public docs, private questions
Docs are public, but what customers ask about them is not. Publish documentation through external scope, and keep questions, setups and account details in internal scope.
Security & complianceManaged cloud
Encrypted in transit and at rest, isolated per organization, and scoped at write time.
Dedicated infrastructure
EnterpriseSingle-tenant, with VPC peering when your data cannot share a network boundary.
Self-hosted
On-premiseRun the context layer on your own infrastructure, with OpenTelemetry for observability.
The same API, a different mixture
Each of these leads with a different job, pulls from a different set of sources and needs a different call. All of them, by job.
Bring the docs question it answers for the wrong version.
The one your support team corrects every week.