dotagent

DotAgent

DotAgent is a Go-based personal agent runtime with:

Requirements

Install

git clone https://github.com/dotsetgreg/dotagent.git
cd dotagent
go build -o dotagent ./cmd/dotagent

Initialize Instance

./dotagent init --non-interactive

This creates:

Set minimum credentials (OpenRouter example):

dotagent config set providers.openrouter.api_key '"<OPENROUTER_KEY>"'
dotagent config set channels.discord.token '"<DISCORD_BOT_TOKEN>"'

Validate setup:

dotagent doctor --check

Run (Production, Docker-First)

Managed runtime lifecycle:

dotagent runtime up
dotagent runtime status --check
dotagent runtime logs -f
dotagent runtime restart
dotagent runtime down

Run (Development)

Local one-shot/interactive:

dotagent agent
dotagent agent -m "Summarize this repo"
dotagent gateway --dev

Config Notes

Persona System

DotAgent now runs a first-class persona layer that is fully integrated with memory:

Context + Memory Architecture

DotAgent uses a tiered, durable context system:

Key guarantees:

Operational safeguards:

Environment Variables

DOTAGENT_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_PROVIDERS_OLLAMA_API_BASE=http://127.0.0.1:11434/v1
DOTAGENT_PROVIDERS_OLLAMA_API_KEY=
DOTAGENT_PROVIDERS_OLLAMA_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
DOTAGENT_MEMORY_PERSONA_SYNC_TIMEOUT_MS=2200

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"
    }
  }
}

Ollama on host + DotAgent in Docker:

{
  "agents": { "defaults": { "provider": "ollama", "model": "llama3.2" } },
  "providers": {
    "ollama": {
      "api_base": "http://host.docker.internal:11434/v1"
    }
  }
}

Switching providers does not clear memory. Memory remains in data/state/memory.db.

Commands

dotagent init
dotagent migrate
dotagent doctor
dotagent runtime
dotagent config
dotagent backup
dotagent agent
dotagent gateway --dev
dotagent cron
dotagent skills
dotagent toolpacks
dotagent version
# In-chat persona diagnostics:
/persona show
/persona revisions
/persona candidates [status]
/persona rollback

Skill notes:

Test

GOCACHE=/tmp/go-build go test ./...

Memory-focused regression gates:

make test-memory
make memory-eval
make memory-canary

Documentation:

Docs commands:

make docs-gen
make docs-check
make docs-build
make docs-serve

Toolpack diagnostics:

dotagent toolpacks validate [id]
dotagent toolpacks doctor [id]