Contents

Open Agent Session

agent_session_create · Tools · Agents

Instantiate an agent role as a session: one conversation with its own transcript and address

Parameters

NameTypeRequiredDescription
agent_idstringYesAgent id from agent_list. Do not invent it.
messagestringNoThe session's first instruction, written for a colleague who cannot see your conversation: say what is needed, and what would be useful back. Use null to open the session idle and write to it later with agent_send_message.
namestringNoA short line naming the work this session is doing, so a person reading the team can tell it apart from the role's other sessions. Surrounding whitespace is trimmed, and a blank name is refused. Use null if there is nothing useful to say yet: the session is then named from its first message while it answers.
waitbooleanNotrue returns once the run the message starts has ended, with its answer, why it failed, or who stopped it. Only for a caller outside a session, and only with a message; a session that opens one with a message is reported to instead.