Skip to main content

Agents & Assistant

AI calling agents, agent templates, prompt generation, and the assistant / appointment-booking tooling. All /api endpoints require a valid Bearer JWT and are scoped to the token's project_id.

Outcome rules don't belong in the agent prompt

The call outcome after a call is chosen by a separate AI that does not see the agent prompt. Outcome rules belong in the configuration.postCallPrompt field. See Post-call outcomes: how assignment works.

Agents​

MethodPathDescription
GET/api/agentsList agents.
GET/api/agents/{id}Fetch an agent.
POST/api/agentsCreate an agent.
PUT/api/agents/{id}Update an agent.
DELETE/api/agents/{id}Delete an agent.
GET/api/agent-templatesList agent templates.
GET/api/agent-templates/{id}Fetch an agent template.

Assistant & prompts​

MethodPathDescription
POST/api/assistant/createCreate an assistant.
POST/api/generate-promptGenerate an agent prompt from inputs.
POST/api/assistent/appointmentBook an appointment (assistant tool).
POST/api/assistent/toolCalendly tool invocation (assistant).
POST/api/assistent/callAssistant call trigger.
POST/api/calender/free-slotsReturn free calendar slots for booking.

Configuring appointment booking​

Booking lives in the agent's configuration object under tools.calendly — the key is historical but covers all three providers: Calendly, YouCanBookMe and iClosed. Per calendar, the provider field selects the provider: "calendly", "ycbm" or "iclosed".

Most common mistake

A calendar entry without provider is read as Calendly. For YouCanBookMe and iClosed you must set provider explicitly, otherwise the agent won't book (for iClosed the token is misrouted to the Calendly API).

Per calendar:

  • provider — "calendly", "ycbm" or "iclosed".
  • event_type_uri — provider-specific. Calendly: the full event-type URI (https://api.calendly.com/event_types/…). YouCanBookMe: the booking-page subdomain (e.g. max-mustermann). iClosed: the event linkPrefix (e.g. talk2kids/talk2kids-erstgespraech-2); the slash is part of the value, and a full URL is accepted and reduced to the prefix.
  • integration_id — id of the connected integration (GET /api/integrations?provider=iclosed); its provider must match provider.
  • location_kind — Calendly only; YouCanBookMe and iClosed ignore it.

iClosed limits: no cancellation/reschedule via the API; extra questions (secondaryQuestions) are not filled in; if the timezone is missing, slot times fall back to Europe/Berlin; rate limit 20 requests / 10 s per endpoint.