Register Agent
POST /v1/agents
Registers a new machine agent identity for the authenticated tenant. The platform generates an Ed25519 key pair for the agent, assigns a MAIP-compliant agent ID, and records the initial key in the key history ledger. Newly registered agents start with active status and an initial trust score of 0.500.
The number of agents you can register depends on your billing plan. If you
exceed your plan limit, the API returns 402 Payment Required. Contact sales
for enterprise-tier agent limits.
Authentication
Requires X-API-Key header or Bearer JWT token. Tenant-scoped via X-Tenant-ID.
Request Body
The type of machine agent being registered. Determines default behavior and
audit categorization. One of: "orchestrator", "worker", "inference",
"pipeline", "service", "bot", "llm". Defaults to "worker" if
omitted.
Human-readable name for the agent. Used in dashboards, audit logs, and alert
notifications. Maximum 256 characters.
Detailed description of the agent’s purpose, capabilities, or operational
context. Maximum 2048 characters.
List of permission scopes granted to the agent. Uses resource:action format
(e.g., "data:read", "tool:execute", "model:train"). Use resource:* for
wildcard access. Prefix with ! to explicitly deny (e.g., "!data:delete").
Defaults to an empty array if omitted.
Arbitrary key-value metadata attached to the agent. Useful for tagging, cost
allocation, or integration-specific context. Maximum 16 KB serialized.
ISO 8601 timestamp for automatic agent expiration. When reached, the agent
transitions to revoked status. Omit for non-expiring agents.
Response
Internal UUID primary key.
MAIP-compliant agent identifier in format maip:<tenant8>:<ulid>. Use this value
in all subsequent API calls referencing this agent.
UUID of the owning tenant.
The registered agent type.
Human-readable agent name.
Agent description, if provided.
Initial trust level. Newly registered agents start at "authenticated".
Numeric trust score (0.0 to 1.0). Newly registered agents start at 0.500.
Agent lifecycle status. Always "active" on creation.
Base64url-encoded Ed25519 public key generated for this agent. Store this
securely for signature verification.
Unique identifier for the agent’s signing key. Referenced in receipts and
attestations.
The effective scopes assigned to the agent.
The metadata object, if provided.
Current delegation chain depth. Always 0 for directly registered agents.
Maximum depth is 8 per MAIP protocol.
UUID of the user who registered the agent, if authenticated via user token.
Expiration timestamp, if set.
ISO 8601 creation timestamp.
ISO 8601 last-updated timestamp.
Example
curl -X POST https://api.truthlocks.com/v1/agents \
-H "X-API-Key: tl_live_..." \
-H "Content-Type: application/json" \
-d '{
"agent_type": "llm",
"display_name": "Customer Support Bot",
"description": "Handles Tier-1 customer support inquiries via chat",
"scopes": ["data:read", "tool:search.web", "!data:delete"],
"metadata": {
"team": "support",
"model": "claude-3.5-sonnet",
"environment": "production"
}
}'
API key for machine-to-machine authentication
Classification of the agent
Available options:
orchestrator,
worker,
inference,
pipeline,
service,
bot,
llm
Human-readable agent name
Maximum string length: 256
Free-text description of the agent purpose
Permission scopes granted to the agent
Arbitrary key-value metadata
Available options:
orchestrator,
worker,
inference,
pipeline,
service,
bot,
llm
Maximum string length: 256
Available options:
active,
suspended,
revoked
Required range: 0 <= x <= 1
Base64-encoded public key