Bounded prompt windows
Declare turn and token limits so context assembly remains predictable.
Agent primitivesContext
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.
ctx = laser.context(ls.new_conversation_id())
await ctx.append(ls.AgentTopic.Sessions, b"drain node-7")
await ctx.append(
ls.AgentTopic.Sessions,
b"drained, 0 connections left",
)
# the prompt window is a declared policy
turns = await ctx.fetch_with(
[ls.AgentTopic.Sessions],
ls.Chain([ls.LastN(20), ls.TokenBudget(4_000)]),
)Conversation assembly
Declare turn and token limits so context assembly remains predictable.
Keep session history separate while shared knowledge stays reusable across agents.
Every included turn traces back to durable records rather than transient process state.
Combine transport, prompt assembly, recall, relationships and live views without stitching together disconnected systems.
Laser Stack runs the whole stack locally in Docker. LaserData Cloud runs it for you.