Self-hosting
Guide

Troubleshoot self-hosting

Diagnose Agent Barn local and Kubernetes failures across startup, deployments, hooks, databases, storage, ingress, authentication, workers, Agents, telemetry, providers, and monitoring.

For
Platform engineers, self-hosted operators, and support teams
On this page
  1. Overview
  2. Identify the blast radius
  3. Collect diagnostics
  4. Troubleshoot local startup
  5. Troubleshoot deployment and hooks
  6. Troubleshoot pods and images
  7. Troubleshoot database and storage
  8. Troubleshoot networking and TLS
  9. Troubleshoot API, UI, and authentication
  10. Troubleshoot workers and Event Deliveries
  11. Troubleshoot Agent lifecycle
  12. Troubleshoot messages and telemetry
  13. Troubleshoot models and integrations
  14. Troubleshoot monitoring
  15. Recovery and escalation
  16. Next steps

Diagnostic outcome

What you will accomplish

This guide helps you:

  • Determine whether an incident is local, environment-wide, Organization-specific, or Agent-specific
  • Collect useful diagnostics without exposing credentials
  • Separate ingress failures from application failures
  • Diagnose Helm hooks, migrations, pods, images, databases, and PVCs
  • Trace Agent messages from the platform through the runtime and ingest API
  • Diagnose LiteLLM, OpenRouter, Firecrawl, email, and messaging platforms
  • Choose a recovery action appropriate to the failed component

Overview

Diagnose Agent Barn failures systematically across local development, Kubernetes, databases, networking, application services, Agent runtimes, providers, and monitoring.

Use this diagnostic sequence:

ScopeObserveCorrelateIsolateRecoverVerify

Begin with read-only inspection. Do not restart, redeploy, delete, rotate, or restore anything until you know which component failed and what state must be preserved.

Identify the blast radius

Use the smallest symptom that explains the incident.

SymptomStart with
One user cannot access an AgentAgent Access, Membership, active Organization, and HTTP status
One Agent failsAgent status, last_error, pod, health, logs, credentials, and runtime
All Agents on one platform failPlatform credentials, provider availability, and platform configuration
Agents answer but Activity is emptyIngest API, ingest URL, ingest key, and runtime telemetry plugin
Activity works but costs are emptyLiteLLM key identity and cost query path
UI loads but API calls failUI backend configuration, API Service, and ingress
UI and API are both unavailableIngress, API pod, database, DNS, and certificate
API is healthy but background work stopsRedis, worker, reconciliation CronJob, and Event Deliveries
Model requests failLiteLLM, OpenRouter, virtual keys, credit, and model allowlist
Firecrawl tools failFirecrawl API, browser service, RabbitMQ, Redis, and API key
Grafana is emptyPrometheus targets, Service discovery, and dashboard data source
Only production failsProduction namespace, secrets, hosts, images, and recent deployment
Only local development failsDocker, .env, port conflicts, k3d, images, and host routing

Interpret HTTP failures

StatusMeaning
400A business precondition or input failed
401The request is not authenticated
403The user is authenticated but lacks the required authority
404The resource is absent or intentionally hidden because it is inaccessible
409The request conflicts with current state
422Request validation failed
500An unexpected server failure occurred
502 or 503A proxy, dependency, startup, or availability failure occurred

Do not treat every 404 as missing data. Agent Barn uses inaccessible-resource responses to avoid exposing resources across authorization boundaries.

Collect diagnostics

Record the exact:

  • Environment
  • Namespace
  • Time and timezone
  • User-visible error
  • HTTP status
  • Affected Organization and Agent
  • Last known successful action
  • Recent deployment, migration, configuration, or credential change
  • Whether the issue is repeatable

Verify the Kubernetes target

Current Kubernetes context
kubectl config current-context

Confirm namespace access:

Namespace access
kubectl auth can-i get pods \
  --namespace agent-farm

Capture workload state:

Workload state
kubectl get pods,deployments,statefulsets,services,jobs,cronjobs,persistentvolumeclaims,ingress \
  --namespace agent-farm

Capture recent events:

Recent events
kubectl get events \
  --namespace agent-farm \
  --sort-by=.lastTimestamp

Capture Helm state:

Helm state
helm list --namespace agent-farm

Inspect a failed release:

Failed Helm release
helm status RELEASE_NAME \
  --namespace agent-farm

