Session and Memory Formats
This page documents runtime file formats generated by persistence modules. For host-level Android emulator/AVD persistence (disk images, paths, reset/delete), see Filesystem Layout.
All workspace/ and state/ paths on this page are relative to the selected agent instance. In multi-agent installs, each agent has its own isolated copies of these files.
Workspace Onboarding State
Path:
workspace/.openpocket/workspace-state.json
Shape:
{
"version": 1,
"bootstrapSeededAt": "2026-02-22T03:00:00.000Z",
"onboardingCompletedAt": "2026-02-22T03:05:00.000Z"
}Semantics:
bootstrapSeededAt: bootstrap phase started (BOOTSTRAP.mdseeded or observed)onboardingCompletedAt: required onboarding profile completed- completion marker is used by chat onboarding gate and workspace bootstrap logic
Session
Path:
workspace/sessions/session-<YYYYMMDD-HHMMSS>.md
Header template:
# OpenPocket Session
- id: <YYYYMMDD-HHMMSS>
- started_at: <ISO8601>
- model_profile: <profile_key>
- model_name: <model_name>
## Task
<task text>
## StepsPer-step block template:
### Step N
- at: <ISO8601>
- thought:
```text
<thought or (empty)>
```
- action:
```json
<action json>
```
- execution_result:
```text
<result text>
```execution_result examples:
- ADB action result (
Tapped at (...),Sent keyevent ...) - script executor summary (
run_script exitCode=...) - coding executor output (
read path=...,edit path=...,exec started in background ...) - memory executor JSON output (
memory_search/memory_get) - human-auth decision and delegation lines
- optional local screenshot marker (
local_screenshot=...)
Human-auth step may include:
Human auth approved|rejected|timeout request_id=<id> message=<summary>
human_artifact=<absolute path, optional>
delegation_result=<runtime apply summary, optional>
delegation_template=<next-step hint, optional>
local_vm_permission=<auto-approval note, optional>Final block template:
## Final
- status: SUCCESS|FAILED
- ended_at: <ISO8601>
### Message
<final message>Daily Memory
Path:
workspace/memory/YYYY-MM-DD.md
Created on first write with:
# Memory YYYY-MM-DDAppend format:
- [HH:MM:SS] [OK|FAIL] [<modelProfile>] task: <task> | result: <compact_message>compact_message is whitespace-normalized and truncated to 400 chars.
Root Memory and Search Scope
- root memory file:
workspace/MEMORY.md - daily memory files:
workspace/memory/*.md
memory_search and memory_get are restricted to this scope only.
Screenshot Format
Saved path format:
<screenshots.directory>/<YYYYMMDD-HHMMSS>-session-<sessionId>-step-<NNN>-<safeCurrentApp>.pngNotes:
safeCurrentAppkeeps only[a-zA-Z0-9._-], others become_- retention: keep newest
screenshots.maxCount; delete older PNG files
Script Run Artifact
Path per run_script execution:
workspace/scripts/runs/run-<runId>/Files:
script.shstdout.logstderr.logresult.json
result.json shape:
{
"ok": true,
"runId": "20260218-130000-ab12cd",
"runDir": "...",
"scriptPath": ".../script.sh",
"exitCode": 0,
"timedOut": false,
"durationMs": 432,
"stdout": "...",
"stderr": "..."
}Auto Artifact Outputs
After successful tasks, runtime may generate reusable artifacts:
- auto skill:
workspace/skills/auto/<timestamp>-<slug>.md - auto replay script:
workspace/scripts/auto/<timestamp>-<slug>.sh
Auto skill content includes:
behavior_fingerprint: <hash>- source session path
- per-step procedure from trace logs
- optional
ui_targetsemantic hints derived from tap-element context
Runtime may delete older auto artifacts when slug/fingerprint indicates duplicate behavior.
These paths are also returned in AgentRunResult.skillPath / scriptPath.
Human Auth Artifact
When web approval uploads artifact, bridge stores it under:
state/human-auth-artifacts/<requestId>.<ext>Extension mapping by MIME type:
image/png->.pngimage/jpeg->.jpgimage/webp->.webpapplication/json->.json- unknown ->
.bin
Common JSON payload shapes:
{ "kind": "text", "value": "123456", "capability": "2fa", "capturedAt": "..." }{ "kind": "qr_text", "value": "otpauth://...", "capability": "qr", "capturedAt": "..." }{ "kind": "geo", "lat": 37.7749, "lon": -122.4194, "capability": "location", "capturedAt": "..." }