Skip to main content

Agents API reference

An Agent is the core identity unit in Synentra. Every autonomous AI agent, service, or system that proxies requests through Synentra must be registered as an agent. Each agent has a unique identity, a trust score, an assigned policy, and a lifecycle status.

Base URL

Throughout this guide the base URL is assumed to be your running server, e.g. http://localhost:7080. Replace <BASE_URL> in the examples with your actual server address.


API Endpoints​

Get agents list​

Returns a paginated list of all registered agents.

GET <BASE_URL>/agents?page=1&pageSize=25

URL Parameters​

ParameterTypeDefaultDescription
pageint1Page number
pageSizeint25Items per page

Examples​

Example of invoking a method on an action:

curl "http://localhost:7080/agents?page=1&pageSize=25"

Response 200 OK

{
"items": [
{
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"name": "billing-agent",
"ownerId": "team-finance",
"status": "Active",
"policyName": "billing-policy",
"trustScore": 0.75
}
],
"page": 1,
"pageSize": 25,
"totalCount": 1
}

Register an agent​

POST <BASE_URL>/agents

Request body​

A JSON object with the following fields:

{
"name": "billing-agent",
"ownerId": "team-finance",
"clientSecret": "my-strong-secret"
}
FieldRequiredDescription
name✅Human-readable name
ownerId✅Owner identifier
clientSecret✅Secret used to obtain JWT tokens
warning

The clientSecret is only returned once. Store it securely — Synentra only stores the bcrypt hash.

Examples​

curl -X POST "http://localhost:7080/agents" \
-H "Content-Type: application/json" \
-d '{
"name": "billing-agent",
"ownerId": "team-finance",
"clientSecret": "my-strong-secret"
}'

Response 201 Created


Assign policy​

PUT <BASE_URL>/agents/<agentId>/policy

Request body​

A JSON object with the following fields:

{
"policyName": "billing-policy"
}

Examples​

curl -X PUT "http://localhost:7080/agents/3fa85f64-5717-4562-b3fc-2c963f66afa6/policy" \
-H "Content-Type: application/json" \
-d '{ "policyName": "billing-policy" }'

Response 200 OK


Delete an agent​

DELETE <BASE_URL>/agents/<agentId>

Examples​

curl -X DELETE "http://localhost:7080/agents/3fa85f64-5717-4562-b3fc-2c963f66afa6"

Response 200 OK


Lift quarantine​

POST <BASE_URL>/agents/<agentId>/lift-quarantine

Examples​

curl -X POST "${BASE_URL}/agents/3fa85f64-5717-4562-b3fc-2c963f66afa6/lift-quarantine"

Response 200 OK

Was this helpful?