helm history RELEASE_NAME \
  --namespace agent-farm

Inspect a failing pod

Pod description
kubectl describe pod POD_NAME \
  --namespace agent-farm

Read current logs:

Current pod logs
kubectl logs POD_NAME \
  --namespace agent-farm \
  --all-containers \
  --tail=200

If the container restarted, read the terminated instance:

Previous pod logs
kubectl logs POD_NAME \
  --namespace agent-farm \
  --all-containers \
  --previous \
  --tail=200

Troubleshoot local startup

Local Docker and k3d

The standard local command is:

Start Agent Barn locally
./run.sh

It performs these operations in order:

  1. Checks Docker.
  2. Validates required .env values.
  3. Starts local LiteLLM and its PostgreSQL database.
  4. Starts or adopts the k3d cluster.
  5. Writes host and container kubeconfigs.
  6. Loads Hermes and OpenClaw images into k3d.
  7. Starts application PostgreSQL and Redis.
  8. Applies Alembic migrations.
  9. Starts API, worker, and UI.

The first failed stage normally identifies the subsystem to inspect.

Docker is unavailable

Check the engine:

Docker engine
docker info

Inspect Compose services:

Compose services
docker compose -f compose.yml ps

Read local service logs:

Local service logs
docker compose -f compose.yml logs \
  --tail=200 \
  db redis api worker ui

Common causes include:

  • Docker Desktop is not running
  • Docker is in Windows-container mode instead of Linux-container mode
  • The Docker VM lacks memory or disk space
  • Another stack already owns ports 3000, 8000, 8001, 7070, or 16443
  • Native make dev-* services are running alongside the Compose stack

Do not run native API/UI services and the full containerized stack on the same ports.

.env is missing

If .env does not exist, run.sh copies .env.spec and exits. Fill the required values, then rerun it.

If startup reports missing values, correct each one instead of bypassing validation.

Keep these stable across restarts:

Stable values
SECRET_SIGNING_KEY
AGENT_TOKEN_ENCRYPTION_KEY
LITELLM_MASTER_KEY

API startup data initialization fails

A common startup error is:

Startup error
500: Error while initializing startup data

Read the earlier API log lines for the underlying exception.

For a new database, confirm PLATFORM_ADMIN_CREDENTIALS uses:

Credential format
email:password

The password must contain at least:

  • Eight characters
  • One uppercase letter
  • One lowercase letter
  • One digit

Verify local k3d

Use the host kubeconfig:

Local k3d cluster
export KUBECONFIG=.k3d/kubeconfig-host.yaml
kubectl get nodes
kubectl get pods --all-namespaces

The default cluster is:

Default cluster
agentfarm-dev

Host tools use:

Host kubeconfig
.k3d/kubeconfig-host.yaml

The containerized API uses:

Container kubeconfig
/app/.k3d/kubeconfig-internal.yaml

Kubeconfig certificate error

A local cluster created before host.docker.internal was added to the API-server certificate can produce:

Certificate error
x509: certificate is valid for 127.0.0.1, not host.docker.internal

Confirm the error is from the local containerized API. If so, recreate the local cluster:

Recreate the local cluster
./stop.sh --clean
./run.sh

Invalid kubeconfig path

If Agent start fails with:

Kubeconfig error
Invalid kube-config file. No configuration found.

Verify the mounted path inside the API container:

Mounted kubeconfig
docker exec aai_api \
  ls -l /app/.k3d/kubeconfig-internal.yaml

For native API development, K8S_KUBECONFIG_PATH must be absolute or resolve relative to api/, because make dev-api runs from that directory.

Native API creates an Agent that cannot answer

For native development, set the API’s LiteLLM URL:

Native API LiteLLM URL
LITELLM_BASE_URL=http://127.0.0.1:7070

If it is empty, Agent creation can complete without minting a LiteLLM key, leaving the Agent unable to make model requests.

Agent pods must use the host-facing address:

Agent LiteLLM URL
AGENT_LITELLM_BASE_URL=http://host.docker.internal:7070

A loopback address inside an Agent pod points back to that pod, not to the host.

Troubleshoot deployment and hooks

Deployed Kubernetes

Start with:

Helm releases and Jobs
helm list --namespace agent-farm
kubectl get jobs,pods --namespace agent-farm

