Threads
Threads store conversation history so an agent can continue a multi-turn chat.
A thread is a conversation container. Use threads when users expect the agent to remember prior turns.
When To Use Threads
Use a thread for:
- Website or in-app chat.
- Multi-step troubleshooting.
- Conversations with uploaded files.
- Assistants that need continuity across turns.
Use a stateless run when you only need one answer.
Thread IDs
When a streaming chat starts, Fluo can create a thread ID. Store that ID in your application if you want the next user message to continue the same conversation.
POST /api/v1/agents/{agent_id}/stream/threads?thread_id=thread_123
Data Boundaries
Threads may contain user messages, assistant replies, file references, and metadata. Treat thread IDs as application state and avoid sharing them across users unless your product intends to do that.