Give your AI a memory for real conversations
Your AI remembers what customers said, picks up where they left off, and keeps every conversation 连接 ed automatically.
No repeated questions. No lost context. Just continuous conversations.
- The AI remembers earlier turns automatically
- Send only the current message, with no history to store or resend
- Long chats stay affordable with automatic rolling summaries
- Review and reset any conversation right from the console
Why it matters
Customers shouldn't have to repeat themselves.
When someone comes back to your AI, they shouldn't have to 开始 over. ModelRiver keeps conversations 连接 ed so your AI can understand what was already discussed and continue naturally.
How conversation memory works
One conversation,
one memory, automatically.
Every conversation stays together, so your AI can keep the right context from one message to the next.
Two memory layers, managed automatically
The last few exchanges are stored exactly as they happened, so the AI answers with precise, recent context.
Once a conversation grows, earlier turns are condensed into a rolling summary. The AI keeps the important details without the message history ballooning.
Two memory layers
Recent + summarized
Short conversations keep every turn verbatim. Long ones are summarized automatically so the AI stays in context without the bill growing.
Summary threshold
~2,000 tokens
At each boundary ModelRiver condenses older turns into a rolling summary, logged in 请求日志 as a session_summary entry.
Reset anytime
One click
Delete a session in the console to wipe its memory. This is the same as starting that conversation fresh. 请求日志 are kept for the record.
Plain language
How session memory fits with everything else
Sessions keep the conversation together. Your AI uses that context to respond naturally.
Session memory
The AI remembers, 您的应用 doesn't store
Turn it on for a workflow and ModelRiver keeps the conversation. Send only the latest message; the AI sees the full conversation anyway.
Think of it as: the chat's own memory, kept server-side.
Sending history yourself
您的应用 stores and resends every message
This works, but your code grows the history 永久 and pays to resend it on every single turn. Session memory removes that code entirely.
Not the same as: session memory. You can keep either approach. See the chatbot guide.
响应 缓存
Same question, same answer
缓存 returns a saved 响应 for identical requests to save time and money. Session turns are 新功能 context every time, so they skip the 缓存 on purpose.
Different job: 缓存 saves 成本 on repeats, sessions keep conversations fresh.
Vector memory / knowledge bases
Long-term knowledge, extra infrastructure
Embedding databases store facts your AI can retrieve later. Session memory is the context of one ongoing conversation. Many teams use both together.
Complementary: session memory for chat context, a knowledge base for durable facts.
Getting started
Turn it on in minutes, with no 缓存 changes
Add conversation memory without rebuilding your application or changing how your existing 缓存 works.
For 开发者: enable session memory with a small 配置 change.
Session memory
Group requests into conversations and give the AI rolling memory of the chat.
Turned on. Conversations will appear under Logs → Sessions
Session memory manages conversation context for the workflow and adds a small LLM cost at summary boundaries.
Enable session memory on a workflow
Open any workflow, go to Advanced settings, and switch on Session memory. It is off by default.
Send a message, get your session id
The first 请求 creates the conversation and returns its id. Keep that id for the rest of the chat.
Send only the latest message from then on
Include the session id with each 新功能 message. ModelRiver merges the conversation memory itself, so no history management is needed in your code.
Manage conversations
Every conversation, visible in the console
See conversations, 检查 their context, and understand what your AI received, all from one place.
Sessions
Conversation memory grouped by session, newest activity first.
| Session | Last request | Memory summary | Turns | Cost | Activity |
|---|---|---|---|---|---|
sess_9f8c… Summarized | Customer asked to cancel order #1234 | Customer has order #1234 (Deluxe plan) and requested a full cancellation | 7 | $0.42 | 2m ago |
sess_77d0… Summarized | Booked indoor table near the window | Restaurant booking: party of 2, tomorrow 7pm, indoor near the window | 5 | $0.21 | 3h ago |
sess_a1b2… Raw | What's the status of my refund? | Raw history, no summary yet | 3 | $0.09 | 1h ago |
sess_c3d4… Summarized | Can I change my delivery address? | Delivery address update requested for order #5821 | 9 | $0.31 | 4h ago |
sess_e5f6… Raw | Help me choose a plan | Comparing Starter and Deluxe plans | 2 | $0.06 | Yesterday |
sess_g7h8… Summarized | The setup is not working | Troubleshooting integration setup and API key | 11 | $0.57 | Yesterday |
sess_i9j0… Raw | Where can I find my invoice? | Invoice lookup for the current billing period | 4 | $0.12 | 2d ago |
sess_k1l2… Summarized | I need to update my payment method | Payment method update completed successfully | 6 | $0.24 | 2d ago |
Session details
Turns
7
Total tokens
3,482
Total cost
$0.42
Request URL
POST /v1/ai/async
Current memory
Summary
Customer purchased the Deluxe plan (order #1234) and asked to cancel it after a billing question.
Key facts
Last turns
User
"Cancel it please"
Assistant
"Done. Your Deluxe plan (order #1234) is cancelled. Refund lands in 5–7 business days."
Delete to reset this conversation's memory. Request logs remain.
Delete sessionWho uses it
Built for real customer conversations
Give customers continuity, give your AI the right context, and give your 团队 a clear view of what happened.
支持 teams
Customers pick up where they left off
Conversations continue naturally instead of starting from zero when someone returns for 帮助.
产品 teams
Your AI keeps the right context
Relevant conversation history stays 连接 ed to the session, so guided flows remain coherent from one step to the next.
Engineering
Your 团队 can 检查 what happened
Conversations and session context remain visible in the console for review, 调试, and 控制.
For 开发者
Your AI remembers the conversation
Every conversation stays together as one continuous session, so your AI can understand what was said before and respond with the right context.
For 开发者: Pass a session ID with each message. ModelRiver handles the conversation context automatically.
开始 a conversation
Send a 请求 without session_id. The 响应 includes one in meta.session_id (流式传输 returns it in the first SSE event).
Continue it with the current turn only
Send session_id plus the latest message. Do not accumulate history client-side. The server merges raw history and the rolling summary.
Clear, safe behavior
A session id that does not belong to your project or workflow returns 422 session_not_found. Session ids are grouping identifiers only. channel_id and request_log_id handle 请求 correlation.
OpenAI-compatible endpoints included
接受 session_id in the 请求 body and read it back from the x-modelriver-session-id 响应 header.
Example: two turns, current turn only
// Turn 1: start the conversation await fetch(`${API_URL}/v1/ai/async`, { method: 'POST', headers: { 'Authorization': `Bearer ${KEY}` }, body: JSON.stringify({ workflow: 'my_support_bot', messages: [{ role: 'user', content: 'My order is 1234' }] }) }); // Response contains the session id const sessionId = (await res.json()).session_id; // Turn 2: continue with the latest message only await fetch(`${API_URL}/v1/ai/async`, { method: 'POST', headers: { 'Authorization': `Bearer ${KEY}` }, body: JSON.stringify({ workflow: 'my_support_bot', session_id: sessionId, messages: [{ role: 'user', content: 'Cancel it please' }] }) });
FAQ
Common questions about sessions
Quick answers for 产品, 支持, and engineering teams, without ModelRiver jargon.
What is a session?
A session is the ongoing conversation between a user and your AI. It keeps the messages and context 连接 ed so the AI can continue naturally.
Does my AI remember previous conversations?
Yes. When messages belong to the same session, ModelRiver can keep the relevant conversation context 连接 ed across interactions.
Do I need to manage conversation history myself?
No. ModelRiver handles the session context for you, so you do not have to manually rebuild conversation history for every 请求.
Can I see what happened in a session?
Yes. Sessions are visible in the ModelRiver console so your 团队 can 检查 conversations and their context.
Do I need to change my existing application?
Session memory is designed to fit into an existing AI workflow with minimal changes. 开发者 can pass a session ID and let ModelRiver handle the conversation context.
构建 AI that remembers the whole conversation
Give your AI persistent conversation context without building the memory infrastructure yourself.