Agent Barn uses Helmfile release dependencies. A failed sync can leave earlier releases updated while later releases remain unchanged.

Inspect each affected release rather than assuming the entire platform rolled back.

API pre-upgrade hooks

The API release runs these important hooks:

  1. API and registry Secret resources
  2. LiteLLM virtual-key Job
  3. Alembic migration Job
  4. API and worker rollout

Successful hook Jobs are removed. Failed Jobs remain.

LiteLLM key hook fails

Inspect:

LiteLLM key Job
kubectl describe job agentbarn-api-litellm-key \
  --namespace agent-farm

kubectl logs job/agentbarn-api-litellm-key \
  --namespace agent-farm

Check:

  • LiteLLM pod readiness
  • LiteLLM master key
  • agent-farm-user ServiceAccount permissions
  • Access to create or update litellm-api-key
  • Network access to http://litellm:4000
  • The existing agentbarn-api key alias

The key Job deletes and recreates the API’s LiteLLM virtual key. If a later hook fails, existing API or worker pods may still hold the deleted key until they are replaced with pods that load the updated Secret.

Migration hook fails

Inspect:

Migration Job
kubectl describe job agentbarn-api-migrate \
  --namespace agent-farm

kubectl logs job/agentbarn-api-migrate \
  --namespace agent-farm

Check the current revision:

Current Alembic revision
kubectl exec \
  --namespace agent-farm \
  deployment/agentbarn-api \
  -- sh -c 'cd /app/api && alembic current'

Do not retry until you know whether the migration transaction committed any schema or data changes.

A Helm rollback does not downgrade Alembic.

Deployment times out

Helmfile uses a 600-second timeout. Inspect:

  • Jobs still running
  • Pods waiting for readiness
  • Image pulls
  • PVC binding
  • Database connectivity
  • Certificate challenges
  • Resource quota failures
  • LiteLLM readiness

Preserve failed hook logs before another deployment. The next hook execution can remove the previous failed Job through its before-hook-creation policy.

Troubleshoot pods and images

Deployed Kubernetes

List non-ready pods:

Pods
kubectl get pods \
  --namespace agent-farm

Pending

Describe the pod:

Pending pod
kubectl describe pod POD_NAME \
  --namespace agent-farm

Look for:

  • Unschedulable CPU or memory requests
  • Namespace quota exhaustion
  • Unbound PVCs
  • Missing ServiceAccounts
  • Missing Secrets
  • Node selectors or taints
  • Admission failures

ErrImagePull or ImagePullBackOff

Inspect the pod events and image reference:

Pod image reference
kubectl get pod POD_NAME \
  --namespace agent-farm \
  -o jsonpath='{.spec.containers[*].image}{"\n"}'

Confirm the registry Secret exists:

Registry Secret
kubectl get secret agentbarn-api-registry-pull-secret \
  --namespace agent-farm

Check:

  • Image repository
  • Image tag
  • Registry hostname
  • Registry credentials
  • Pull Secret name
  • Registry reachability
  • Whether the image was published

Do not decode or share the pull Secret as part of ordinary diagnosis.

Local Agent image pull failure

Local Docker and k3d

Local Agent images use IfNotPresent and are normally imported into k3d.

Reload them:

Reload local runtime images
bash docker/k3d/k3d-load-images.sh

Or reload one runtime:

Reload Hermes
TARGET=hermes bash docker/k3d/k3d-load-images.sh
Reload OpenClaw
TARGET=openclaw bash docker/k3d/k3d-load-images.sh

The image tags in .env must match the respective runtime VERSION files.

A local warning about FailedToRetrieveImagePullSecret can be harmless when the image is already imported. It becomes material when accompanied by ErrImagePull or ImagePullBackOff.

Imported images can be garbage-collected when the Docker host is under disk pressure. Inspect:

Docker capacity
docker system df
docker stats --no-stream

Then reimport the runtime image.

CrashLoopBackOff

Read both current and previous logs:

Current and previous pod logs
kubectl logs POD_NAME \
  --namespace agent-farm \
  --all-containers \
  --tail=200

kubectl logs POD_NAME \
  --namespace agent-farm \
  --all-containers \
  --previous \
  --tail=200

Check termination state:

Pod termination state
kubectl describe pod POD_NAME \
  --namespace agent-farm

If the exit code is 137 or the reason is OOMKilled, inspect memory pressure.

