Context Mount [Beta] API Reference
May 18, 2026 ยท View on GitHub
BetaContextMountAccessMode
class BetaContextMountAccessMode(Enum)
Access mode for context mount (beta)
READ_WRITE
READ_WRITE = "readWrite"
READ_ONLY
READ_ONLY = "readOnly"
BetaContextMountStrategy
class BetaContextMountStrategy(Enum)
Mount strategy for context mount (beta)
STANDARD
STANDARD = "standard"
PERFORMANCE
PERFORMANCE = "performance"
BetaContextMount
@dataclass
class BetaContextMount()
[Beta] Defines the context mount configuration for direct-mount persistence.
Unlike ContextSync which requires explicit synchronization, BetaContextMount provides write-through persistence where data is persisted immediately without manual sync calls.
IMPORTANT: BetaContextMount requires image_id="aio-ubuntu-2404" on the session. Other images do not provide a real OSS-backed mount โ writes are not persisted to the shared context store and are invisible to other sessions even with the same context_id and mount path.
Attributes:
context_id: ID of the context to mount
path: Path where the context should be mounted in the session
access_mode: Access permission for the mount (read_write or read_only)
strategy: Mount strategy (standard or performance)
source_path: Subpath within the context to mount; empty string mounts entire context
context_id: str
context_id = None
path: str
path = None
access_mode: BetaContextMountAccessMode
access_mode = BetaContextMountAccessMode.READ_WRITE
strategy: BetaContextMountStrategy
strategy = BetaContextMountStrategy.STANDARD
source_path: str
source_path = ""
new
@classmethod
def new(cls,
context_id: str,
path: str,
access_mode: Optional[BetaContextMountAccessMode] = None,
strategy: Optional[BetaContextMountStrategy] = None,
source_path: Optional[str] = None)
with_access_mode
def with_access_mode(access_mode: BetaContextMountAccessMode)
with_strategy
def with_strategy(strategy: BetaContextMountStrategy)
with_source_path
def with_source_path(source_path: str)
See Also
Documentation generated automatically from source code using pydoc-markdown.