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]

LayerPackageRole
Core@openfs/coreIFileSystem interface — read, write, ingest, search, ls. All adapters implement this.
WASM@openfs/wasmIn-browser SQLite via sql.js. Zero native deps. Runs in browser, Bun, Node, Deno.
Adaptersadapter-sqlite, adapter-s3, adapter-chroma, adapter-postgres, adapter-mysql, adapter-tursoSwap storage backends without changing agent code.
Server@openfs/serverHono HTTP API — expose any adapter over the network. Port 3456.
Agent@openfs/agent-wikiLLM-powered knowledge base. Ingests sources, synthesizes wiki pages, answers queries.
Wiki Sync@openfs/agent-wiki-mwBridges 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

Running Locally[edit]

docker compose up -d

Services: MediaWiki :8082 · Playground :4321 · OpenFS Server :3456 · Sync Agent :4322 · MinIO :9000 · Chroma :8000