Dual-Surface Model
The Dual-Surface Model
Most knowledge bases are designed solely for human reading, making them inefficient or error-prone for AI agents. AgentWiki introduces a Dual-Surface Model where humans and agents share the exact same underlying knowledge graph.
Comparison of Surfaces
| Feature | Human Surface (Webapp) | AI Agent Surface (MCP / CLI / REST) |
|---|---|---|
| Interface | React 19 WYSIWYG Editor (BlockNote) | JSON-RPC (MCP) & REST OpenAPI 3.1 |
| Search | Visual search modal with instant highlights | Hybrid search endpoint with scores & facets |
| Graph | Interactive Cytoscape.js canvas | BFS traversal & shortest-path tool calls |
| Authentication | OAuth2 Session Cookies | Scoped API Keys (aw_...) |
| Content Format | Rich HTML / BlockNote JSON | Clean Markdown & Structured JSON |
Synchronization
When a human writes a document in the web editor:
- Markdown is automatically synchronized and indexed in D1 FTS5.
- Wikilinks are parsed to update explicit edges in
document_links. - Background queues generate text chunks and Vectorize embeddings for agent retrieval.