Troubleshooting
Diagnose common AgentShield problems, from signature failures and unexpected denies to startup errors, circuits, and event pipeline lag.
Agent requests
- The public key registered for the agent does not match the seed the client uses. Re-derive it with
public_key(seed)and compare with the agent's fingerprint. - The agent id is wrong or belongs to another environment.
- The client clock is more than 60 seconds off. Check NTP on the agent host.
- A proxy modifies the body (re-indents or re-encodes JSON). The gateway verifies the exact bytes; send the body unmodified.
- A custom client signs a different serialization than it sends. Serialize once and sign that buffer.
A request was retried with the same nonce. Every request, including retries, needs a new nonce and signature. The SDKs do this automatically; check custom transports and retry middleware.
The request to the gateway includes an Authorization header. Remove it; agents authenticate with signature headers only.
No policy lists the operation. Remember that policy lists contain operations (for example http.get), not tool names. Add the operation to the organization or agent policy's allowed list.
Neither an organization policy nor an agent policy is active. Create one with POST /api/v1/policies.
The action has allow resource rules, and the requested resource matches none of them exactly. Resource rules have no wildcards. For http.request, the resource is the canonical URL without a query string.
The client's organization_id is not the agent's organization. Use the organization_id returned when the agent was registered.
An operator suspended or revoked the agent. Resume a suspended agent with POST /api/v1/agents/{id}/resume; a revoked agent must be re-registered.
The agent exceeded 60 requests, 30 calls to one tool, or 100,000 tokens in 60 seconds. Back off; counters reset with the window. A loop in the agent is the usual cause.
Execution
The tool name has no adapter, or the adapter does not support the operation. Only sample.echo is registered by default; set GATEWAY_TOOLS_CONFIG to enable http.request. Check the gateway's startup log line listing adapters.
Execute received different arguments from authorize. Pass exactly the same object. The SDKs' call_tool/callTool do this automatically.
A previous execute of this decision failed or was interrupted after dispatch. AgentShield never runs it again. Authorize a new call.
For http.request, use a lowercase host, no query string, fragment, or userinfo, and no . or .. segments. The error message shows the canonical form. Put query parameters in arguments.query.
The allowed host resolves to a private, loopback, link-local, or other internal address. This is SSRF protection. For local development only, set allow_private_networks in the tools file.
The tool failed five times within a minute. The circuit stays open for 30 seconds. Investigate the upstream; the approval and decision remain usable afterwards.
The adapter exceeded its deadline (2 s default, 5 s for http.request unless configured). The execution is marked failed and will not be retried; authorize a new call. Raise the timeout in the tools file (up to 30 s) if the upstream is legitimately slow.
The gateway cannot reach the analyzer within INTELLIGENCE_TIMEOUT. Check INTELLIGENCE_URL, the analyzer's readiness, the shared INTELLIGENCE_TOKEN, and the size of results.
Startup
| Message | Fix |
|---|---|
production mode requires DATABASE_URL to use the agentshield_app role… | Connect as agentshield_app |
production mode requires https for a non-loopback INTELLIGENCE_URL | Put TLS in front of the analyzer, or run it on loopback |
production mode requires INTELLIGENCE_TOKEN | Set a 32+ character token on both gateway and analyzer |
http tool: environment variable X is empty | Set the credential variable the tools file references |
tools config is invalid | The tools file has unknown fields or invalid JSON |
GATEWAY_METRICS_ADDR must differ from GATEWAY_HTTP_ADDR | Use a separate metrics port, or off |
production mode requires tls:// for a non-loopback NATS_URL | Use TLS for NATS |
production mode requires MINIO_USE_SSL=true… | Enable TLS for object storage |
Readiness stays 503
| Service | Check |
|---|---|
| Gateway | DATABASE_URL and REDIS_URL are set and both answer |
| Control plane | DATABASE_URL answers |
| Event relay | PostgreSQL and NATS answer; the outbox's oldest event is under a minute old |
Console
The dashboard refuses cross-origin writes. Behind a proxy that rewrites Host, set DASHBOARD_ORIGIN to the public origin.
The member signed in with a temporary password. They must set a new password first.
The stored object's SHA-256 no longer matches the database record. Treat the object store as potentially tampered with; the event is recorded as evidence.integrity_failed.
Event pipeline
| Symptom | Check |
|---|---|
OutboxFallingBehind alert | Relay logs; NATS reachability and credentials |
Backlog metric is -1 | The relay cannot read the outbox: database connectivity or role |
| No evidence bundles | MINIO_ENDPOINT and credentials on the relay; bucket exists |
| Old events never published | Events written before migration 0006 are not in the outbox |
Local data
New migration files are not applied to an existing Compose volume. Apply them with psql, or reset with docker compose down -v if you can lose local data.
Was this page helpful?
Incident Investigation
A runbook for investigating suspicious agent behavior with AgentShield's incidents, alerts, events, evidence, and credential controls.
Operational Best Practices
Routines and habits for running AgentShield day to day. Policy change management, approvals, key hygiene, monitoring, and resilience testing.