Persistent markdown working memory backed by a .md file on disk. The agent reads and fully replaces this file via tools. File contents are injected into the system prompt every turn.
Creates the file with the template if it doesn't exist.
Reads current file contents. Returns empty string if file missing.
Replaces file contents entirely. Truncates if over maxTokens.
Estimates token count (~4 chars per token).
Returns the file path for reference.
Persistent markdown working memory backed by a .md file on disk. The agent reads and fully replaces this file via tools. File contents are injected into the system prompt every turn.