For local development, the Docker VM may be exhausted even when the Agent pod has no explicit memory limit. Increase Docker Desktop memory or reduce the number of active workloads.

Troubleshoot database and storage

Deployed Kubernetes

API health fails

Port-forward the API Service:

API port-forward
kubectl port-forward \
  --namespace agent-farm \
  service/agentbarn-api \
  8000:8000

Then request:

API health
curl --fail http://localhost:8000/api/v1/health

If this fails, inspect:

API logs
kubectl logs deployment/agentbarn-api \
  --namespace agent-farm \
  --tail=200

Inspect application PostgreSQL:

Database resources
kubectl get pod,service,endpoints,persistentvolumeclaim \
  --namespace agent-farm
Database logs
kubectl logs statefulset/postgres-app \
  --namespace agent-farm \
  --tail=200

The API health endpoint primarily verifies PostgreSQL connectivity. It does not prove that Redis, workers, Agents, LiteLLM, Firecrawl, or providers are healthy.

Authentication fails after a password change

Changing the PostgreSQL Secret does not change the password stored in an already initialized PostgreSQL data directory.

If a deployment value was changed accidentally:

  • Restore the previous configured password
  • Restart only the workloads that need to reload it
  • Verify connectivity

For an intentional rotation, follow a coordinated database credential migration.

PVC remains Pending

Inspect:

PersistentVolumeClaim
kubectl describe persistentvolumeclaim PVC_NAME \
  --namespace agent-farm

Check:

  • StorageClass name
  • Provisioner availability
  • Access mode
  • Requested capacity
  • Namespace quota
  • Node topology

Changing STORAGE_CLASS does not move data from an existing PVC. StatefulSet volume claim templates are not an in-place storage migration.

Database or Agent workspace data is missing

Stop state-changing operations and establish:

  • Whether the original PVC still exists
  • Whether a replacement PVC was created
  • Which node or storage backend held the data
  • Which backup corresponds to the failed environment
  • Whether stable encryption keys are available

Troubleshoot networking and TLS

Deployed Kubernetes

Use port-forwarding to separate application health from ingress health.

Test API without ingress

API port-forward
kubectl port-forward \
  --namespace agent-farm \
  service/agentbarn-api \
  8000:8000
API health
curl --fail http://localhost:8000/api/v1/health

Test UI without ingress

UI port-forward
kubectl port-forward \
  --namespace agent-farm \
  service/agentbarn-ui \
  3000:3000

Open:

Local UI
http://localhost:3000

If port-forwarding works but the public hostname does not, inspect DNS, Traefik, ingress, and TLS rather than the application container.

Inspect ingress and certificates

Ingress and certificate resources
kubectl get ingress,certificate,challenge \
  --namespace agent-farm
Ingress details
kubectl describe ingress agentbarn-api \
  --namespace agent-farm

kubectl describe ingress agentbarn-ui \
  --namespace agent-farm

Check:

  • DNS resolves to the ingress address
  • Hostnames match the configured environment
  • Traefik is available
  • The configured ClusterIssuer exists
  • HTTP-01 challenges can reach the cluster
  • Certificate hostnames match the ingress
  • TLS Secrets exist

The API ingress intentionally exposes only /api. A public request to /metrics should not work; Prometheus scrapes it through the internal Service.

Service has no endpoints

Inspect:

Services and endpoints
kubectl get service,endpoints \
  --namespace agent-farm

A Service without endpoints usually means:

  • Its selector does not match a pod
  • The expected pod does not exist
  • The pod is not ready
  • The target port name is incorrect

Troubleshoot API, UI, and authentication

UI loads but API calls fail

Check:

  • agentbarn-api Service and endpoints
  • UI server logs
  • API logs
  • UI backend URL used when the image was built
  • Browser network response status
  • The public API hostname and TLS
  • Whether UI and API images belong to the same release

The UI proxies API traffic from inside the namespace. A browser-visible UI does not prove that the UI server can resolve or reach the API Service.

Login fails for every user

Check:

  • API health
  • Application database
  • SECRET_SIGNING_KEY
  • Browser cookies and configured application URL
  • UI and API hostname consistency
  • Recent key or domain changes

Changing SECRET_SIGNING_KEY invalidates assumptions behind existing signed sessions and tokens.

