Files
agent/.env.example
highperfocused 089bd7bd48
All checks were successful
Build and Push Docker Image / build (push) Successful in 1m15s
Add HTTP gateway with streaming chat and multi-client conversation mapping (#1)
Reviewed-on: MoA/agent#1
Co-authored-by: highperfocused <highperfocused@pm.me>
Co-committed-by: highperfocused <highperfocused@pm.me>
2026-03-12 14:47:45 +01:00

88 lines
4.8 KiB
Plaintext

# ── Run mode ────────────────────────────────────────────────────────────────
# gateway (default) starts HTTP API + streaming endpoint + simple web UI
# single runs one-shot mode (PROMPT/stdin) and exits
RUN_MODE=gateway
# ── Gateway server ───────────────────────────────────────────────────────────
GATEWAY_HOST=0.0.0.0
GATEWAY_PORT=8787
# Set to * or a specific origin for browser apps hosted elsewhere
# GATEWAY_CORS_ORIGIN=*
# Optional bearer token required on every API request
# GATEWAY_AUTH_TOKEN=replace-me
# Disable built-in web UI at /
GATEWAY_ENABLE_WEB_UI=true
# ── Ollama (local / self-hosted) ────────────────────────────────────────────
# To use a local Ollama instance, override PROVIDER and MODEL:
# PROVIDER=ollama
# MODEL=llama3.2 # or qwen2.5-coder, mistral, deepseek-r1:14b …
# No API key is needed.
#
# Docker: Ollama must listen on 0.0.0.0 (not just 127.0.0.1).
# OLLAMA_HOST=0.0.0.0 ollama serve
# The default OLLAMA_BASE_URL uses host.docker.internal which maps to your
# host machine from inside a Docker container.
# On Linux: enable extra_hosts in compose.yaml (already included).
# Locally (no Docker): change to http://localhost:11434/v1
#
# OLLAMA_BASE_URL=http://host.docker.internal:11434/v1
# OLLAMA_CONTEXT_WINDOW=32768
# OLLAMA_MAX_TOKENS=8192
# ── Model ────────────────────────────────────────────────────────────────────
# Provider and model to use. Both must be set together.
# Available providers: anthropic, openai, google, mistral, groq, cerebras,
# xai, openrouter, azure-openai, amazon-bedrock, …
PROVIDER=anthropic
MODEL=claude-sonnet-4-20250514
# ── Authentication ───────────────────────────────────────────────────────────
# Generic API key for the selected PROVIDER (injected at runtime, not stored).
API_KEY=sk-ant-...
# Provider-specific keys are also honoured (pick one approach):
# ANTHROPIC_API_KEY=sk-ant-...
# OPENAI_API_KEY=sk-...
# GEMINI_API_KEY=...
# MISTRAL_API_KEY=...
# GROQ_API_KEY=...
# CEREBRAS_API_KEY=...
# XAI_API_KEY=...
# OPENROUTER_API_KEY=...
# ── Prompt (single mode only) ───────────────────────────────────────────────
# Used only when RUN_MODE=single.
# PROMPT=List all .ts files in the current directory.
# ── System prompt ────────────────────────────────────────────────────────────
# Completely replaces the default system prompt (optional).
# SYSTEM_PROMPT=You are a helpful assistant. Work inside /app only.
# Appended to the (possibly overridden) system prompt (optional).
# APPEND_SYSTEM_PROMPT=Always answer in English.
# ── Thinking ─────────────────────────────────────────────────────────────────
# off | minimal | low | medium | high | xhigh
THINKING_LEVEL=off
# ── Tools ────────────────────────────────────────────────────────────────────
# all → read, bash, edit, write (default)
# readonly → read, grep, find, ls
# none → no built-in tools
# Or a comma-separated subset of coding tools: read,bash,edit,write
TOOLS=all
# ── Working directory ────────────────────────────────────────────────────────
# Directory the agent reads/writes. Maps to the Docker volume mount point.
CWD=/app
# ── Session persistence ──────────────────────────────────────────────────────
# true → persist agent sessions and gateway conversation index under CWD/.gateway
# false → in-memory sessions only
SESSION_PERSIST=true
# ── Verbose tool logging ─────────────────────────────────────────────────────
# true → log tool start/end events to stderr
VERBOSE_TOOLS=false