Skip to main content
All environment variables and credential files that configure ollim-bot. The bot is configured through environment variables loaded from a .env file at the project root. All persistent data lives in ~/.ollim-bot/, which is automatically managed as a git repository — ollim-bot auto-commits changes on each write.

Environment variables

VariableRequiredDefaultDescription
DISCORD_TOKENYesDiscord bot token for authentication
OLLIM_USER_NAMEYesYour display name, used in the system prompt and messages
OLLIM_BOT_NAMEYesThe bot’s display name
OLLIM_TIMEZONENoSystem localIANA timezone name (e.g. America/New_York). Used for timestamps in session history, pending updates, scheduling preambles, and Google Calendar/Gmail. Falls back to system local detection, then UTC.
WEBHOOK_PORTNoPort for the webhook HTTP server; omit to disable webhooks
WEBHOOK_SECRETConditionalBearer token for webhook authentication; required if WEBHOOK_PORT is set
If WEBHOOK_PORT is set without WEBHOOK_SECRET, the webhook server will not start. Both must be set together.
All three required variables are validated together on startup. If any are missing, the bot lists all missing vars with hints and exits. See troubleshooting for the exact output.

.env file

Place a .env file at the project root. Both config.py and main.py call load_dotenv() to load it.
.env
DISCORD_TOKEN=your-discord-bot-token
OLLIM_USER_NAME=YourName
OLLIM_BOT_NAME=Ollim
OLLIM_TIMEZONE=America/New_York
WEBHOOK_PORT=8420
WEBHOOK_SECRET=a3f8b2c1d4e5f6a7b8c9d0e1f2a3b4c5
CLI subcommands (routine, reminder, tasks, cal, gmail) do not require DISCORD_TOKEN — it is only loaded when starting the bot.

Runtime configuration

In addition to environment variables, ollim-bot has persistent runtime settings you configure via the /config slash command. ollim-bot stores these in ~/.ollim-bot/state/config.json, and they survive bot restarts.
KeyTypeDefaultValid valuesDescription
model.mainmodelSDK defaultopus / sonnet / haiku / defaultDefault model for the main session
model.forkmodelInherits from mainopus / sonnet / haiku / defaultDefault model for interactive forks
thinking.mainthinking modeoffoff / adaptive / <budget>Extended thinking for the main session
thinking.forkthinking modeadaptiveoff / adaptive / <budget>Extended thinking for interactive forks
bg_fork_timeoutinteger1800Any integerMax background fork runtime (seconds)
fork_idle_timeoutinteger10Any integerInteractive fork idle timeout (minutes)
permission_modepermission modedontAskdontAsk / default / acceptEdits / bypassPermissionsDefault permission mode
auto_updatebooleanoffon / offAuto-pull, upgrade tool install, and restart on new commits
auto_update_intervalinteger60Any integerUpdate check interval (minutes)
auto_update_hourhour (0-23)60-23Hour of day to apply updates
Runtime config is separate from environment variables — env vars require a restart, while /config changes take effect immediately. Use env vars for credentials and infrastructure, /config for preferences.

Tool policy

You can extend or override the default tool sets by creating a tool-policy.yaml file in ~/.ollim-bot/. This is useful for granting the agent access to additional tools without editing source code.
~/.ollim-bot/tool-policy.yaml
main_session:
  additional_allowed:
    - "Bash(git status)"
bg_forks:
  additional_allowed:
    - "Bash(ollim-bot cal *)"
Changes take effect without a restart — the file is re-read when its modification time changes. See File formats for the full schema.

Data directory

All persistent data lives in ~/.ollim-bot/. See Data directory for the full layout, file descriptions, and git tracking details.

Storage patterns

ollim-bot uses two storage formats with shared conventions:
Routines, reminders, webhooks, and skills are stored as .md files with YAML frontmatter:
routines/morning-briefing.md
---
id: abc123
cron: "30 8 * * 1-5"
description: Morning briefing
---
Review my tasks and calendar for today, then give me a summary.
  • Filenames are auto-generated slugs from the message content
  • The id field in YAML is authoritative — filenames are for human readability
  • Slug collisions are resolved with numeric suffixes (-2, -3, etc.)
  • Writes use atomic temp-file-then-rename to prevent corruption
  • Each write triggers a git commit

Google credentials

Google integration uses file-based credentials rather than environment variables.
FileSourceDescription
~/.ollim-bot/state/credentials.jsonManual — downloaded from Google Cloud ConsoleOAuth 2.0 client credentials
~/.ollim-bot/state/token.jsonAuto-generated after /google-authOAuth refresh and access tokens
Tokens are refreshed automatically. If a token is revoked, the bot detects it and prompts you to run /google-auth again. See Google integration setup for the full credential setup process.

Next steps

Data directory

Detailed layout of the ~/.ollim-bot/ directory.

File formats

YAML frontmatter specs for routines, reminders, webhooks, and skills.

Self-host ollim-bot

Running your own instance of ollim-bot.

Quickstart

Install ollim-bot and create a Discord bot.