Initial Platform Administrator login fails

For a fresh database, inspect API bootstrap logs and verify:

Platform Administrator credentials
PLATFORM_ADMIN_CREDENTIALS=email:password

The password requires eight or more characters with uppercase, lowercase, and a digit.

Do not expect changing the environment value to behave like an ordinary user password-reset workflow for an established deployment.

Password reset or invitation email does not arrive

Check:

  • CLOUDFLARE_ACCOUNT_ID
  • CLOUDFLARE_API_TOKEN
  • SENDER_EMAIL
  • Email Sending permission
  • Verified sending domain
  • Provider quota
  • API logs

When email configuration is absent, Agent Barn logs the condition and performs a no-op instead of making API health fail.

One user receives 403 or 404

Check:

  • Active Organization
  • Membership
  • Organization Role
  • Agent Access Role
  • Explicit Agent Access
  • Agent General Access
  • Whether the resource belongs to another Organization

Platform Administrator status does not automatically provide Organization authority through ordinary Organization routes.

Troubleshoot workers and Event Deliveries

The main API can remain healthy while background delivery is unavailable.

Inspect the worker:

Worker deployment
kubectl get deployment agentbarn-api-worker \
  --namespace agent-farm
Worker logs
kubectl logs deployment/agentbarn-api-worker \
  --namespace agent-farm \
  --tail=200

Inspect Redis:

Redis resources
kubectl get pod,service,endpoints \
  --namespace agent-farm
Redis logs
kubectl logs deployment/redis \
  --namespace agent-farm \
  --tail=200

Inspect reconciliation:

Event reconciler
kubectl get cronjob agentbarn-api-event-reconciler \
  --namespace agent-farm
Jobs
kubectl get jobs \
  --namespace agent-farm

Platform Administrators can review Event Deliveries at:

Event Deliveries
/dashboard/platform/event-deliveries

Interpret Event Delivery state

StatusMeaning
PENDINGCommitted but not yet successfully enqueued
ENQUEUEDPublished to the worker transport
PROCESSINGClaimed by a worker
SUCCEEDEDHandler completed
DEAD_LETTEREDTerminal failure or retries exhausted

Reconciliation republishes eligible pending and stale deliveries. It does not automatically replay DEAD_LETTERED deliveries.

Check:

  • Worker readiness
  • Redis connectivity
  • Reconciliation schedule and last run
  • attempt_count
  • Bounded last_error
  • Dead-letter reason
  • Whether the handler supports the event name and schema version

Do not modify Event Delivery rows directly as a routine repair.

Troubleshoot Agent lifecycle

Begin in Agent Barn with:

  • Agent status
  • last_error
  • Health
  • Current logs
  • Historical log snapshots
  • Runtime
  • Platform
  • Selected model
  • Template or Override version
  • Skill versions
  • Credentials

A successful Agent start clears the previous persisted error.

Inspect Agent Kubernetes resources

Agent Kubernetes resources
kubectl get deployments,services,persistentvolumeclaims \
  --namespace agent-farm \
  --selector agentbarn.io/component=agent \
  --show-labels

Inspect the selected Agent pod:

Agent pod
kubectl describe pod AGENT_POD \
  --namespace agent-farm
Agent logs
kubectl logs AGENT_POD \
  --namespace agent-farm \
  --all-containers \
  --tail=200

If it restarted:

Previous Agent logs
kubectl logs AGENT_POD \
  --namespace agent-farm \
  --all-containers \
  --previous \
  --tail=200

Agent status is RUNNING but no pod exists

Establish whether:

  • The pod was manually deleted
  • The Deployment was deleted
  • The Agent resources exist in another namespace
  • The API kubeconfig targets the wrong cluster
  • The staging API created resources in production
  • A release or cleanup operation removed the workload

After correcting the infrastructure boundary, stop and start the affected Agent deliberately so the API rebuilds its resources.

Agent remains STARTING

Check:

  • Pod scheduling
  • Image availability
  • Runtime startup logs
  • Health-server readiness
  • Platform credentials
  • LiteLLM reachability
  • External platform reachability

Agent becomes ERROR

Read last_error before retrying. Common causes include:

  • Invalid Slack, Telegram, Teams, or Discord credentials
  • Unsupported runtime/platform pairing
  • Kubernetes authorization failure
  • Missing runtime image
  • Invalid generated configuration
  • Provider connectivity failure
  • PVC or scheduling failure

