Conversations
Group an agent's runs into one multi-turn session with a conversation ID.
A conversation ties several runs together as one multi-turn session. Pass the same conversationId across the runs of a chat thread and the dashboard groups them: the runs list shows a Conversation · N indicator, and the conversation view stacks every turn in order.
When to use it
Use a conversation ID whenever one logical session spans multiple runs: a chat thread, a back-and-forth task, a support exchange. Each turn is still its own run (one wrapAgent call); the conversation ID is what stitches them into a thread.
Set a conversation ID
Pass conversationId / conversation_id to wrapAgent (or startRun). Conversation IDs are never inferred, so use a stable ID from your app: a chat thread ID, a ticket ID, a session token.
await trodo.wrapAgent('chat', async (run) => {
run.setInput({ message });
run.setOutput(await agent.reply(message));
}, { distinctId: userId, conversationId: 'thread-abc' });with trodo.wrap_agent('chat', distinct_id=user_id, conversation_id='thread-abc') as run:
run.set_input({'message': message})
run.set_output(agent.reply(message))What it unlocks
- A conversation view with every turn stacked in order.
- A Conversation · N indicator on the runs list.
- Per-conversation analysis when paired with a user. Always pass
distinctIdtoo, so you know which user the conversation belongs to. See Identification.
Next
- Identification to attribute runs to a user
- Wrap your agent for the full run API