Skip to Content
AgentShield
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 approver role 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_timeout in 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

CadenceTask
ContinuouslyAlerts routed through an Alertmanager
DailyTriage open alerts and incidents; export the audit head
WeeklyReview deny trends per tool; review members and roles
MonthlyReview policies against actual usage; rotate long-lived tool credentials
QuarterlyRestore 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.

ScenarioProperty
prompt-injectionUntrusted content cannot change an authorization outcome
mcp-tool-poisoningA tool description that asks for more is still denied unless policy allows it
memory-poisoningRetrieved memory is not a grant
unauthorized-tool-invocationAn action outside allow and approval is denied
duplicate-tool-requestsA repeated idempotency key does not repeat a side effect
infinite-tool-call-loopA tool-call budget terminates the execution
api-timeoutA timeout is a failure, not an allow, and is still audited
network-failureA dependency error fails closed
expired-agent-credentialsAn expired or revoked credential is rejected
excessive-resource-consumptionA budget breach terminates the execution
malicious-agent-delegationA delegated call carries the caller's identity and cannot approve itself
context-overflowAn 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

  1. Read the release's ADRs and migration files.
  2. Back up PostgreSQL and export the audit head.
  3. Apply migrations with the owner role.
  4. Roll out verified, digest-pinned images.
  5. Run the chaos catalog and a sample.echo smoke test.

Was this page helpful?

On this page