Self-improving AI Employees for everyone
Python ai-agentsai-employeeai-employeesassistantautonomous-agentsco-employeescompanygrok-botinstinctloop-agentsmuseown-your-datapersonalself-hosted
# Service Ports (used by start.js, vite, and docker-compose)
VITE_CLIENT_PORT=5678
PYTHON_BACKEND_PORT=5678
NODEJS_EXECUTOR_PORT=5682
WHATSAPP_RPC_PORT=5683
REDIS_PORT=6379
# Server Configuration
HOST=127.0.0.1
PORT=5678
DEBUG=false
WORKERS=1
# Security (Development keys - MUST CHANGE FOR PRODUCTION)
SECRET_KEY=dev-secret-key-12345678901234567890123456789012
API_KEY_ENCRYPTION_KEY=dev-encryption-key-12345678901234567890123456
# Authentication
# VITE_AUTH_ENABLED: "true" (require login) or "false" (bypass authentication)
VITE_AUTH_ENABLED=false
# AUTH_MODE: "single" (local deploy - first user is owner) or "multi" (cloud - open registration)
AUTH_MODE=single
JWT_SECRET_KEY=dev-jwt-secret-key-12345678901234567890
JWT_EXPIRE_MINUTES=10080
JWT_COOKIE_NAME=opencompany_token
JWT_COOKIE_SECURE=false
JWT_COOKIE_SAMESITE=lax
# CORS Configuration - Allow all common dev ports
CORS_ORIGINS=["http://localhost:5678","http://localhost:5679","http://127.0.0.1:5678","http://127.0.0.1:5679","http://localhost:5173"]
# Database Configuration
# SQLite DB filename. Resolved under DATA_DIR by
# ``Settings._resolve_under_data`` — same pattern as ``temporal.db``
# and ``credentials.db`` so dev mode's DATA_DIR=.opencompany moves all
# three together. The SQLAlchemy URL is composed at runtime by
# ``Settings.database_url`` (sqlite+aiosqlite:///<abspath>).
WORKFLOW_DB_FILENAME=workflow.db
DATABASE_ECHO=false
DATABASE_POOL_SIZE=5
DATABASE_MAX_OVERFLOW=10
# Cache Configuration (Disabled for development)
REDIS_ENABLED=false
CACHE_TTL=300
# Temporal Configuration
# Enable for durable workflow execution with automatic retries.
# Backed by ``temporal server start-dev`` against a SQLite db at
# ``TEMPORAL_SQLITE_PATH``. The official ``temporal`` CLI is downloaded
# by pooch from https://temporal.download/cli/archive/latest on
# ``company build`` (or first ``company start`` if build was skipped).
TEMPORAL_ENABLED=true
TEMPORAL_SERVER_ADDRESS=localhost:5681
TEMPORAL_NAMESPACE=default
# Durable Temporal wire identifier retained so upgrades can resume in-flight
# workflows. New display/package identifiers use OpenCompany.
TEMPORAL_TASK_QUEUE=machina-tasks
TEMPORAL_PER_TYPE_DISPATCH=true
TEMPORAL_AGENT_WORKFLOW_ENABLED=true
# gRPC frontend port the CLI dev server binds (``--port``). Default per
# https://docs.temporal.io/references/configuration.
TEMPORAL_FRONTEND_GRPC_PORT=5681
# Web UI port (``--ui-port``). ``temporal server start-dev`` defaults
# this to ``--port + 1000``; we override to 8080 to match the
# historical OpenCompany port (kept for muscle memory + bookmarks).
# Browse to http://<host>:<TEMPORAL_UI_PORT>/.
TEMPORAL_UI_PORT=5680
# SQLite db file ``temporal server start-dev --db-filename`` opens.
# Relative to DATA_DIR (= ~/.opencompany/) unless absolute. Flat under
# DATA_DIR like ``credentials.db`` / ``workflow.db``. History is
# always preserved across restarts (Temporal UI keeps showing every
# workflow that ever ran); see ``TEMPORAL_TERMINATE_RUNNING_ON_STARTUP``
# below for the resumption knob.
TEMPORAL_SQLITE_PATH=temporal.db
# On server boot, terminate every workflow still in ``Running`` state.
# Keep false so running and paused deployments survive an application
# restart — the durable workflow-control plane reconciles them. Setting
# true converts every backend boot into a namespace-wide terminate
# sweep (debug-only escape hatch).
TEMPORAL_TERMINATE_RUNNING_ON_STARTUP=false
# Graceful shutdown window for the Temporal child process.
TEMPORAL_GRACEFUL_SHUTDOWN_SECONDS=30
# Wave 12 event framework. ``true`` (default) routes trigger events
# through TriggerListenerWorkflow + Temporal Signal fan-out for the
# 8 canary-registered trigger types (webhook, chat, task, telegram,
# whatsapp, gmail, cron, email). Flip to ``false`` to roll back to
# the legacy event_waiter path -- see docs-internal/event_framework.md.
EVENT_FRAMEWORK_ENABLED=true
# Memory compaction. ``true`` (default) auto-compacts agent
# conversation memory when cumulative tokens exceed the model's
# context-window threshold. Per-session overrides via the UI.
COMPACTION_ENABLED=true
# Dead-letter queue for failed workflow executions. Off by default.
DLQ_ENABLED=false
# Data directory (base for all persistent storage: DBs, workspaces,
# workflows, claude state). User-home rooted by default — same
# convention claude code itself uses (`~/.claude/`), Stripe
# (`~/.config/stripe/`), ngrok (`~/.ngrok2/`). Survives `rm -rf` of
# the repo and lets multiple checkouts share state.
#
# Resolution rules (`server/core/paths.py::opencompany_root`):
# - `~/...` → user home (cross-platform via Path.expanduser)
# - absolute → used verbatim
# - relative → resolved under repo root (back-compat)
#
# Set to `.opencompany` (or `data`) if you want repo-local behaviour
# instead. Pre-cutover layouts (`<repo>/data/`, `<repo>/workflows/`)
# do NOT auto-migrate — see `server/core/paths.py` for the manual
# `mv` checklist if you're upgrading from an older release.
DATA_DIR=~/.opencompany
# Per-workflow workspace (nodes save files here, resolved under DATA_DIR)
WORKSPACE_BASE_DIR=workspaces
# Logging
LOG_LEVEL=INFO
LOG_FORMAT=text
# Rate Limiting (Relaxed for development)
RATE_LIMIT_ENABLED=false
RATE_LIMIT_REQUESTS=1000
RATE_LIMIT_WINDOW=60
# Service Timeouts (Extended for debugging)
AI_TIMEOUT=60
AI_MAX_RETRIES=1
AI_RETRY_DELAY=0.5
MAPS_TIMEOUT=30
# Health Check
HEALTH_CHECK_INTERVAL=60
# Cleanup Configuration (for long-running daemon)
CLEANUP_ENABLED=true
CLEANUP_INTERVAL=3600
CLEANUP_LOGS_MAX_COUNT=1000
CLEANUP_CACHE_MAX_AGE_HOURS=24
# Feature Toggles
WS_LOGGING_ENABLED=true
# Gunicorn Configuration (for production deployment)
# GUNICORN_TIMEOUT=120
# GUNICORN_GRACEFUL_TIMEOUT=30
# GUNICORN_KEEPALIVE=5
# GUNICORN_MAX_REQUESTS=10000
# GUNICORN_MAX_REQUESTS_JITTER=1000
# WebSocket Configuration (For remote Android device connections)
WEBSOCKET_URL=wss://relay.opencompany.sh/ws
WEBSOCKET_API_KEY=
# AI Proxy Configuration (Ollama-style proxy for Claude Code CLI)
# Default port for AI proxy servers (e.g., Ollama, Claude Code CLI proxy)
AI_PROXY_DEFAULT_PORT=11434