Context and memory
Pass the evidence each step needs and distinguish a conversation from cross-run memory.
The next agent knows the context you give it, plus what its tools and environment make available. A handoff between agents is an explicit data-flow decision.
Choose what crosses the handoff
Raw material → researcher → typed brief → writer → draft
↑
selected facts + uncertaintyPassing a structured brief is often easier to inspect than forwarding an entire transcript. Keep sources and uncertainty attached to the relevant claims.
import { Schema } from "effect";
export const Brief = Schema.Struct({
question: Schema.String,
facts: Schema.Array(Schema.Struct({ claim: Schema.String, source: Schema.String })),
uncertainty: Schema.Array(Schema.String),
});
export function writingPrompt(brief: typeof Brief.Type): string {
return [
"Write a short draft from this brief.",
"Do not invent supporting evidence. Preserve material uncertainty.",
JSON.stringify(brief),
].join("\n\n");
}Pass writingPrompt(brief) to the writer's session. This function only assembles
context; it does not retrieve documents or store memory. Treat document contents
as evidence to assess, not instructions that can change the workflow's policy.
Conversation, files and memory
| Need | Mechanism |
|---|---|
| Follow-up in the same conversation | Another ask on the same continuous session |
| Independent assessment | A fresh session with selected context |
| Shared project files | A common workspace; each agent reads the needed files |
| Reusable instructions | Agent instructions and supported skills |
| Retrieval from your documents | A tool or activity you implement |
| Cross-run knowledge | Your application-owned store and retrieval policy |
There is no native cross-run memory API in published alpha.13. A long conversation is also not an unlimited context window. For long tasks, return typed progress such as completed tasks, pending tasks and the current plan, then choose what the next step receives.
If retrieval can change over time, record its result at an activity boundary when the run needs a reproducible snapshot. Keep a source revision or capture date with it. A URL alone does not preserve the page you read.
Skills are not a filesystem boundary
Docker supports selected injected skills. Local execution uses native installed skills and rejects injection. Neither “selected skills” nor a prompt proves that other instructions or tools are inaccessible.
Reference: Agent settings · Session prompts