v0.4.0
or/agent — agent-core complete
This release rounds out the or/agent package: the stateful Agent now exposes live run state, accepts more per-request options, and resumes more flexibly, plus hardening for misbehaving hooks and tools. The or/llm package is unchanged and backward compatible.
Highlights
- Live run state —
Snapshot()now reportsStreamingMessageandPendingToolCalls, and the transcript grows incrementally during a run, so a concurrent reader sees progress without replaying events. - Flexible resume — when the transcript ends with an assistant message,
Continuefalls back to queued messages: it drains the steering queue first, then the follow-up queue, instead of erroring. - Request tuning —
Options.StreamOptionspassesTemperature,MaxTokens,Headers, and theOnRequest/OnResponseobservers through to every turn. - Multimodal prompts — new
agent.UserMessage(text, images...)builds a user message from text and images forPrompt,Steer, orFollowUp. - Robustness — a panic in a hook or tool is now recovered into an error result / terminal error event instead of crashing the process; a cancelled run stops executing between sequential tools.
Behavior change
- The default steering and follow-up queue mode is now
QueueOneAtATime(previouslyQueueAll). Each drain point injects only the oldest queued message; setSteeringMode/FollowUpModetoQueueAllfor the previous behavior.