OpenFS Architecture
From Derek Davis
Jump to navigationJump to search
OpenFS Architecture[edit]
OpenFS is a unified virtual filesystem API that lets AI agents read, write, and search across any storage backend through a single interface.
Core Concept[edit]
| Layer | Package | Role |
|---|---|---|
| Core | @openfs/core | IFileSystem interface — read, write, ingest, search, ls. All adapters implement this. |
| WASM | @openfs/wasm | In-browser SQLite via sql.js. Zero native deps. Runs in browser, Bun, Node, Deno. |
| Adapters | adapter-sqlite, adapter-s3, adapter-chroma, adapter-postgres, adapter-mysql, adapter-turso | Swap storage backends without changing agent code. |
| Server | @openfs/server | Hono HTTP API — expose any adapter over the network. Port 3456. |
| Agent | @openfs/agent-wiki | LLM-powered knowledge base. Ingests sources, synthesizes wiki pages, answers queries. |
| Wiki Sync | @openfs/agent-wiki-mw | Bridges OpenFS agent ↔ MediaWiki. Two-way sync, synthesis map, category tagging. |
Data Flow[edit]
Source docs (MW pages, files, API data)
↓ pullAll()
OpenFS /sources/ (raw content)
↓ AgentWiki.ingest() + LLM
OpenFS /wiki/ (synthesized knowledge pages)
↓ pushAll()
MediaWiki pages [[Category:OpenFS Synthesized]]
↔ syncRecentChanges() every 60s
↓ pullAll()
OpenFS /sources/ (raw content)
↓ AgentWiki.ingest() + LLM
OpenFS /wiki/ (synthesized knowledge pages)
↓ pushAll()
MediaWiki pages [[Category:OpenFS Synthesized]]
↔ syncRecentChanges() every 60s
Running Locally[edit]
docker compose up -d
Services: MediaWiki :8082 · Playground :4321 · OpenFS Server :3456 · Sync Agent :4322 · MinIO :9000 · Chroma :8000