01
Bounded prompt windows
Declare turn and token limits so context assembly remains predictable.
Agent Primitives /Context = Conversation assembly
Bind messages and working memory to a conversation, then assemble a bounded, prompt-ready history with an explicit policy instead of ad hoc context plumbing.
const ctx = laser.context(conversation)
await ctx.append(COMMANDS, COMMAND)
await ctx.append(RESPONSES, RESPONSE)
// the prompt window is a declared policy
const policy = new ContextChain([
new LastN(20),
new TokenBudget(4_000),
])
const turns = await ctx.fetchWith(
[COMMANDS, RESPONSES], policy
)Primitive guarantees
01
Declare turn and token limits so context assembly remains predictable.
02
Keep session history separate while shared knowledge stays reusable across agents.
03
Every included turn traces back to durable records rather than transient process state.
Explore the system
Combine transport, prompt assembly, recall, relationships, and live views without stitching together disconnected systems.