Context engineering

Context engineering: what the model sees, decided.

A model knows what it is shown. Context engineering decides what that is — every turn, for every agent, the same way.

On Botminds the context for each turn is built, not typed: from named sources — who is asking, the project, the page, the conversation, the tools and data that exist — checked against the workspace, held to budgets you set, put in a cache-friendly order, and open to preview before any model reads it.

What is context engineering?

Context engineering is the practice of deciding exactly what a language model is given on each turn — instructions, facts about the user and the situation, conversation memory, retrieved material and tool descriptions — and in what order and amount. Prompt engineering tunes one piece of text; context engineering builds the whole input as a system: from sources, within budgets, checked for safety, and the same way every time.

Scales out on KubernetesServices and workers add capacity as work arrives, and give it back when it is done.
Built for millionsMillions of documents, records and agent runs — the indexes and workers grow with them.
Any cloud, any regionAzure, AWS, Google Cloud or on-premises, in the region your data must stay in.
Always onRedundant services, rolling releases and continuous backups, for mission-critical work.
Secure and governedSingle sign-on, encryption, least privilege and a sealed audit trail.
Context engineering vs prompt engineering

Context engineering vs prompt engineering: a build, not a string.

Prompt engineering asks “how should I word this?”. Context engineering asks “what should the model know right now — and what should it not?”. An agent working on live business data needs the second question answered on every turn.

Context providers

Where each piece of context comes from.

Each kind of context has one provider that writes it. Switch a provider on or off per agent, give it a tier and a priority, and configure it.

Stable first

Instructions and the parts that do not change between turns lead; the page, recent actions and the conversation follow.

Typed words stay data

A person’s own words enter as quoted data, with template syntax and forged system tags stripped — never as instructions.

Built for the assistant too

The platform assistant adds its own: honesty rules about system health, the contract for each kind of request, and its build steps.

Context window management

Context window management: tiers, budgets, priorities.

A context window is a budget, and every token in it competes with the answer. Each tier of context gets its own allowance, and when a tier runs over, a rule — not chance — decides what goes.

per block

Priority decides

Over budget, the lowest priority goes first — so “who is asking” outlasts “recent activity” on a crowded turn.

traceable

Every drop recorded

A strange answer can be traced to what the model did not see on that turn.

your choice

A note in its place

Choose to leave a short note of what was dropped, so the agent knows it exists.

Context engineering at scale

The same build for thousands of agents and conversations.

Context is assembled fresh on every turn, by every replica of the runtime, from each agent’s profile. Add replicas and the build scales with them — on Azure, AWS, Google Cloud or on-premises.

Progressive disclosure

Names first, details when needed.

An agent with many skills, tool servers and tables carries a name and one line for each, and fetches a full body only when it decides it needs one. The always-on part stays small however much the agent can use.

  1. Listed

    Each skill, prompt, sub-agent, tool server, table and dashboard appears as a name and one sentence.

  2. Chosen

    The model decides one of them fits this request.

  3. Fetched

    It asks for that resource’s full body by reference.

  4. Checked

    The body is served to a turn in the same project that listed it.

AI agent memory

AI agent memory: the latest messages, and a summary of the rest.

Long conversations break naive memory two ways: the transcript outgrows the window, or summaries of summaries drift until they say something nobody said. Botminds keeps two kinds of memory and never summarises a summary.

Choose the strategy

Automatic, keep-the-latest, or summarise-and-compact — per agent.

Choose the summary model

The agent’s own model, or a lighter one picked for summaries.

Stored with the conversation

The summary survives restarts and is read for its own conversation.

Compact on request

A person types /compact to fold the conversation down at once.

Variables

Variables at eight scopes: one agent, many teams.

Instructions carry variables filled in at run time from the right scope — so one agent serves every team with their own names, thresholds and wording, without a copy per team.

Instructions with variables
You are the claims assistant
for {{org_name}}.
You are helping {{user.name}},
a {{user.role}}.
Project: {{project.name | truncate: 40}}
On screen: {{page.section | default: "home"}}
Email: {{user.email | mask}}
  • system · globalThe running platform; values set for the project, like an organisation name.
  • user · projectThe person asking — name, email, role — and the project, by name.
  • page · conversationThe screen and selection; the conversation the turn belongs to.
  • action · toolWhat the person just did; the last tool’s result — switch on per agent.
  • Six filtersdefault, truncate, upper, lower, mask and json, applied left to right.
Profiles and templates

One profile per agent, six templates to start from.

Every choice above lives in one profile on the agent. Pick one of five templates in the Context tab — the sixth, Extraction, is set by the agent’s type — and change only what this agent needs; a profile you change is saved as Custom.

chat

