Agent Sandbox Registry

python-sdk

Decision: Session Pluggable Storage Backend

无中文版

.agents/notes/implemented/architecture/2026-09-02-session-pluggable-storage.md

Decision: Session Pluggable Storage Backend

Status: implemented

Problem

Session data (sandbox mapping, state) needs persistence across CLI invocations. Different deployment scenarios need different storage backends.

Decision

Define SessionStore abstract base class with pluggable backends: 1. LocalSessionStore (default) — filelock-based, ~/.abx/sessions/ 2. OSSSessionStore (Phase 2) — Alibaba Cloud OSS for team sharing 3. DatabaseSessionStore (Phase 2) — SQL database for enterprise

Interface: save(session), load(session_id), list(), delete(session_id), exists(session_id)

API Design

class SessionStore(ABC):
    def save(self, session: SessionInfo) -> None: ...
    def load(self, session_id: str) -> SessionInfo: ...
    def list(self) -> list[SessionInfo]: ...
    def delete(self, session_id: str) -> None: ...
    def exists(self, session_id: str) -> bool: ...

class LocalSessionStore(SessionStore): ...   # filelock-based, ~/.abx/sessions/

Alternatives considered

Dependencies

Test Strategy

Acceptance criteria

Consequences