symfonic.agent.backend.conversation¶
conversation ¶
The conversation and model ports, in LangChain's vocabulary.
This is the only module that speaks both languages: kernel values on one side,
BaseMessage and provider chunks on the other. Keeping the translation in
one place is what lets the kernel stay stdlib-pure and the provider details
stay changeable.
ConversationAdapter ¶
Builds the request and records each completed round (ConversationPort).
Source code in src/symfonic/agent/backend/conversation.py
close_round ¶
close_round(transcript: Transcript, turn: ModelTurn, requests: Sequence[ToolRequest], outcomes: Sequence[Any]) -> None
Append one round's assistant reply and any tool observations.
The final answer goes on the wire too, even though no further inference
call reads it: the terminal extraction pass validates the final answer
against the schema, and omitting it would make output a second,
independent generation free to contradict text (RES-8).
Source code in src/symfonic/agent/backend/conversation.py
ModelAdapter ¶
StreamingRound ¶
One streaming round, aggregating chunks as it yields deltas.
Source code in src/symfonic/agent/backend/conversation.py
result ¶
The completed round, whose text is exactly the deltas that were sent.
Deriving the round's text from the emitted deltas rather than from the aggregate is what makes EVT-3's byte-for-byte equality hold in a multi-round tool run, not only in the single-round case.
Source code in src/symfonic/agent/backend/conversation.py
turn_of ¶
Project one provider message onto the kernel's ModelTurn.