Operations
Operational Best Practices
Routines and habits for running AgentShield day to day. Policy change management, approvals, key hygiene, monitoring, and resilience testing.
Policy change management
- Keep policy documents in source control and apply them through
PUT /api/v1/policies/{id}from a reviewed pipeline, or through the console by owners and admins only. - Change one thing at a time and watch the Denied share panel afterwards. A spike usually means a missing allow.
- Remember there is no cache: a new version takes effect on the next authorize request.
- Use the policy playground to reason about precedence before you change a production policy.
Approvals
- Staff the
approverrole for the hours agents run. Held calls expire after 15 minutes. - Approve only what the row shows. The approval binds to the exact request, but you are still responsible for judging it.
- Watch for repeated held calls with slightly different arguments; that pattern often indicates an agent trying to get around a hold.
- Configure
approval_timeoutin LangChain and CrewAI tools so agents wait for a decision rather than giving up.
Agent key hygiene
- Rotate agent keys on a schedule and on staff or host changes.
- Never copy a seed between environments; register separate agents for development, staging, and production.
- Suspend agents that are idle for long periods; resume them when needed.
Monitoring routine
| Cadence | Task |
|---|---|
| Continuously | Alerts routed through an Alertmanager |
| Daily | Triage open alerts and incidents; export the audit head |
| Weekly | Review deny trends per tool; review members and roles |
| Monthly | Review policies against actual usage; rotate long-lived tool credentials |
| Quarterly | Restore drill; full chaos catalog run |
Resilience testing
Owners and admins can run the chaos catalog from the console's Chaos section or POST /api/v1/chaos/experiments. Each scenario exercises the gateway's real authorization, limit, timeout, and body-limit code with fixtures, and records passed only when the defensive behavior was observed.
| Scenario | Property |
|---|---|
prompt-injection | Untrusted content cannot change an authorization outcome |
mcp-tool-poisoning | A tool description that asks for more is still denied unless policy allows it |
memory-poisoning | Retrieved memory is not a grant |
unauthorized-tool-invocation | An action outside allow and approval is denied |
duplicate-tool-requests | A repeated idempotency key does not repeat a side effect |
infinite-tool-call-loop | A tool-call budget terminates the execution |
api-timeout | A timeout is a failure, not an allow, and is still audited |
network-failure | A dependency error fails closed |
expired-agent-credentials | An expired or revoked credential is rejected |
excessive-resource-consumption | A budget breach terminates the execution |
malicious-agent-delegation | A delegated call carries the caller's identity and cannot approve itself |
context-overflow | An oversized request is rejected before evaluation |
Run the catalog after upgrades and configuration changes.
Capacity
- Watch database growth: decisions, events, and chain links are append-only.
- Keep the relay at one replica, and watch
agentshield_relay_outbox_oldest_seconds. - Scale gateway and analyzer replicas on CPU.
Upgrades
- Read the release's ADRs and migration files.
- Back up PostgreSQL and export the audit head.
- Apply migrations with the owner role.
- Roll out verified, digest-pinned images.
- Run the chaos catalog and a
sample.echosmoke test.
Was this page helpful?