Admin-only
Agent execution requires an admin context for the target organization. The token must carry an admin role for that org.
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.
POST /api/agent/runagentName on the API.The HTTP endpoint is available from your nara webapp:
POST https://app.nara.de/api/agent/runAuthorization: Bearer <ADMIN_JWT>Content-Type: application/jsonRequest 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).
const baseUrl = 'https://app.nara.de'const token = process.env.NARA_ADMIN_TOKEN ?? ''
type SupportTriageResult = { category: string nextStep: string summary: string}
async function runSupportTriage(args: unknown): Promise<SupportTriageResult> { const response = await fetch(`${baseUrl}/api/agent/run`, { method: 'POST', headers: { 'content-type': 'application/json', authorization: `Bearer ${token}`, }, body: JSON.stringify({ agentName: 'support_triage', args, }), })
if (!response.ok) { throw new Error(`Agent call failed with status ${response.status}`) }
const payload = (await response.json()) as { success?: boolean output?: unknown error?: string }
if (!payload.success || !payload.output) { throw new Error(payload.error ?? 'Agent call failed') }
return payload.output as SupportTriageResult}This pattern works from any Node.js service that can reach the webapp URL and attach an appropriate admin token.
For services that already run alongside the webapp, you can also use the typed RPC client exposed by @nara/rpc to call the same functionality, while letting the webapp handle authentication:
import { createRpcClient } from '@nara/rpc/client'
const rpc = createRpcClient()
const functionalAgents = await rpc.agent.list({ type: 'FUNCTIONAL' })
// Use the HTTP endpoint or internal hooks to execute functional agents.Use this from trusted internal services. For third-party integrations and server-to-server calls, prefer the HTTPS endpoint shown in the HTTP tab.
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/runAuthorization: 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