Runtime and platform compatibility

RuntimeSupported platforms
HermesSlack, Telegram, Discord
OpenClawSlack, Teams, Telegram, Discord

A Teams Agent cannot use Hermes.

Agent does not respond in a shared channel

In groups, channels, guilds, and team conversations, the Agent requires a fresh mention on each message. A prior mention in the thread does not authorize later unmentioned messages.

Direct messages are exempt.

Also check:

  • Bot membership in the channel
  • Channel or guild allowlist
  • User restrictions
  • Bot scopes and permissions
  • Whether the message was addressed to another bot
  • Platform event subscriptions

Troubleshoot messages and telemetry

An Agent can answer successfully while conversations, messages, and Tool Calls remain absent from Agent Barn.

Agent runtimes push telemetry to the ingest API on port 8001. The main product API uses port 8000.

Test deployed ingest

Deployed Kubernetes

Port-forward the ingest endpoint:

Ingest port-forward
kubectl port-forward \
  --namespace agent-farm \
  service/agentbarn-api \
  8001:8001

Then request:

Ingest OpenAPI
curl --fail http://localhost:8001/ingest/v1/openapi.json

A successful response proves the process is reachable through the Service. Runtime event submission also requires the Agent’s per-start ingest key.

Check:

  • Ingest process and Service endpoint
  • Agent INGEST_BASE_URL
  • Agent ingest Secret
  • Runtime telemetry plugin
  • API logs for ingest authentication failures
  • Agent logs for event delivery failures
  • Whether the Agent was restarted with current telemetry configuration

Test local ingest from an Agent-like pod

Local Docker and k3d
Local ingest reachability
kubectl run ingest-check \
  --rm \
  --interactive \
  --tty \
  --restart=Never \
  --image=curlimages/curl \
  -- curl -sS -o /dev/null -w '%{http_code}\n' \
  http://host.docker.internal:8001/ingest/v1/openapi.json

Expected:

Expected status
200

If it cannot connect:

  • Confirm make dev-api or make dev-ingest is running
  • Confirm ingest binds to 0.0.0.0
  • Confirm INGEST_BASE_URL uses host.docker.internal
  • On native Linux, confirm CoreDNS and the host firewall allow the k3d bridge to reach port 8001

Activity exists but costs are empty

Costs use a separate path. The API queries LiteLLM and attributes spend through each Agent’s LiteLLM key identity.

Check:

  • Agent LiteLLM key exists
  • Key alias and Agent association
  • LiteLLM database
  • LiteLLM spend metrics
  • Time range and Organization
  • Cost permissions
  • Whether the model request actually reached LiteLLM

Troubleshoot models and integrations

Model requests fail

Check LiteLLM:

LiteLLM resources
kubectl get pod,service,endpoints \
  --namespace agent-farm
LiteLLM logs
kubectl logs deployment/litellm \
  --namespace agent-farm \
  --tail=200

Port-forward it:

LiteLLM port-forward
kubectl port-forward \
  --namespace agent-farm \
  service/litellm \
  4000:4000

Check readiness:

LiteLLM readiness
curl --fail http://localhost:4000/health/readiness

Common model failures include:

ResponseLikely cause
401Invalid or expired model key
402OpenRouter credits exhausted
403Provider access denied
502LiteLLM or its upstream is unreachable

Also verify:

  • LITELLM_MASTER_KEY remained stable
  • The API’s litellm-api-key Secret exists
  • The Agent restarted after a runtime or key repair
  • Selected model is allowed by AGENT_MODEL_ALLOWLIST
  • Default model uses litellm/openrouter/<model-slug>
  • OpenRouter supports the requested model

Firecrawl calls fail

Inspect:

  • Firecrawl API pod
  • Playwright service
  • RabbitMQ
  • Redis
  • Firecrawl PostgreSQL
  • Firecrawl API key
  • Agent-level credential override
  • Cluster egress

Use Agent logs and the Tool Call result to determine whether the failure occurred during authentication, scraping, browser execution, or result ingestion.

Google Workspace authentication fails

Check:

  • Google client ID and secret
  • Authorized redirect URI
  • Exact WEB_APP_URL
  • Callback:
Google callback
<WEB_APP_URL>/api/v1/integrations/google/callback
  • Google consent-screen access
  • Requested scopes
  • Existing credential ownership

