Detailed Changelog: v0.2.2 → v0.2.3
Feature: History Management API
LlmAgent now exposes a self.history attribute of type History, providing structured control over the conversation history that the LLM sees.
history.add_entry(content, role, *, before, after)
Inserts a CustomHistoryEntry into the conversation history. The entry appears as a message with the given role ("system" or "user") in the LLM conversation. Positioning is controlled via anchors:
- No anchor: appends to the current end of history.
before=event: inserts immediately before the specified event.after=event: inserts immediately after the specified event.
ValueError if both before and after are specified, or if the anchor event is not found in the current history.
history.update(events, *, start, end)
Replaces a segment of history with new events. Behavior depends on which anchors are provided:
- Neither
startnorend: replaces the entire history as it currently exists. startonly: replaces everything fromstartthrough the current end of history.endonly: replaces everything from the beginning throughendwithevents.- Both
startandend: replaces the segment[start..end]inclusive withevents.
ValueError if anchors are not found or end appears before start.
Feature: Per-Turn Overrides on process()
LlmAgent.process() now accepts four arguments that apply to just that turn:
config: Optional[LlmConfig]
Merged onto the agent’s stored config for this turn only. Uses a layered merge where the last explicitly-set value wins (agent default < stored config < per-turn override).
LlmConfig take effect. Unset fields fall through to the agent’s stored config.
tools: Optional[List[ToolSpec]]
Tools with matching names replace those in the agent’s tool list; unmatched base tools are preserved. This lets you swap out a specific tool’s implementation for one turn without losing the rest.
context: Union[str, List[HistoryEvent], None]
Extra context appended to the end of history for message building. If a string, it is automatically wrapped as a user message. If a list of events, they are appended as-is. Not persisted — only affects this single turn.
history: Optional[List[HistoryEvent]]
Completely overrides the managed history for this turn. The managed history still receives normal updates (so subsequent turns without the override see the full history).
Feature: Configurable EndCallTool
end_call now accepts an description argument.
Feature: Multilingual STT/TTS Language Support
AgentUpdateCall now has a language field:
language="multilingual" to enable automatic language detection.
Feature: Custom Events
Two new event types enable arbitrary metadata exchange between agent code and the harness. Agent → Harness:AgentSendCustom
UserCustomSent
Received when the call side sends a custom event to the agent.
Feature: Agent-as-Handoff Update Parameters
agent_as_handoff() now accepts an update_call parameter to change voice/STT/TTS settings during a handoff:
UpdateCallConfig supports voice_id, pronunciation_dict_id, and language.
Feature: LLM Agent Timing Metrics
ThreeLogMetric events are now automatically emitted on every turn.
| Metric | Description |
|---|---|
llm_first_chunk_ms | Time from start of response generation to first chunk (text or tool call) from the LLM |
llm_first_text_ms | Time from start of response generation to first text chunk. |
agent_turn_ms | Total agent processing time for the turn, from start to completion. |