TeamState
The state of a supervisor: its conversation with the user and the work of its agents.
It is @Serializable, so a checkpointer that uses kotlinx.serialization can save it.
Constructors
Starts a conversation with question as the user's first message.
Properties
the TeamAgent.name of the agent that has the conversation in a handoffTeam, or null while it is still with the first agent.
The text of the supervisor's final answer, or null while the conversation does not end with one: before the first run, when the run paused in an agent, or when the team used its token budget before it had an answer. The text is incomplete when answerTruncated is true.
true when the model reached its output limit before it finished its last message, so answer is cut off.
every task the supervisor gave in this conversation, oldest first, with what the agent did on it.
the conversation of the supervisor, oldest message first. A task it gave an agent is a tool call in it, and the agent's answer is the result of that call.
the tokens of every answer of the supervisor, and of the agents that finished.
Functions
Returns this state with text and its attachments added as the user's next message, to continue the conversation.