Skip to main content

Configuration Basics

This page lists all available configuration options for AgentHub.

Configuration File

AgentHub reads configuration from ~/.agenthub/config.toml by default.

Minimal Configuration

Start with this baseline for single-node usage:

safe_paths = [
"/home/you/projects",
"/home/you/sandboxes",
]

[server]
listen = "127.0.0.1:8080"

[worktree]
default_root = "/home/you/.agenthub/worktrees"

[history]
event_retention_days = 5
vacuum_on_cleanup = false

Complete Configuration Reference

Top-Level Options

OptionTypeDefaultDescription
safe_pathsarray of strings["~/.agenthub/worktrees"]Allowed workdir roots
web_dirstringweb/dist (dev only)Path to web assets
log_pathstringnoneLog file path (default: stdout)

[server] Section

HTTP server configuration.

OptionTypeDefaultDescription
listenstring"127.0.0.1:8080"Bind address and port
rolestring"main"Runtime role: main or node
node_idstring"main" in main modeRequired non-main node identity when role = "node"

Distributed Node Example:

[server]
role = "node"
node_id = "gpu-01"

When role = "node", AgentHub starts only the node runtime surface. Public HTTP/UI routes are disabled, and internal_grpc.enabled must be true.

[web] Section

WebAuthn/Passkey configuration.

OptionTypeDefaultDescription
rp_idstring"localhost"Relying party ID for WebAuthn
rp_originstring"http://localhost:8080"Origin for WebAuthn
rp_namestring"AgentHub"Display name for WebAuthn

Production WebAuthn Setup:

WebAuthn requires HTTPS and a valid origin:

[web]
rp_id = "agenthub.example.com"
rp_origin = "https://agenthub.example.com"
rp_name = "AgentHub Production"

[worktree] Section

Worktree creation settings.

OptionTypeDefaultDescription
default_rootstring"~/.agenthub/worktrees"Base directory for new worktrees

[codex_acp] Section

ACP (Agent Control Protocol) provider settings.

OptionTypeDefaultDescription
binarystring"agenthub-codex-acp"ACP binary name or path
default_modestring"auto"Default ACP mode (auto, full, suggest)
multi_agent_enabledbooleantrueForce Codex ACP Feature::Collab on AgentHub-managed sessions

The built-in adapter path assumes the repository's current ACP baseline:

  • agenthub-codex-acp
  • official Codex 0.121.x

If you point codex_acp.binary at a custom binary, keep it compatible with the same ACP protocol surface before mixing it into a shared deployment.

[history] Section

Event history retention settings.

OptionTypeDefaultDescription
event_retention_daysinteger5Days to keep events (0 = unlimited)
vacuum_on_cleanupbooleanfalseRun VACUUM after cleanup
delete_batch_sizeinteger10000Rows per cleanup batch (100-200000)

Retention Example:

[history]
# Keep events for 30 days
event_retention_days = 30
# Reclaim disk space after cleanup
vacuum_on_cleanup = true
# Smaller batches for lower I/O impact
delete_batch_size = 5000

[push] Section

Web Push notification settings.

OptionTypeDefaultDescription
subjectstring"mailto:admin@example.com"VAPID contact email
keys_pathstring"~/.agenthub/vapid.json"Path to VAPID keys

Push Configuration:

[push]
subject = "mailto:ops@company.com"
keys_path = "/etc/agenthub/vapid.json"

Push delivery still depends on a browser that supports service workers and the Push API. Outside localhost, use HTTPS.

[internal_grpc] Section

Internal gRPC control plane for remote nodes and actor CLI.

OptionTypeDefaultDescription
enabledbooleanfalseEnable internal gRPC server
listenstring"127.0.0.1:50051"gRPC bind address

[internal_grpc.security] Subsection

OptionTypeDefaultDescription
modestring"tls"Security mode: tls, mtls, or disabled
cert_dirstring"~/.agenthub/internal-grpc"TLS certificate directory

[internal_grpc.auth] Subsection

OptionTypeDefaultDescription
shared_secretstringnoneJWT signing secret
issuerstringnoneJWT issuer claim
audiencestringnoneJWT audience claim

[internal_grpc.bootstrap] Subsection

OptionTypeDefaultDescription
tokenstringnoneBootstrap token for token-based Agent Node join

This token is the primary Agent Node onboarding path. Operators copy it from the Agents page, configure it on the remote node, and then register the node's reachable grpc_target in the UI. QR onboarding is not used for Agent Nodes.

Complete Internal gRPC Example:

[server]
role = "node"
node_id = "node-east"

[internal_grpc]
enabled = true
listen = "0.0.0.0:50051"

[internal_grpc.security]
mode = "tls"
cert_dir = "/etc/agenthub/internal-grpc"

[internal_grpc.auth]
shared_secret = "your-256-bit-secret-here-minimum-32-chars"
issuer = "agenthub"
audience = "agenthub-internal"

[internal_grpc.bootstrap]
token = "bootstrap-token-for-remote-nodes"

[proxy] Section

HTTP proxy configuration.

OptionTypeDefaultDescription
httpstringnoneHTTP proxy URL
httpsstringnoneHTTPS proxy URL
allstringnoneProxy for all protocols

Proxy Example:

[proxy]
http = "http://proxy.company.com:8080"
https = "http://proxy.company.com:8080"

Environment Variables

All configuration options can be overridden via environment variables:

Environment VariableConfig Path
AGENTHUB_LISTENserver.listen
AGENTHUB_SAFE_PATHSsafe_paths (comma-separated)
AGENTHUB_WEB_DIRweb_dir
AGENTHUB_LOG_PATHlog_path
AGENTHUB_RP_IDweb.rp_id
AGENTHUB_RP_ORIGINweb.rp_origin
AGENTHUB_RP_NAMEweb.rp_name
AGENTHUB_CODEX_ACP_BINARYcodex_acp.binary
AGENTHUB_CODEX_ACP_DEFAULT_MODEcodex_acp.default_mode
AGENTHUB_HISTORY_EVENT_RETENTION_DAYShistory.event_retention_days
AGENTHUB_HISTORY_VACUUM_ON_CLEANUPhistory.vacuum_on_cleanup
AGENTHUB_INTERNAL_GRPC_ENABLEDinternal_grpc.enabled
AGENTHUB_INTERNAL_GRPC_LISTENinternal_grpc.listen
AGENTHUB_INTERNAL_GRPC_SECURITY_MODEinternal_grpc.security.mode
AGENTHUB_INTERNAL_GRPC_CERT_DIRinternal_grpc.security.cert_dir
AGENTHUB_INTERNAL_GRPC_AUTH_SHARED_SECRETinternal_grpc.auth.shared_secret
AGENTHUB_INTERNAL_GRPC_AUTH_ISSUERinternal_grpc.auth.issuer
AGENTHUB_INTERNAL_GRPC_AUTH_AUDIENCEinternal_grpc.auth.audience
AGENTHUB_INTERNAL_GRPC_BOOTSTRAP_TOKENinternal_grpc.bootstrap.token
AGENTHUB_HTTP_PROXYproxy.http
AGENTHUB_HTTPS_PROXYproxy.https
AGENTHUB_ALL_PROXYproxy.all
AGENTHUB_VAPID_SUBJECTpush.subject

Pyroscope Profiling

Continuous profiling is an operational opt-in and currently uses environment variables instead of ~/.agenthub/config.toml.

AgentHub starts a process-wide Pyroscope profiler only when all three variables are present with non-empty values:

  • PYROSCOPE_SERVER_ADDRESS
  • PYROSCOPE_BASIC_AUTH_USER
  • PYROSCOPE_BASIC_AUTH_PASSWORD

If only part of the configuration is present, AgentHub logs a warning and continues without profiling.

Example:

export PYROSCOPE_SERVER_ADDRESS="https://pyroscope.example.com"
export PYROSCOPE_BASIC_AUTH_USER="agenthub"
export PYROSCOPE_BASIC_AUTH_PASSWORD="super-secret"
agenthub

The current bootstrap uses the fixed application name agenthub.server.

Safe Paths

The safe_paths array defines which directories agents can access:

safe_paths = [
"/home/you/projects",
"/home/you/experiments",
"/data/shared",
]

Important Notes:

  • ~/.agenthub/worktrees is automatically included
  • All configured safe_paths are expanded (~$HOME)
  • Duplicate paths are deduplicated
  • Paths are validated at agent creation time

Configuration Validation

After updating configuration:

  1. Restart AgentHub:

    # If running as service
    systemctl restart agenthub

    # If running directly
    pkill agenthub && agenthub
  2. Verify Server Startup:

    curl http://localhost:8080/
  3. Test Configuration:

    # Create a test agent
    # Verify workdir validation works
    # Test internal gRPC (if enabled)
    agenthub actor inbox --actor-id test --limit 1

Production Configuration Example

# Production AgentHub Configuration
safe_paths = [
"/var/agenthub/workspaces",
"/data/repos",
]

[server]
listen = "0.0.0.0:8080"

[web]
rp_id = "agenthub.company.com"
rp_origin = "https://agenthub.company.com"
rp_name = "Company AgentHub"

[worktree]
default_root = "/var/agenthub/worktrees"

[history]
event_retention_days = 30
vacuum_on_cleanup = true
delete_batch_size = 5000

[push]
subject = "mailto:ops@company.com"

[internal_grpc]
enabled = true
listen = "0.0.0.0:50051"

[internal_grpc.security]
mode = "tls"
cert_dir = "/etc/agenthub/certs"

[internal_grpc.auth]
shared_secret = "change-me-to-256-bit-random-secret"
issuer = "agenthub"
audience = "agenthub-internal"

[proxy]
http = "http://proxy.company.com:8080"
https = "http://proxy.company.com:8080"

# Log to file for log rotation
log_path = "/var/log/agenthub/agenthub.log"

Troubleshooting

Config Changes Not Applied

  • Configuration is loaded at startup; restart required
  • Check file permissions on ~/.agenthub/config.toml
  • Verify TOML syntax is valid

Internal gRPC Connection Failures

  • Ensure shared_secret is explicitly set (not auto-generated)
  • Verify firewall allows traffic on gRPC port
  • Check TLS certificates exist in cert_dir

Path Validation Errors

  • Ensure paths in safe_paths exist and are readable
  • Remember that ~ is expanded to $HOME
  • Verify worktree directories are writable