Platform credentials fail

Use the Agent configuration’s validation action and then inspect Agent health and logs.

Check:

  • Slack bot and app tokens
  • Telegram bot token
  • Discord bot token and permissions
  • Teams application configuration
  • Channel, guild, chat, team, or user restrictions
  • Whether the credential belongs to the configured platform account

Do not paste tokens directly into logs or diagnostic messages.

Stored credentials cannot decrypt

This usually indicates the application database and AGENT_TOKEN_ENCRYPTION_KEY do not belong to the same recovery set.

Restore the matching encryption key. Replacing provider credentials one by one does not repair other encrypted data.

Troubleshoot monitoring

If Grafana is available but empty, inspect Prometheus targets.

Port-forward Prometheus:

Prometheus port-forward
kubectl port-forward \
  --namespace agent-farm \
  service/monitoring-prometheus-server \
  9090:80

Open:

Prometheus targets
http://localhost:9090/targets

Expected jobs include:

Expected Prometheus jobs
agentbarn-api
litellm
agent
kube-state-metrics
Prometheus self-scrape

Agents are absent from monitoring

Agent discovery requires:

Agent discovery label
agentbarn.io/component=agent

Inspect:

Monitored Agent Services
kubectl get services \
  --namespace agent-farm \
  --selector agentbarn.io/component=agent \
  --show-labels

Agents created before monitoring support may need to be stopped and started once.

If only the legacy component label is missing, patch Services without restarting:

Add the Agent discovery label
kubectl label services \
  --namespace agent-farm \
  --selector agentfarm.io/component=agent \
  agentbarn.io/component=agent \
  --overwrite

Slack alerts do not arrive

Inspect Alertmanager:

Alertmanager port-forward
kubectl port-forward \
  --namespace agent-farm \
  service/monitoring-alertmanager \
  9093:9093

Open:

Alertmanager
http://localhost:9093

Check:

  • Alert is firing in Prometheus
  • Alertmanager received it
  • SLACK_ALERTS_WEBHOOK_URL is valid
  • The Secret is mounted
  • The webhook can post to #alerts
  • Environment label is correct
  • No active silence suppresses it

Resource or certificate alert is missing

The built-in stack does not alert on:

  • Node health
  • CPU or memory capacity
  • cAdvisor metrics
  • PVC capacity
  • Certificate expiry
  • Backups
  • Redis
  • Worker readiness

Use external infrastructure, storage, certificate, backup, and synthetic monitoring for those signals.

Recovery and escalation

Use the least invasive recovery that addresses the confirmed cause.

Recovery ladder

  1. Correct a user, Organization, Agent, or provider configuration.
  2. Allow Kubernetes to recreate a failed stateless pod.
  3. Restart one identified stateless workload.
  4. Redeploy the same reviewed release and configuration.
  5. Stop and start one affected Agent.
  6. Deploy a forward corrective release.
  7. Restore a previous application image compatible with the current schema.
  8. Run a tested database downgrade.
  9. Restore the matching database, volume, and stable-key recovery set.

Before restarting a workload

Capture:

  • Current and previous logs
  • Pod description
  • Events
  • Image reference
  • Helm revision
  • Relevant configuration names
  • Database revision when applicable

Before retrying a failed deployment

Capture failed hook Jobs. The next deployment may delete them.

Establish:

  • Which Helm releases already changed
  • Whether the LiteLLM virtual key rotated
  • Whether the migration ran
  • Whether the database revision changed
  • Whether any new pods became ready
  • Whether old pods still use previous Secret values

Before restoring data

Escalation package

Provide:

  • Environment and namespace
  • Incident start time and timezone
  • Exact user-visible symptom
  • Reproduction steps
  • Affected Organization and Agent identifiers, appropriately redacted
  • HTTP status
  • Helm release status and revisions
  • Workload and image inventory
  • Pod state and relevant sanitized logs
  • Kubernetes events
  • Database migration revision
  • Recent deployment or configuration change
  • Actions already attempted
  • Current user impact

Never include credentials or Secret contents.

Quick diagnostic checklist

Next steps

Once the platform is stable, use the development guides to understand the system boundaries, safely extend Agent Barn, and add regression coverage for recurring failures.

Develop and extend Agent Barn
Documentation