Every agent answer, with its sources still attached
A regulator does not ask whether your agent is accurate on average. They ask why it said this, to this customer, on this date. "The model decided" is not an answer.
The mixture
- 01 · Persistent memory
- Light
- 02 · Current context
- Uses
- 03 · Traceable decisions
- Leads
- 04 · Shared context
- Uses
- 05 · Scoped retrieval
- Uses
Logs are not evidence
Most teams discover the gap during their first serious review, which is the worst possible time.
- 01
Prompts are logged, context is not
You kept every prompt and every reply. You did not keep which documents were retrieved, with what scores, under which rules. The reasoning is gone.
- 02
Answers cannot be reproduced
The knowledge base has changed since. Re-running the question today gives a different answer, so you cannot show what the agent saw on the day it acted.
- 03
Access is implicit
The agent could read the whole knowledge base, including documents the customer's own advisor was not entitled to see. Nobody noticed until an audit asked.
Mostly traceable decisions. 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.
Every answer keeps its receipts
Every retrieval is recorded as a Context Trace: the sources served, their scores and the rules applied. Traces are listed and exported through the API, so for any answer you can show what the agent knew, and why.
- Every answer is attributable.
- Evidence survives knowledge base changes.
- Scopes are recorded with the answer.
Uses · Scoped retrieval
Entitlements enforced at retrieval
Scopes are checked on every call, so the agent only sees what the user may see.
Uses · Current context
The rule in force on the day
Superseded rules are subtracted, and the trace records which version was used.
Uses · Shared context
One definition of "suitable"
Regulated terms resolve to the definition compliance owns, for every agent.
That is four of the five. The fifth, persistent memory (preferences and corrections survive the session, the handoff and the model swap), is what leads in Assistant agents, Commerce agents and EdTech & tutoring 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: "internal", source: "compliance", documents: [{ content: "Products rated risk level 5 may only be recommended to clients with a documented high risk tolerance assessed within 12 months.", }], metadata: { fileName: "suitability-policy-v7.pdf", groupName: ["compliance", "suitability", "in_force"], // the sets this belongs to },});02 · Write
Pull the trace, not just the log
When a review asks why an agent said something, list the traces. Each one records the sources, scores and rules behind the answer, ready to hand over.
context.traces.list// Every search is recorded as a Context Trace.const traces = await client.v1.context.traces.list();// Sources, scores and rules applied, for the reviewer.await exportForReview("REVIEW-2026-118", traces);03 · Search
Search before advising
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: "Can I recommend the growth fund to this client?", scope: "internal", similarity_threshold: 0.8, minimum_similarity_threshold: 0.5, metadata: { groupName: ["compliance", "suitability", "in_force"] }, // ∩ 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.
Regulated context stays where the regulator expects
Some context cannot leave a jurisdiction or a network boundary. Run on dedicated infrastructure with VPC peering, or self-host the context layer, and keep traces alongside the rest of your audit record.
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 answer you could not explain.
The one where the review asked why, and the logs could not say.