Skip to content

Configuration

Provara uses a layered configuration system powered by pydantic-settings:

  1. Environment variables (highest priority)
  2. .env file in the project root
  3. Default values (lowest priority)

All environment variables use the AGENT_HUB_ prefix.

VariableDefaultDescription
AGENT_HUB_HOST127.0.0.1API bind address
AGENT_HUB_PORT8787API port (1-65535)
AGENT_HUB_BASEhttp://127.0.0.1:8787API base URL (used by clients)
VariableDefaultDescription
AGENT_HUB_TOKEN(empty)API authentication token

The token can also be loaded from a file at runtime/agent_hub_token.txt. The file-based approach is preferred for production deployments.

VariableDefaultDescription
AGENT_HUB_ROOT(auto-detect)Project root directory
AGENT_HUB_RUNTIME_DIRruntimeRuntime data directory (relative to root)
AGENT_HUB_WORKSPACE_DIRworkspaceAgent workspace directory (relative to root)

The project root is auto-detected by walking up from the source file to find pyproject.toml. Override with AGENT_HUB_ROOT if running from a different directory.

VariableDefaultDescription
AGENT_HUB_LOG_LEVELINFOLogging verbosity

Supported levels: DEBUG, INFO, WARNING, ERROR, CRITICAL

VariableDefaultDescription
AGENT_HUB_RATE_LIMIT_REQUESTS100Max requests per window
AGENT_HUB_RATE_LIMIT_WINDOW_SECONDS60Window duration in seconds

Rate limiting is applied per client IP address.

VariableDefaultDescription
AGENT_HUB_STRICT_MODE0Set to 1 to deny all unknown commands
VariableDefaultDescription
OLLAMA_BASE_URLhttp://127.0.0.1:11434Ollama API base URL
OLLAMA_MODELllama3.1:8bDefault Ollama model
Terminal window
# Server
AGENT_HUB_HOST=127.0.0.1
AGENT_HUB_PORT=8787
AGENT_HUB_BASE=http://127.0.0.1:8787
# Authentication
AGENT_HUB_TOKEN=your-secure-token-here
# Logging
AGENT_HUB_LOG_LEVEL=INFO
# Rate Limiting
AGENT_HUB_RATE_LIMIT_REQUESTS=100
AGENT_HUB_RATE_LIMIT_WINDOW_SECONDS=60
# Security
AGENT_HUB_STRICT_MODE=0

Under the hood, configuration is managed by a Pydantic Settings class in src/server/config.py:

from pydantic_settings import BaseSettings
class Settings(BaseSettings):
model_config = SettingsConfigDict(
env_prefix="AGENT_HUB_",
env_file=".env",
)
host: str = "127.0.0.1"
port: int = 8787
token: str = ""
log_level: Literal["DEBUG", "INFO", "WARNING", "ERROR", "CRITICAL"] = "INFO"
strict_mode: bool = False
# ... more fields

Settings are cached via @lru_cache and can be reloaded by calling get_settings.cache_clear().

Provara automatically creates the following directory structure on startup:

runtime/
├── pending/ # Commands awaiting approval (JSON files)
├── denied/ # Denied commands archive
├── runs/ # Execution history (one dir per run)
│ └── {run_id}/
│ └── record.json
├── audit.log # Append-only audit trail
└── agent_hub_token.txt # Token file (optional)
workspace/
├── inbox/ # Script staging area
├── outbox/ # Output files
└── logs/ # Agent logs