Use case · Employee support

Agents that answer from the policy in force today

The HR agent confidently quotes the parental leave policy. It is the one from 2024. The current one is in the same drive, one folder over, with a very similar title.

The mixture

01 · Persistent memory
Light
02 · Current context
Leads
03 · Traceable decisions
Uses
04 · Shared context
Uses
05 · Scoped retrieval
Uses
01 · What breaks

Three versions of every policy

Internal knowledge bases do not fail because the answer is missing. They fail because four answers are present and only one is true.

  1. 01

    Old and new look identical to search

    The superseded policy and the current one share ninety per cent of their words. Similarity cannot tell them apart, so the agent returns whichever chunk scored higher.

  2. 02

    Nobody deletes, everybody uploads

    Policy updates arrive as new files. The old ones stay, because someone might need them. The agent reads all of them as equally true.

  3. 03

    Regional variants collide

    The India leave policy and the US leave policy both answer "how many days do I get." Without scope, the employee in Bengaluru gets the California answer.

02 · What it's made of

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.

Leads · Current context

Only the version in force reaches the window

Each policy is stored with a stable fileName. When it changes, the old version is removed and the new one added, so the two never compete. Subtraction runs before ranking, and only the version in force reaches the window.

  • Superseded versions never reach the model.
  • Region and entity scopes are enforced.
  • Updates land without re-indexing everything.

Uses · Scoped retrieval

This employee's policy

Region, entity and employment type are intersected, so the answer fits the person asking.

Uses · Traceable decisions

Which document said so

Every answer carries the policy file it came from, for HR to verify.

Uses · Shared context

HR, IT and Finance agree

Benefits, laptops and expenses agents read one set of definitions.

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.

03 · What feeds it

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.

Google DocsWiki exportsHRIS (PostgreSQL)SlackBenefits PDFsAmazon S3
  1. 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.add
    import AlchemystAI from "@alchemystai/sdk";const client = new AlchemystAI(); // reads ALCHEMYST_AI_API_KEYawait client.v1.context.add({  context_type: "resource",  scope: "internal",  source: "hr-policies/leave-in",  documents: [{    content: "Parental leave (India), effective 1 April 2026: 26 weeks for birthing parents, 8 weeks for non-birthing parents.",  }],  metadata: {    fileName: "leave-policy-in.md",    groupName: ["hr", "policy", "india"],   // the sets this belongs to  },});
  2. 02 · Write

    Replace the policy, do not append it

    Policies change by replacement. Delete the superseded version, then add the new one under the same fileName, so the old text can never outrank the new.

    context.delete → context.add
    // Same fileName without a delete returns 409 Conflict, by design.await client.v1.context.delete({  organization_id: ORG_ID,  source: "hr-policies/leave-in",  by_doc: true,});await client.v1.context.add({  context_type: "resource",  scope: "internal",  source: "hr-policies/leave-in",  documents: [{ content: updatedPolicy }],  metadata: {    fileName: "leave-policy-in.md",    groupName: ["hr", "policy", "india"],    lastModified: "2026-04-01T00:00:00Z",  },});
  3. 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.search
    const { contexts } = await client.v1.context.search({  query: "How much parental leave do I get?",  scope: "internal",  similarity_threshold: 0.8,  minimum_similarity_threshold: 0.5,  metadata: { groupName: ["hr", "policy", "india"] },   // ∩ 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.

04 · Where it runs

Policy questions are employee data

Employees ask about leave, health, pay and performance. The questions, and the answers, are personal data. Keep them scoped per employee and region, encrypted, and deletable, with SSO in front of every agent that can read them.

Security & compliance
Deployment
  • Managed cloud

    Encrypted in transit and at rest, isolated per organization, and scoped at write time.

  • Dedicated infrastructure

    Enterprise

    Single-tenant, with VPC peering when your data cannot share a network boundary.

  • Self-hosted

    On-premise

    Run the context layer on your own infrastructure, with OpenTelemetry for observability.

Talk to us

Bring the policy question it gets wrong.

The one where the answer was right two years ago.