Configuration
Overview
Section titled “Overview”Provara uses a layered configuration system powered by pydantic-settings:
- Environment variables (highest priority)
.envfile in the project root- Default values (lowest priority)
All environment variables use the AGENT_HUB_ prefix.
Configuration Reference
Section titled “Configuration Reference”Server Settings
Section titled “Server Settings”| Variable | Default | Description |
|---|---|---|
AGENT_HUB_HOST | 127.0.0.1 | API bind address |
AGENT_HUB_PORT | 8787 | API port (1-65535) |
AGENT_HUB_BASE | http://127.0.0.1:8787 | API base URL (used by clients) |
Authentication
Section titled “Authentication”| Variable | Default | Description |
|---|---|---|
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.
| Variable | Default | Description |
|---|---|---|
AGENT_HUB_ROOT | (auto-detect) | Project root directory |
AGENT_HUB_RUNTIME_DIR | runtime | Runtime data directory (relative to root) |
AGENT_HUB_WORKSPACE_DIR | workspace | Agent 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.
Logging
Section titled “Logging”| Variable | Default | Description |
|---|---|---|
AGENT_HUB_LOG_LEVEL | INFO | Logging verbosity |
Supported levels: DEBUG, INFO, WARNING, ERROR, CRITICAL
Rate Limiting
Section titled “Rate Limiting”| Variable | Default | Description |
|---|---|---|
AGENT_HUB_RATE_LIMIT_REQUESTS | 100 | Max requests per window |
AGENT_HUB_RATE_LIMIT_WINDOW_SECONDS | 60 | Window duration in seconds |
Rate limiting is applied per client IP address.
Security
Section titled “Security”| Variable | Default | Description |
|---|---|---|
AGENT_HUB_STRICT_MODE | 0 | Set to 1 to deny all unknown commands |
Optional Integrations
Section titled “Optional Integrations”| Variable | Default | Description |
|---|---|---|
OLLAMA_BASE_URL | http://127.0.0.1:11434 | Ollama API base URL |
OLLAMA_MODEL | llama3.1:8b | Default Ollama model |
Example .env File
Section titled “Example .env File”# ServerAGENT_HUB_HOST=127.0.0.1AGENT_HUB_PORT=8787AGENT_HUB_BASE=http://127.0.0.1:8787
# AuthenticationAGENT_HUB_TOKEN=your-secure-token-here
# LoggingAGENT_HUB_LOG_LEVEL=INFO
# Rate LimitingAGENT_HUB_RATE_LIMIT_REQUESTS=100AGENT_HUB_RATE_LIMIT_WINDOW_SECONDS=60
# SecurityAGENT_HUB_STRICT_MODE=0Configuration Class
Section titled “Configuration Class”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 fieldsSettings are cached via @lru_cache and can be reloaded by calling get_settings.cache_clear().
Runtime Directories
Section titled “Runtime Directories”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 logsNext Steps
Section titled “Next Steps”- Architecture Overview — How the system fits together
- Security Model — Policy engine deep dive