Skip to content

Agent Configuration

The agent service is configured via environment variables.

VariableDefaultDescription
NATS_URLNATS JetStream URL (required)
DATABASE_HOSTPostgreSQL host (omit for in-memory sessions)
DATABASE_PASSWORDPostgreSQL password
AWS_REGIONus-east-1AWS region for Bedrock
LOG_LEVELinfoStructured log level
ENVIRONMENTlocal or production identifier
POSTHOG_PROJECT_API_KEYEnables LLM analytics and error tracking
POSTHOG_PROJECT_IDEnables /debug command trace URLs
JIRA_BASE_URLJira instance URL (e.g., https://fetchrewards.atlassian.net)
JIRA_EMAILJira account email for API authentication
JIRA_API_TOKENJira API token (paired with email for basic auth)
JIRA_PROJECTDefault Jira project key for ticket creation
VariableDefaultDescription
PORT8080HTTP server port
SLACK_BOT_TOKENSlack bot OAuth token (xoxb-...)
SLACK_SIGNING_SECRETSlack app signing secret for webhook verification
SLACK_FEED_CHANNEL_IDChannel for post_to_feed tool
GITHUB_APP_IDGitHub App ID
GITHUB_APP_INSTALLATION_IDGitHub App installation ID
GITHUB_APP_PRIVATE_KEYGitHub App private key (PEM format)
SOURCEGRAPH_TOKENSourcegraph API token for code search MCP
BEDROCK_MODEL_IDus.anthropic.claude-sonnet-4-20250514-v1:0AWS Bedrock model ID
S3_BUCKETS3 bucket for session state persistence (pause/resume)
CLOUDFRONT_DOMAINCloudFront domain for permanent image URLs
SESSION_POD_IMAGEContainer image URI for session pods (enables EKS execution)
EKS_NAMESPACEbucky-sessionsKubernetes namespace for session pods
SESSION_SERVICE_ACCOUNTsession-runnerKubernetes ServiceAccount for session pods
POD_TOKEN_SECRETHMAC secret for signing pod-bound JWTs
OKTA_ISSUEROkta OIDC issuer URL for dashboard JWT auth
JIRA_ACCOUNT_IDJira account ID for ticket assignment
AGENT_BASE_URLPublic URL of the agent service (for callbacks)
PROMETHEUS_URLPrometheus query endpoint for metrics dashboard
CELESTIALS_BASE_URLBase URL for celestials service (team/Pack lookups)
Terminal window
cd agent
cp .env.example .env # fill in values
make run

For database sessions locally, start PostgreSQL and NATS with Docker:

Terminal window
cd agent
docker compose up -d

When DATABASE_HOST is unset, the agent falls back to InMemorySessionService — sessions are lost on restart but no database is needed. NATS is always required (NATS_URL=nats://localhost:4222).

For local Kubernetes (EKS session pods), use k3d:

Terminal window
cd agent
make k8s-setup # bootstrap k3d cluster with namespace and secrets

Set KUBECONFIG_PATH to the k3d kubeconfig and SESSION_POD_IMAGE to a locally built image (make docker-build-base).

Buck is deployed to ECS via FSD. The deployment config defines:

  • ECR repository: ad-tools-agent (Buck)
  • Environment variables: Plain values in environment_variables
  • Secrets: Sensitive values from AWS Secrets Manager in secrets
  • IAM policy: bedrock:InvokeModel on Claude models
  • Dependencies: Aurora PostgreSQL database, S3 buckets, CloudFront distribution, NATS JetStream cluster

Stage/prod-specific values are configured in the variables section of each FSD config.