mirror of
https://github.com/harivansh-afk/sandbox-agent.git
synced 2026-04-15 06:04:43 +00:00
fix: add agent_server_logs module import to lib.rs
This commit is contained in:
parent
be7aecb362
commit
7a5bb2b8b0
87 changed files with 2438 additions and 1671 deletions
21
docs/manage-sessions.mdx
Normal file
21
docs/manage-sessions.mdx
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
---
|
||||
title: "Manage Session State"
|
||||
description: "TODO"
|
||||
---
|
||||
|
||||
TODO
|
||||
|
||||
## Recommended approach
|
||||
|
||||
- Store the offset of the last message you have seen (the last event id).
|
||||
- Update your server to stream events from the Events API using that offset.
|
||||
- Write the resulting messages and events to your own database.
|
||||
|
||||
This lets you resume from a known offset after a disconnect and prevents duplicate writes.
|
||||
|
||||
## Recommended: Rivet Actors
|
||||
|
||||
If you want a managed way to keep long-running streams alive, consider [Rivet Actors](https://rivet.dev).
|
||||
They handle continuous event streaming plus fast reads and writes of data for agents, with built-in
|
||||
realtime support and observability. You can use them to stream `/events/sse` per session and persist
|
||||
each event to your database as it arrives.
|
||||
Loading…
Add table
Add a link
Reference in a new issue