How volcengine/openviking works
OpenViking is a context database for AI agents, organizing knowledge, memories, and skills as browsable viking:// filesystem resources. The principal workflow is to ingest or add context, store it with semantic summaries, then let an agent search within a scope and read relevant tiers through the service. Sessions can preserve conversations and extract memories; with VikingBot, source material can also be compiled into a wiki, knowledge graph, or report. The README documents these capabilities, but sampled code is incomplete, so unverified subsystem links are omitted.
Main entry points: pipeline.py Context assembly · session_service.py Session service · loop.py VikingBot agent · namespace.py Context namespace
Components 21
Access and service
- Client SDKs
sdk - HTTP server
openviking/server/app.py - Search service
openviking/service/search_service.py - Runtime config
openviking/config/manager.py
Context lifecycle
- Ingest orchestration
openviking/ingest/orchestrator.py - Parsing and import
openviking/parse/parser_router.py - Context namespace
openviking/core/namespace.py - Session service
openviking/service/session_service.py - Session training
openviking/session/train/pipeline.py
Retrieval and models
- Context assembly
openviking/retrieve/context_assembler/pipeline.py - Embedding providers
openviking/models/embedder/base.py - VLM providers
openviking/models/vlm/backends/volcengine_vlm.py
Storage and identity
- Vector collections
openviking/storage/vectordb/collection/collection.py - Volcengine collection
openviking/storage/vectordb/collection/volcengine_collection.py - Vector project
openviking/storage/vectordb/project/volcengine_project.py - Namespace identity
openviking/core/namespace.py
Agent workflows
- VikingBot agent
bot/vikingbot/agent/loop.py - Bot sessions
bot/vikingbot/session/manager.py - Messaging channels
bot/vikingbot/channels/manager.py - Context compilation
bot/vikingbot/compile/service.py
Other components
- AI agent
Connections 19
- AI agent → Client SDKs: uses
- Client SDKs → HTTP server: requests context
- HTTP server → Search service: routes search
- AI agent → Context namespace: browses context
README.md - Ingest orchestration → Parsing and import: imports sources
- Ingest orchestration → Context namespace: adds resources
- Search service → Context assembly: assembles context
README.md - Context assembly → Embedding providers: embeds queries
openviking/retrieve/context_assembler/pipeline.py - Context assembly → Session service: loads session
openviking/retrieve/context_assembler/pipeline.py - Context assembly → Vector collections: retrieves candidates
- Vector collections → Volcengine collection: delegates operations
openviking/storage/vectordb/collection/collection.py - Vector project → Volcengine collection: constructs collection
openviking/storage/vectordb/project/volcengine_project.py - Session service → Namespace identity: resolves namespace
openviking/service/session_service.py - Session service → Context namespace: uses identifiers
openviking/service/session_service.py - Session training → VLM providers: trains with models
- AI agent → Messaging channels: sends messages
- Messaging channels → VikingBot agent: dispatches messages
- VikingBot agent → Bot sessions: uses sessions
bot/vikingbot/session/manager.py - VikingBot agent → Context compilation: invokes compilation
README.md