Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.adrian.secureagentics.ai/llms.txt

Use this file to discover all available pages before exploring further.

Policies define rules that govern what your AI agents are allowed to do. When an agent sends an event that matches a policy’s conditions, Secureagentics takes the configured action — blocking the operation, sending an alert, or logging the activity. Policies can be scoped to a single agent or applied globally across all agents.

Create a policy

POST /v1/policies Creates a new security policy and returns the policy object. If agent_id is omitted, the policy applies globally to all agents in your account.

Request body

name
string
required
Human-readable name for the policy, unique within your account.
type
string
required
The category of control this policy enforces. One of: block_action, rate_limit, data_filter, require_approval.
agent_id
string
Scope this policy to a specific agent by its ID. If omitted, the policy applies globally to all agents.
conditions
object
required
Conditions that must be met to trigger this policy. The structure of this object varies by type. For example, a data_filter policy might specify patterns to match in event payloads, while a rate_limit policy specifies a threshold and window.
actions
object
required
The action Secureagentics takes when the conditions are matched. Supported actions: block (prevents the operation), alert (sends a notification), log (records the event without interrupting the operation). You may combine multiple actions.

Response fields

id
string
required
Unique policy identifier, prefixed with pol_.
name
string
required
The policy name.
type
string
required
The policy type: block_action, rate_limit, data_filter, or require_approval.
agent_id
string
The agent this policy is scoped to. null if the policy applies globally.
conditions
object
required
The conditions configured for this policy.
actions
object
required
The actions configured for this policy.
created_at
string
required
ISO 8601 timestamp of when the policy was created.
status
string
required
Current policy status. One of: active, inactive.
cURL
curl --request POST \
  --url https://api.secureagentics.ai/v1/policies \
  --header "Authorization: Bearer YOUR_API_KEY" \
  --header "Content-Type: application/json" \
  --data '{
    "name": "block-pii-exfiltration",
    "type": "data_filter",
    "agent_id": "agt_01j9xkz2m3n4p5q6r7s8t9u0",
    "conditions": {
      "payload_contains": ["ssn", "credit_card", "password"]
    },
    "actions": {
      "block": true,
      "alert": true,
      "log": true
    }
  }'

List policies

GET /v1/policies Returns a paginated list of policies. You can filter by agent or type.

Query parameters

agent_id
string
Return only policies scoped to this agent ID. Omit to return both global and agent-scoped policies.
type
string
Filter by policy type. One of: block_action, rate_limit, data_filter, require_approval.
limit
integer
default:"20"
Maximum number of policies to return per page. Accepted range: 1–100.
offset
integer
default:"0"
Number of policies to skip before returning results. Use for pagination.

Response fields

items
object[]
required
Array of policy objects matching the query.
total
integer
required
Total number of policies matching the applied filters.
cURL
curl --request GET \
  --url "https://api.secureagentics.ai/v1/policies?agent_id=agt_01j9xkz2m3n4p5q6r7s8t9u0&type=data_filter" \
  --header "Authorization: Bearer YOUR_API_KEY"

Delete a policy

DELETE /v1/policies/{id} Permanently deletes a policy. Once deleted, the policy no longer evaluates incoming events. Returns 204 No Content on success.
Deleting a policy takes effect immediately. Any events that would have matched the deleted policy will no longer be blocked, alerted on, or logged by it.

Path parameters

id
string
required
The policy ID, prefixed with pol_.
cURL
curl --request DELETE \
  --url https://api.secureagentics.ai/v1/policies/pol_01j9xkz2m3n4p5q6r7s8t9u0 \
  --header "Authorization: Bearer YOUR_API_KEY"