Assistant default

Who is asking, the project, the page, the conversation, recent activity and the names of everything the agent can use.

chat

Project assistant

The same, for chat inside one project, with a narrower set of variable scopes.

documents

Document Q&A

Who is asking, the project and the conversation; the document arrives through the agent’s tools.

automatic

Extraction

Who is asking and the project — set by the agent’s type for extraction, classification and standardisation agents.

testing

Lab agent

Who is asking and the conversation, for agents being tried out.

standalone

Minimal

No providers — for an agent whose instructions stand alone.

Precedence. A profile set on the agent wins; with none, the agent’s type picks the template. Switch on more: collapse a block unchanged since the last turn, or have the agent show a plan and wait before it acts.

See it first

Preview the context before the model sees it.

Most agent failures are context failures, and most context failures are invisible. On Botminds the context is something you can look at — before a run, and after one.

  • PreviewPick a template, run it against a sample request, read every block with its tier and token count. No model is called.
  • TelemetryPer provider: what it added, what was dropped, and its failures.
  • ReplayPull up what an agent was given on an earlier turn, to explain an answer.
Context security

Guards on the context, before the model reads it.

Whatever enters the context reaches the model. So the checks run on each block as it is built — before the model, not after it has already read something it should not have.

And on the actions. Approvals on actions and tool grants complete the picture — see the agent harness and AI agent security.

Side by side

Context engineering vs RAG vs prompt engineering.

The three are often confused, and an agent needs all of them. They answer different questions.

Prompt engineeringRAGContext engineering on Botminds
The question it answersHow should the request be worded?Which passages are relevant?What should the model know on this turn, in what order and amount?
Unit of workOne piece of textA searchA build from many sources, every turn
Knows who is askingIf typed inIf the search filters by itAlways — and drops what they may not see
MemoryNot its concernNot its concernLatest messages word for word, one rolling summary
Size controlBy handTop resultsBudgets per tier; lowest priority dropped first, recorded
At scaleCopied per teamPer indexOne profile per agent, built the same way on every replica
Visible before a runThe text itselfRarelyA preview with every block and its token count

And harness engineering? Context is one part of the harness — the software around the model that also grants tools, asks people for approval and recovers from failures. See the agent harness; retrieval has its own article.

Questions people ask

Context engineering, answered.

More from the platform: the full architecture, and how security works at Botminds.

What is context engineering in AI?

Context engineering is deciding exactly what a language model is given on each turn — instructions, facts about the user and situation, memory, retrieved material and tool descriptions — and in what order and amount. It treats the model’s input as something built by a system, not typed by hand.

What is the difference between context engineering and prompt engineering?

Prompt engineering improves the wording of a request. Context engineering decides everything else the model sees: who is asking, what is on screen, what was said before, which tools exist and how much of each fits. On Botminds the prompt is one input to that build.

Is context engineering the same as RAG?

No. RAG finds relevant material in your sources. Context engineering decides the rest of what the model sees and how it fits a budget. On Botminds search runs as the agent’s own tool calls, under the read rules of the person asking — see agentic RAG.

How does AI agent memory work on Botminds?

Two kinds: the latest messages, kept word for word, and one rolling summary of everything older. When the conversation grows past its history budget, older messages are folded into a fresh summary that replaces the last one. You choose the strategy and the summary model per agent.

How do you manage the context window of an LLM?

Split the context into tiers, give each a budget, give every block a priority, and drop the lowest first when a tier runs over — recording what was dropped. Keep stable parts first so they can be cached, and load long instructions only when needed.

Does context engineering scale to thousands of agents?

Yes. Each agent carries one profile, and every replica of the runtime builds context from it the same way on every turn. Memory is stored with the conversation, so any replica can take the next turn, and replicas scale out as conversations grow.

What is harness engineering, and how does it relate?

Harness engineering improves an agent by changing what surrounds the model — tools, context, checks and recovery — rather than the model. Context engineering is one part of it. See the agent harness.

Can I see exactly what context an agent will get?

Yes. The Context tab of every agent has a preview that builds the context for a sample request and lists every block with its tier and token count, without calling a model. Earlier turns can be replayed too.

Does the context include personal data?

It includes what the agent needs, such as the name and role of the person asking. Blocks from another workspace are dropped. Switch on masking for an environment and email addresses, phone numbers and card numbers are masked in every block.

What is an example of context engineering?

A claims adjuster on a claim page asks “why is this one stuck?”. The context carries who she is, the project, the claim on screen, her last few actions and the conversation so far — so the agent knows which claim “this one” means without being told.

See what your agent actually sees.

Bring one agent your team relies on. We’ll open its context, turn by turn, and show you what it was given — and what it was not.