
Signal Studio field guide
Context Engineering in Production
Designing Memory, Retrieval, State, Provenance, and Long-Running Agent Workflows
A systems guide to compiling trustworthy working context while governing memory, durable state, provenance, retrieval, and side effects across long-running agent workflows.
For: agent application architects, workflow platform engineers, AI security engineers
What this book helps you do
This book treats context as a governed runtime view, not a long prompt or transcript. It separates the model's working context from persisted memory, authoritative workflow state, retrieved evidence, and execution effects, then shows how provenance, time, permissions, budgets, and durable recovery determine what an agent may know and do.
Problems this book helps you solve
- Conversation history is being used as the workflow database.
- A summary silently becomes a fact, instruction, or authorization decision.
- Memory records lack provenance, expiry, tenant scope, or a correction path.
- Retrieval returns relevant text but cannot show which source version supported a claim.
- A timeout causes the agent to repeat a side effect because completion is unknown.
- Long-running work cannot resume safely after process, network, or model failure.
Decisions you will be able to make
- Which facts enter the working context and which remain outside the model boundary.
- What belongs in memory versus authoritative application or workflow state.
- How to rank, compress, expire, and attribute context under a finite budget.
- How to preserve source, time, authority, and transformation history for retrieved evidence.
- How to design idempotency, effect receipts, reconciliation, and durable resume behavior.
- Where trust labels and permissions must restrict memory, retrieval, and action.
Who this book is for
- Teams moving an agent from a short demo into multi-turn or long-running production work.
- Architects deciding how model context interacts with databases, workflow engines, retrieval, and identity.
- Security and platform teams reviewing cross-tenant memory and side-effect boundaries.
Who this book is not for
- Projects that only need a one-shot prompt with no persisted state or external effects.
- Readers looking for one framework-specific memory API without an underlying systems model.
Reading path
- Separate the planesDistinguish working context, application state, memory, evidence, policy, and effect history.
- Compile context under a budgetReserve output capacity and select evidence by task value, provenance, freshness, and risk.
- Govern memoryDefine write admission, scope, confidence, expiry, correction, and deletion rules.
- Treat retrieval as a supply chainPreserve source identity, versions, transformations, timestamps, and trust labels.
- Make state authoritativeKeep workflow truth outside the transcript and express transitions as typed, durable records.
- Make effects honestUse operation keys, receipts, reconciliation, and compensation for ambiguous completion.
The context window is a view, not the system
Production agents operate across databases, queues, retrieval indexes, identity systems, workflow engines, and external tools. The model sees a selected representation of that system. Treating the representation as the system creates stale facts, repeated effects, and authority mistakes.
Design for recovery before autonomy
The book begins with state and evidence contracts because long-running autonomy magnifies ambiguity. Resume, retry, cancellation, and human takeover should be designed before an agent is permitted to cause durable effects.
Use it with
Inventory every store and transition in one representative workflow. Mark its system of record, retention, trust level, writer, reader, and recovery behavior before changing prompts.
Evidence and method
The book maps vendor-neutral system boundaries to official protocol and platform documentation where appropriate. It does not present one provider's session or memory abstraction as a universal definition. Examples are synthetic and designed to expose failure semantics; claims about what happened require state records and effect receipts, not a plausible transcript.
Read a sample
Signal Studio does not reproduce manuscript chapters on this site. Open the Amazon listing to use Read Sample or Kindle Instant Preview
Resources
- Agent run envelope schema (JSON Schema, v1.0.0)
Errata and related guidance
English editorial review: Codex native-English editorial review, .
