Skip to content

Agent API

Public API Server-to-server Functional agents

Use this page when you want to trigger an agent from outside the webapp – for example from a backend service, a cron job, or another platform.

  • Supported entrypoint: POST /api/agent/run
  • Scope: functional agents with a JSON argument schema
  • Auth: JWT bearer token with admin privileges for the target organization
  1. Create a functional agent in the nara webapp and publish it to your organization.
  2. Configure the agent’s Arguments type (JSON schema) so inputs can be validated.
  3. Note the agent’s name – this is what you pass as agentName on the API.
  4. Obtain an admin API token (JWT) for the organization you want to run the agent in.

The HTTP endpoint is available from your nara webapp:

POST https://app.nara.de/api/agent/run
Authorization: Bearer <ADMIN_JWT>
Content-Type: application/json

Request body:

{
"agentName": "support_triage",
"args": {
"ticketId": "TCK-12345",
"priority": "high",
"language": "en"
}
}

On success the response contains the agent’s structured result and the internal execution trace:

{
"success": true,
"sessionId": "api-...",
"agent": "support_triage",
"output": {
"category": "billing",
"nextStep": "escalate_to_human",
"summary": "Customer cannot update credit card."
},
"messages": [
{
"role": "assistant",
"parts": [{ "type": "text", "text": "" }]
}
]
}

If validation or authorization fails you receive an error JSON payload with an appropriate HTTP status (4xx or 5xx).

Admin-only

Agent execution requires an admin context for the target organization. The token must carry an admin role for that org.

JWT tokens

Tokens are verified by the nara platform; you can either call the endpoint from an authenticated admin session or send an admin-scoped JWT as a bearer token.

Organization scoping

The agent must belong to the same organization as the token. Cross-org execution is rejected.

You can discover functional agents that are executable via this API:

GET https://app.nara.de/api/agent/run
Authorization: Bearer <ADMIN_JWT>

The response lists agents by name:

{
"agents": [{ "name": "support_triage" }, { "name": "contract_summary" }]
}

Use these names as agentName when calling POST /api/agent/run.

Explore the Edge Connector for on‑prem tools