Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.dari.dev/llms.txt

Use this file to discover all available pages before exploring further.

Base URL

https://api.dari.dev/v1

Authentication

Send an org API key as a bearer token:
Authorization: Bearer $DARI_API_KEY
See Authentication for how to create one.

Resources

Agents

A stable URL with a version history. Publish creates new versions.

Source Snapshots

Immutable source bundles used as the publish input for agent versions.

Sessions

Durable conversations pinned to the agent version at creation time.

Messages

Per-turn inputs and outputs within a session.

Files

Uploaded assets referenced by messages.

Webhooks

Agent-level push delivery for external-tool requests.

Sending work

  • POST /v1/agents/{agent_id}/messages creates a new session and sends its first user.message when you do not already have a session_id.
  • POST /v1/session-batches creates many sessions and sends one initial message for each item, which is useful for task × LLM matrices.
  • POST /v1/sessions/{session_id}/events accepts one user.message event and returns 202 Accepted with the recorded ledger event and derived message_id. The same endpoint accepts tool.result_submitted to answer a pending external tool call.
  • Set Agent Webhook configures where Dari sends selected external-tool and lifecycle events for an agent. See Webhooks for setup and signature verification.

Observing execution

  • Poll GET /v1/sessions/{session_id}, GET /v1/session-batches/{batch_id}, or GET /v1/messages/{message_id} for state.
  • Use GET /v1/sessions?metadata.managed_run_id=... to recover sessions associated with your own run IDs.
  • Fetch GET /v1/sessions/{session_id}/transcript when you need a renderable full-session timeline.
  • Download GET /v1/sessions/{session_id}/workspace.zip when you need files created or modified in the session workspace.
  • Stream GET /v1/sessions/{session_id}/stream over SSE for live session ledger events.