Configure Agent Policies
This guide covers common operational tasks for configuring AgentPolicy resources. For the full field reference, see the AgentPolicy CRD Reference.
Prerequisites
Section titled “Prerequisites”- Istio installed in your cluster
- At least one AgentRuntime deployed
- For claim mapping: JWT authentication configured (see Configure Agent Authentication)
Restrict Tool Access with an Allowlist
Section titled “Restrict Tool Access with an Allowlist”Limit an agent to only specific tools by creating an allowlist:
apiVersion: omnia.altairalabs.ai/v1alpha1kind: AgentPolicymetadata: name: support-agent-tools namespace: productionspec: selector: agents: - support-agent toolAccess: mode: allowlist rules: - registry: customer-tools tools: - lookup_order - check_status - registry: knowledge-base tools: - search_articlesThe agent can only call the three listed tools. All other tool calls are blocked at the Istio level.
Block Specific Tools with a Denylist
Section titled “Block Specific Tools with a Denylist”If most tools should be accessible but a few must be restricted:
apiVersion: omnia.altairalabs.ai/v1alpha1kind: AgentPolicymetadata: name: restrict-dangerous-tools namespace: productionspec: selector: agents: - general-assistant toolAccess: mode: denylist rules: - registry: admin-tools tools: - delete_user - drop_table - reset_credentialsMap JWT Claims to Headers
Section titled “Map JWT Claims to Headers”Forward user identity from the JWT token to downstream services:
apiVersion: omnia.altairalabs.ai/v1alpha1kind: AgentPolicymetadata: name: identity-propagation namespace: productionspec: claimMapping: forwardClaims: - claim: sub header: X-Omnia-Claim-Sub - claim: team header: X-Omnia-Claim-Team - claim: org.tenant_id header: X-Omnia-Claim-Tenant-IdThis policy applies to all agents in the namespace (no selector.agents specified). Every tool call will include the mapped claim headers, making them available to ToolPolicy CEL rules and downstream services.
Apply a Policy to All Agents
Section titled “Apply a Policy to All Agents”Omit the selector field or leave agents empty to match all agents in the namespace:
apiVersion: omnia.altairalabs.ai/v1alpha1kind: AgentPolicymetadata: name: namespace-wide-policy namespace: productionspec: toolAccess: mode: denylist rules: - registry: admin-tools tools: - destructive_actionUse Permissive Mode for Safe Rollout
Section titled “Use Permissive Mode for Safe Rollout”When rolling out a new policy, start in permissive mode to verify behavior without blocking traffic:
apiVersion: omnia.altairalabs.ai/v1alpha1kind: AgentPolicymetadata: name: new-restrictions namespace: productionspec: selector: agents: - customer-service toolAccess: mode: allowlist rules: - registry: customer-tools tools: - lookup_order - check_status mode: permissive # Log violations without blockingMonitor your logs for policy decisions, then switch to enforce when confident:
spec: mode: enforceVerify Policy Status
Section titled “Verify Policy Status”Check that your policy is active and matching agents:
kubectl get agentpolicies -n productionExpected output:
NAME MODE PHASE MATCHED AGEsupport-agent-tools enforce Active 1 5midentity-propagation enforce Active 3 2mFor detailed status including conditions:
kubectl describe agentpolicy support-agent-tools -n productionCombine Multiple Policies
Section titled “Combine Multiple Policies”Multiple AgentPolicies can apply to the same agent. Each policy is translated into its own Istio AuthorizationPolicy. Istio evaluates them independently — a request must pass all matching policies.
# Policy 1: Tool restrictionsapiVersion: omnia.altairalabs.ai/v1alpha1kind: AgentPolicymetadata: name: tool-restrictions namespace: productionspec: selector: agents: [customer-service] toolAccess: mode: allowlist rules: - registry: customer-tools tools: [lookup_order, process_refund]---# Policy 2: Identity propagation (applies to all agents)apiVersion: omnia.altairalabs.ai/v1alpha1kind: AgentPolicymetadata: name: identity-forwarding namespace: productionspec: claimMapping: forwardClaims: - claim: team header: X-Omnia-Claim-TeamRelated Resources
Section titled “Related Resources”- AgentPolicy CRD Reference — full field specification
- Policy Engine Architecture — how policies work
- Configure Tool Policies — application-level CEL policies (Enterprise)
- Securing Agents with Policies — end-to-end tutorial