Skip to content

feat(sandbox-agents): Store session state in durableDir volume for sandbox agents using the python runtime.#2171

Draft
jmhbh wants to merge 9 commits into
mainfrom
feat/persist-substrate-session-state-to-durable-dir
Draft

feat(sandbox-agents): Store session state in durableDir volume for sandbox agents using the python runtime.#2171
jmhbh wants to merge 9 commits into
mainfrom
feat/persist-substrate-session-state-to-durable-dir

Conversation

@jmhbh

@jmhbh jmhbh commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

No description provided.

…bleDir volume

Python declarative substrate SandboxAgents now keep ADK session state in a sqlite DB inside the session
actor's durableDir volume. Go-runtime and BYO sandbox agents session state persistence is currently not implemented.
In addition, on config rollout old sessions remain on the existing actor instead of rolling over to a new actor based on the new golden snapshot.
Below are a list of the changes.

- One session ⇔ one actor: actor ids derive from the session alone and actors
  resume under their birth template, so session state survives per-turn
  suspend/resume and config rollouts; shape changes (image/command/env) apply
  to new sessions only. The per-rollout orphan reaper is removed.
- Config reaches actors through a stable per-agent Secret plus Data-scope
  suspends: a config rollout reuses the existing actor and picks up the new
  config on its next cold-boot resume (~30s secret-cache bound).
- Session rows and tasks stay in postgres; the sandbox A2A transport now
  creates the session row for headless (raw A2A) sessions, since the runtime
  no longer does so as a side effect.
- New GET /api/sessions/{id}/events?source=sandbox reads events from the actor
  (resume → fetch → suspend only if the read woke it, single-flighted), and
  GET /api/sessions/{id} carries an events_source discriminator.
- Bump agent-substrate to v0.0.8; adapt to the ActorRef/atespace API, paginated
  ListActors, and server-defaulted snapshot scopes.
@github-actions github-actions Bot added the enhancement New feature or request label Jul 7, 2026
Signed-off-by: JM Huibonhoa <jm.huibonhoa@solo.io>
@jmhbh

jmhbh commented Jul 7, 2026

Copy link
Copy Markdown
Contributor Author

WIP, still need to add support for the go runtime.

jmhbh and others added 7 commits July 6, 2026 20:41
…ble-dir

# Conflicts:
#	go/core/pkg/sandboxbackend/substrate/agent_actor.go
#	go/core/pkg/sandboxbackend/substrate/agent_lifecycle.go
#	go/core/pkg/sandboxbackend/substrate/client.go
#	go/core/pkg/sandboxbackend/substrate/delete_actor.go
#	go/core/pkg/sandboxbackend/substrate/lifecycle_actortemplate.go
#	go/core/pkg/sandboxbackend/substrate/lifecycle_delete.go
#	go/core/pkg/sandboxbackend/substrate/lifecycle_delete_test.go
#	go/core/pkg/sandboxbackend/substrate/openclaw.go
#	go/core/pkg/sandboxbackend/substrate/openclaw_test.go
#	go/go.mod
Signed-off-by: JM Huibonhoa <jm.huibonhoa@solo.io>
Signed-off-by: JM Huibonhoa <jm.huibonhoa@solo.io>
Signed-off-by: JM Huibonhoa <jm.huibonhoa@solo.io>
Signed-off-by: JM Huibonhoa <jm.huibonhoa@solo.io>
Signed-off-by: JM Huibonhoa <jm.huibonhoa@solo.io>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant