• Tool
  • AI and intelligent systems
  • Beta

Context Architect

Plan the context an AI system receives in clear sections, check it for common mistakes and see its token budget. Nothing is sent to a model.

Context Architect workspace

Loading Context Architect…

How your data is handled

Context Architect runs in your browser. The text and files you use are processed on your device and are not sent to Digital Campaign or anyone else.

Nothing you enter is saved. Reloading or closing the page clears it.

Limits: Up to 5 MB of text and 100 sections. Nothing is saved: export a JSON file to keep your work.

If you accept analytics, we count visits to this page. We do not record what you enter. Your browser, its extensions and your device are outside our control.

What Context Architect does

Context Architect helps you plan the context an AI system receives: the instructions, the role, the rules, the reference material, the examples and the format you want back. You build it as a set of named sections, put them in order, and see how many tokens each one uses against the model's limit.

As you work, it checks the context for common problems, such as a missing role, an empty section or text that appears twice. When you are happy, export it as Markdown or XML to paste into a prompt or a system setting, or as a JSON file you can import again later.

It never connects to an AI model. Everything you type stays in your browser and nothing is saved, so you can work on internal instructions and data safely.

Why structure matters

Many problems with AI answers start in the context. A model that is unsure of its role gives vague answers. Rules buried halfway through a long document get missed. Reference data with no clear label gets mixed up with the instructions. Our guide to context engineering explains the approach in detail, and how context engineering is transforming AI reliability shows why it matters for systems you depend on.

Splitting a context into clear sections makes it easier to write, review and change. A colleague can check the policies without reading the examples. You can switch the memory section off to test without it. And you can see at a glance which part is using most of the budget.

The eight kinds of section

  • System instructions: what the system is for and how it should behave overall.
  • Role and objectives: who the model is and what it is trying to achieve.
  • Policies and constraints: the rules it must follow, such as what it may not say or do.
  • Knowledge and reference data: the facts it should use, such as prices, opening hours or product details.
  • Examples: sample questions and good answers, which show the style you want.
  • Conversation memory: what it should remember from earlier, such as a summary of the last session.
  • Tools: the actions an agent can take, with what each one needs and returns.
  • Output contract: the exact format of the answer, such as a JSON shape, a word limit or a set of headings.

You do not need all eight. A simple assistant may only need a role, some knowledge and an output contract. Rename any section to suit your work.

How to use it

  1. Start from a template. Choose a customer assistant, a data extraction task, an agent with tools, or a blank set of sections. You can also import a context you saved before.
  2. Set the budget. Enter the model's context window and how many tokens to keep free for its answer, then choose a token counter.
  3. Write and arrange the sections. Edit the title and content of each one. Use Move up and Move down to change the order, switch a section off to leave it out, or delete it. Add new sections by kind.
  4. Read the checks. The checks update as you type. Each one says what the problem is, and Go to section takes you to it.
  5. Export. Download or copy the result as Markdown or XML for your prompt, or as JSON to keep and import again.

The checks

The checks are simple rules that always give the same answer for the same context. They do not use AI, so they cannot judge whether your instructions are good. They catch the mistakes that are easy to make and easy to miss.

  • Missing role: no section says who the model is.
  • Missing output contract: no section describes the answer you want.
  • Empty section: a section is switched on but has no content.
  • Repeated text: the same line, of 40 characters or more, appears twice. Repeats cost tokens and can give a rule more weight than you meant.
  • Over budget: the sections plus the response allowance do not fit in the context window.
  • Small response allowance: less than 15% of the window is kept free for the answer, so long answers may be cut short.
  • Broken JSON: the output contract shows a JSON example that is not valid, which a model may copy.

How tokens are counted

Each section is counted as it appears in the Markdown export, with its heading. The two OpenAI counters, o200k_base and cl100k_base, give exact counts. For other models, including Claude and Gemini, whose tokenisers are not public, the estimate uses one token for every four characters and every number it gives starts with About. The counting runs in your browser using gpt-tokenizer, an open source library under the MIT licence.

The total is a close guide to what a model will receive. Your own system may add a little more, such as the text between sections or the format of a chat message.

Limits and privacy

  • The whole context can be up to 5 MB of text, with up to 100 sections.
  • Nothing is saved in the browser. Reloading or closing the page clears your work, so export a JSON file to keep it.
  • The page's security settings stop it from connecting to any other server, and it never sends your text to an AI model.

Questions people ask

Does the order of sections matter?

Yes. Models tend to pay most attention to the start and the end of a long context. Put the role and the most important rules near the top, and the output contract at the end, close to where the model starts writing.

Should I use Markdown or XML?

Both work well with current models. Markdown is easier to read and edit. XML tags make the edges of each section very clear, which helps when sections contain long documents or examples that look like instructions.

Can I use this with an agent framework?

Yes. Export the Markdown or XML and paste it into the system prompt or instructions setting of your framework or AI platform. Keep the JSON file, so you can change the context later and export it again.

Will my work be saved if I close the page?

No. Version 0.1 keeps nothing in the browser. Export a JSON file before you leave, then import it next time.

Version 0.1.0. Last updated 29 November 2026.

Send feedback or report a problem