Guide

Run an agent that keeps a persistent notebook on the core

Let an agent running on your connect0 core keep `/workspace/notes/` as a persistent shared journal — reading, editing and appending across conversations.

5/18/2026 · connect0 · 3 min

An agent running on the core keeps a persistent journal in your workspace — reading, editing and appending across every conversation.

connect0's sandbox FS is persistent across conversations. That's the magic ingredient for treating /workspace/notes/ as a long-running journal — the agent and you both write to it, both read from it, and it doesn't reset when the chat session ends.

Pattern

Keep one file (or a few — decisions.md, bugs-found.md, things-tried.md):

sh "ls /workspace/notes/ 2>/dev/null || mkdir -p /workspace/notes"

Then in every conversation:

"Add to /workspace/notes/decisions.md: we picked Redis over Memcached because of the persistence requirement. Date it."

Agent runs:

sh "echo '## 2026-05-18 — Cache layer\\n\\nPicked Redis over Memcached because of the persistence requirement.\\n' >> /workspace/notes/decisions.md"

Or — cleaner — upload.write with content_text rebuilding the whole file:

upload.write {
  "target_path": "notes/decisions.md",
  "content_text": "<full updated content>"
}

For append-only, sh "echo >>" is fine. For structured edits, upload.write is cleaner.

Reading on a new conversation

"What did we decide about the cache layer?"

Agent runs info to confirm the project, then:

sh "grep -A 5 -i 'cache' /workspace/notes/decisions.md"

Surfaces the relevant chunk. The agent has the full context that the LLM forgot between turns.

Why this works better than the LLM's memory

  • Deterministic. The note is exactly what was written. The LLM might "remember" something subtly different across sessions.
  • Shareable. Other team members on the same project see the same notes.
  • Inspectable. You can sh "cat" the notes yourself, see what the agent has been recording.
  • Editable by hand. Upload a fresh version via the dashboard, override what the agent thought.

A specific recipe — bug investigation log

/workspace/notes/bugs-investigated.md:

## bug-id-1234 — date: 2026-05-15

**Symptom**: 500 on /api/users when X-Filter is set.
**Hypotheses**: middleware order; pre-Hono router conflict.
**Result**: route mounted twice — fixed in commit abc123.

## bug-id-5678 — date: 2026-05-17

...

Every time you debug a bug with the agent, finish with: "Add this investigation to bugs-investigated.md." Six months later, when a similar symptom shows up, ask the agent "have we seen X-Filter related 500s before?" — it'll grep the notebook.

Versioning

R2 has no version history. If you want history, the agent can commit the notes to a git repo (sh "git -C /workspace/notes/ add . && git commit -m '...' && git push") — needs egress=open and credentials configured inside the sandbox.

Limits

  • Concurrent edits. If two conversations are appending to the same file simultaneously, you'll get interleaved writes. Rare in practice; if it bites, switch to one file per topic.
  • Audit. upload.write calls go into upload_link audit; sh "echo >>" writes don't (they're regular shell commands logged in sandbox_invocation). Both are auditable, just in different tables.

Next steps

Where this fits

This is the Run your agents pillar of connect0 — the core that connects everything your company runs on. The agent runs on the core against a workspace that survives every conversation — durable state it acts on, not the LLM's fuzzy memory. Start building → · All guides →