Sessions and Memory
OpenPocket persists execution and context as markdown/json artifacts under the selected agent workspace.
In multi-agent installs, every agent has its own workspace and memory timeline. Sessions and memory are not shared across agents.
Workspace Bootstrap
On config load / onboarding, ensureWorkspaceBootstrap ensures directories:
workspace/memoryworkspace/sessionsworkspace/skillsworkspace/scriptsworkspace/scripts/runsworkspace/cronworkspace/.openpocket
And default files (if missing):
AGENTS.mdBOOTSTRAP.md(fresh workspace onboarding gate)SOUL.mdUSER.mdIDENTITY.mdTOOLS.mdHEARTBEAT.mdMEMORY.mdPROFILE_ONBOARDING.jsonTASK_PROGRESS_REPORTER.mdTASK_OUTCOME_REPORTER.mdBARE_SESSION_RESET_PROMPT.md
This happens independently per agent workspace.
Onboarding Lifecycle Persistence
Workspace state file:
workspace/.openpocket/workspace-state.json
Key timestamps:
bootstrapSeededAtonboardingCompletedAt
When onboarding completes:
IDENTITY.mdandUSER.mdare persistedBOOTSTRAP.mdis removedonboardingCompletedAtis written
Session Lifecycle
For each task, runtime creates:
workspace/sessions/session-<timestamp>.md
During run, each step appends:
- thought text
- normalized action JSON
- executor result text
At completion/failure, runtime appends final block with status and message.
Daily Memory
Runtime appends one compact line per task to:
workspace/memory/YYYY-MM-DD.md
Line contains:
- local time
- status (
OKorFAIL) - model profile key
- task summary
- compact result summary
Memory Recall Tools
Task loop includes memory-specific tools:
memory_search: searchMEMORY.md+memory/*.mdmemory_get: read targeted line ranges from those files
Prompt policy encourages memory-first retrieval before answering prior-decision/preference/history questions.
Screenshots
When enabled (screenshots.saveStepScreenshots=true):
- each step screenshot is saved locally in the selected agent's
state/screenshots/ - optional screenshot path is appended to step result text
- debug marker overlays may be saved for tap/swipe steps
Retention policy:
- keep newest
screenshots.maxCount - delete oldest PNG files when over limit
Auto Task Sedimentation
After successful tasks, runtime may auto-generate reusable artifacts:
- skill markdown:
workspace/skills/auto/*.md - replay script:
workspace/scripts/auto/*.sh
These artifacts are surfaced in task result and used by outcome narration.
Current auto-skill experience behavior:
- generated skills include a
behavior_fingerprintfor replay dedupe - step-derived
ui_targetsemantic traces are embedded for element intent reuse - runtime injects summary metadata only; the model must
read(location)to load a skill body when it decides one is relevant
This experience layer is agent-local. A second agent does not see or reuse the first agent's auto-generated memory unless you manually copy files between workspaces.
