← All templates · AI and agents
Deploy OpenViking in one click
A context database for AI agents: memory, resources and skills in one place
A self-hosted alternative to Mem0.
What is OpenViking?
OpenViking is an open-source context database for AI agents, an alternative to Mem0 for agent memory, made by Volcengine. It keeps everything an agent knows in one filesystem under viking://: documents and code as resources, a user's preferences and experience as memories, and skills as SKILL.md files. Agents browse it like files, with ls, tree, read and grep. Each directory carries a generated summary, so an agent can judge it before opening the full files.
People self-host OpenViking to give the coding agents they use one memory that lasts across sessions, and to see what that memory holds. A committed session turns into Markdown memories you can read, edit and merge, not vectors nobody can inspect. The catch is model cost: summaries and memories are written by a model, so adding documents and committing sessions spend API calls.
Hosting OpenViking on Pethost
- You sign in to Pethost with a passkey, GitHub or Google. No machine yet? You pick a plan, and the link waits until it is ready.
- New project opens at OpenViking. You fill in what it asks for and click Create project: OpenAI API key.
- In a minute or two OpenViking is live at its own address with HTTPS. Its secrets are made at random, and its data is in the nightly backup.
- It is a project like any other: you or your agent can change it, roll it back or restore it.
Questions about OpenViking
Is OpenViking open source?
Yes. The server is under AGPLv3 and needs no activation key, while the ov CLI and the examples are Apache 2.0. Volcengine also offers a commercial self-managed edition with distributed deployment and official support, activated by a license key.
How is OpenViking different from Mem0?
Mem0 is a memory layer for AI agents. OpenViking also holds the documents, code and skills an agent works with, and can search within one directory, such as a project's docs, instead of the whole index.
Does OpenViking work with Claude Code and other MCP clients?
Yes. The server answers MCP at /mcp, on the same port as its REST API, and its memory plugin installer covers Claude Code, Codex, Cursor, TRAE and OpenCode. Clients connect with a user key, not the root key.
Does OpenViking need an OpenAI API key?
No. It needs an embedding model and a vision-language model from a provider such as Volcengine, OpenAI, Kimi or GLM, or models you run with Ollama. The Pethost template asks for an OpenAI key and uses text-embedding-3-small and gpt-4o-mini.
Does OpenViking support multiple users?
Yes. The root key creates accounts, which are workspaces, and users in them; each user gets a key of its own with the ADMIN or USER role. OIDC and LDAP authentication are built in too.
How much memory and disk does OpenViking need?
OpenViking is light: about 400 MB of memory, as embeddings run at OpenAI; agents' memories grow slowly on disk. On Pethost the Starter plan is enough for it, with room for other apps beside it.
OpenViking Docker Compose file
The template is this compose.yaml and the variables written into the project’s .env as it is created. Pethost runs the file as it is written.
Containers: openviking (ghcr.io/volcengine/openviking:v0.5.0).
Volumes, in the nightly backup: data.
services:
openviking:
image: ghcr.io/volcengine/openviking:v0.5.0
restart: unless-stopped
environment:
OPENAI_API_KEY: ${OPENAI_API_KEY}
OPENVIKING_ROOT_API_KEY: ${OPENVIKING_ROOT_API_KEY}
OPENVIKING_PUBLIC_BASE_URL: ${URL}
# The bot needs a user's key of its own; the server runs without it.
OPENVIKING_WITH_BOT: "0"
# Written to ov.conf in the volume at the first start only. The server
# expands the ${...} in it at every start, so a key changed in .env
# takes effect on a restart.
OPENVIKING_CONF_CONTENT: |
{
"server": {
"host": "0.0.0.0",
"port": 1933,
"root_api_key": "$${OPENVIKING_ROOT_API_KEY}"
},
"storage": {
"workspace": "./data",
"vectordb": { "name": "context", "backend": "local" },
"agfs": { "backend": "local" }
},
"embedding": {
"dense": {
"provider": "openai",
"api_key": "$${OPENAI_API_KEY}",
"model": "text-embedding-3-small",
"dimension": 1536
}
},
"vlm": {
"provider": "openai",
"api_key": "$${OPENAI_API_KEY}",
"model": "gpt-4o-mini"
}
}
volumes:
- data:/app/.openviking
volumes:
data:
More in AI and agents
- OpenClawAn AI assistant that lives in your chat apps
- Hermes AgentAn AI agent you talk to in Telegram, Discord or the browser
- Open WebUIA chat interface for OpenAI-compatible AI models
- AstrBotAn AI chatbot and agent for Telegram, Discord, Slack, QQ, WeChat and more, with plugins and a web dashboard
- FlowiseBuild AI agents and LLM workflows visually, then call them over an API or embed them as a chat widget
- GitNexusIndex a code repository into a knowledge graph and explore it, or let an agent query it over MCP