agents

Create Agent

Creates the service account and the agent in one transaction. Mint fences (AGENTS_CONTRACT §5.3): the role may not exceed the caller's grants (403 role_exceeds_caller), must be in the tenant's allowed_role_ids unless the caller holds tenant_manage (403 role_not_allowed), must be covered by the steward's role (409 steward_role_too_low); requested scopes must be known (400 invalid_scope) and covered by a scoped caller (403 insufficient_scope); members may be barred by policy (403 agents_disabled_for_members); a steward holds at most max_agents_per_steward (409 agent_limit_reached); an agent or portal credential cannot mint (403 agent_cannot_mint); the steward must be a live human in the tenant (422 invalid_steward). The steward is the caller unless the caller holds tenant_manage (403 transfer_consent_required).

post/agents

Request

  • Base URL: https://api.instruxi.dev/api/v1/enforcer
  • URL: https://api.instruxi.dev/api/v1/enforcer/agents
  • Auth: one of:
    • API key in header Authorization
    • API key in header X-API-Key

Request body

cardobject
descriptionstring
expires_atstring
namestring
rate_limit_per_mininteger
role_idstring
scopesstring[]
slugstring
steward_account_idstring

StewardAccountID is required for a group-owned agent; for an account-owned one it defaults to the caller. It must be the caller, or the caller must hold tenant_manage.

Example request

{
  "name": "go-backend",
  "owner": {
    "kind": "account"
  },
  "slug": "go-backend"
}

Response

Created

successboolean

Example response

{
  "success": true
}

Changes

No recorded changes to this operation across all 1 revision of this API.