DotAgent is a Go-based personal agent runtime with:
workspace/state/memory.db)openai-codex)gateway mode)git clone https://github.com/dotsetgreg/dotagent.git
cd dotagent
go build -o dotagent ./cmd/dotagent
./dotagent onboard
This creates ~/.dotagent/config.json and a default workspace.
Update at least:
providers.openrouter.api_key (OpenRouter), or set:
agents.defaults.provider=openaiproviders.openai.api_key (or providers.openai.oauth_access_token / providers.openai.oauth_token_file)agents.defaults.provider=openai-codexproviders.openai_codex.oauth_access_token (or providers.openai_codex.oauth_token_file)channels.discord.token (for gateway mode)Validate setup:
./dotagent status
Local CLI interaction:
./dotagent agent
./dotagent agent -m "Summarize this repo"
Discord gateway:
./dotagent gateway
Headless gateway management with Docker Compose:
# Start in background
docker compose --profile gateway up -d dotagent-gateway
# Check service status
docker compose ps dotagent-gateway
# Stream logs
docker compose logs -f dotagent-gateway
# Restart
docker compose restart dotagent-gateway
# Stop / start
docker compose stop dotagent-gateway
docker compose start dotagent-gateway
openrouter, openai, and openai-codex (agents.defaults.provider)openai) auth modes: API key, direct bearer token, or bearer token file (for externally refreshed OAuth tokens)
providers.openai.api_key, providers.openai.oauth_access_token, or providers.openai.oauth_token_file.providers.openai.oauth_token_file accepts either a plain token file or Codex/OpenAI auth JSON (extracts tokens.access_token).openai-codex) auth modes: direct bearer token or bearer token file
providers.openai_codex.oauth_access_token or providers.openai_codex.oauth_token_file.providers.openai_codex.oauth_token_file accepts either a plain token file or Codex/OpenAI auth JSON (extracts tokens.access_token).providers.openai_codex.api_base is https://chatgpt.com/backend-api (DotAgent resolves the request endpoint to /codex/responses).channels.discord)openai/gpt-5.2 (OpenRouter default)~/.dotagent/workspace/state/memory.dbDotAgent now runs a first-class persona layer that is fully integrated with memory:
IDENTITY.md, SOUL.md, and USER.mdexport_only (default), import_export, disabledDotAgent uses a tiered, durable context system:
Key guarantees:
session scope for episodic/task stateuser scope for durable preferences/facts across sessionsglobal scope for shared procedural/system memoryOperational safeguards:
memory_audit_log) for memory upserts/deletesprocess for long-running command lifecycle control (start/list/poll/write/kill/clear)session for cross-session inspection and targeted send/spawn flowsDOTAGENT_PROVIDERS_OPENROUTER_API_KEY=sk-or-v1-...
DOTAGENT_PROVIDERS_OPENROUTER_API_BASE=https://openrouter.ai/api/v1
DOTAGENT_PROVIDERS_OPENAI_API_KEY=sk-proj-...
DOTAGENT_PROVIDERS_OPENAI_OAUTH_ACCESS_TOKEN=
DOTAGENT_PROVIDERS_OPENAI_OAUTH_TOKEN_FILE=~/.codex/auth.json
DOTAGENT_PROVIDERS_OPENAI_API_BASE=https://api.openai.com/v1
DOTAGENT_PROVIDERS_OPENAI_ORGANIZATION=org_xxx
DOTAGENT_PROVIDERS_OPENAI_PROJECT=proj_xxx
DOTAGENT_PROVIDERS_OPENAI_CODEX_OAUTH_ACCESS_TOKEN=
DOTAGENT_PROVIDERS_OPENAI_CODEX_OAUTH_TOKEN_FILE=~/.codex/auth.json
DOTAGENT_PROVIDERS_OPENAI_CODEX_API_BASE=https://chatgpt.com/backend-api
DOTAGENT_PROVIDERS_OPENAI_CODEX_PROXY=
DOTAGENT_AGENTS_DEFAULTS_PROVIDER=openrouter
DOTAGENT_AGENTS_DEFAULTS_MODEL=openai/gpt-5.2
DOTAGENT_CHANNELS_DISCORD_TOKEN=YOUR_DISCORD_BOT_TOKEN
DOTAGENT_CHANNELS_DISCORD_ALLOW_FROM=123456789012345678
DOTAGENT_MEMORY_MAX_RECALL_ITEMS=8
DOTAGENT_MEMORY_CANDIDATE_LIMIT=80
DOTAGENT_MEMORY_RETRIEVAL_CACHE_SECONDS=20
DOTAGENT_MEMORY_WORKER_POLL_MS=700
DOTAGENT_MEMORY_WORKER_LEASE_SECONDS=60
DOTAGENT_MEMORY_EMBEDDING_MODEL=dotagent-chargram-384-v1
DOTAGENT_MEMORY_EVENT_RETENTION_DAYS=90
DOTAGENT_MEMORY_AUDIT_RETENTION_DAYS=365
DOTAGENT_MEMORY_PERSONA_SYNC_APPLY=true
DOTAGENT_MEMORY_PERSONA_FILE_SYNC_MODE=export_only
DOTAGENT_MEMORY_PERSONA_POLICY_MODE=balanced
DOTAGENT_MEMORY_PERSONA_MIN_CONFIDENCE=0.52
OpenAI Codex OAuth in Docker:
# docker-compose.yml (dotagent-gateway.volumes)
- ${HOME}/.codex/auth.json:/root/.codex/auth.json:ro
{
"agents": { "defaults": { "provider": "openai-codex", "model": "gpt-5" } },
"providers": {
"openai_codex": {
"oauth_token_file": "/root/.codex/auth.json",
"api_base": "https://chatgpt.com/backend-api"
}
}
}
Switching providers does not clear memory. Memory remains in workspace/state/memory.db.
dotagent onboard
dotagent agent
dotagent gateway
dotagent status
dotagent cron
dotagent skills
dotagent toolpacks
dotagent version
# In-chat persona diagnostics:
/persona show
/persona revisions
/persona candidates [status]
/persona rollback
Skill notes:
dotagent skills install <owner/repo-or-path>.GOCACHE=/tmp/go-build go test ./...
Memory-focused regression gates:
make test-memory
make memory-eval
make memory-canary
Documentation:
docs/mkdocs.ymldocs/reference/cli/*docs/reference/man/*docs/reference/config.mddocs/reference/providers.mddocs/reference/tools.mdDocs commands:
make docs-gen
make docs-check
make docs-build
make docs-serve
Toolpack diagnostics:
dotagent toolpacks validate [id]
dotagent toolpacks doctor [id]