aethexDocs

API Reference

Agents

Create and manage AI voice agents — configure their voice, language, LLM settings, tools, and knowledge base.

Base URL
https://api.aethexai.com/api/v1
Endpoints
17
Scopes
agents:readagents:write
GET/agents

Paginate through all agents for your account.

List Agents

Returns a paginated list of all voice agents. Each item includes the agent's ID, name, voice, language, and current status.

Path & Query

2
  • limitintegeroptional

    Maximum number to return (default: 50, max: 100).

  • offsetintegeroptional

    Number of agents to skip (default: 0).

Errors

3
401Unauthorized

Missing or invalid API key.

Add X-API-Key: YOUR_KEY to your request headers.

403Forbidden

Your API key does not have the required scope (agents:read or agents:write).

Issue a new key with the agents:read or agents:write scope.

422Unprocessable Entity

limit or offset is not a valid integer or is out of range.

Use a non-negative integer for offset and a value between 1 and 100 for limit.

POST/agents

Create a new voice agent.

Create Agent

Creates a new agent with the specified configuration. The agent is immediately available for use in outbound calls or WebRTC sessions.

Request body

59
  • namestringrequired

    Display name for the agent.

  • system_promptstringrequired

    LLM system prompt that defines the agent's persona and behavior.

  • voice_idstringrequired

    Voice to use for TTS. Must be a valid voice ID from GET /voices.

  • messaging_system_promptstringoptional

    Optional prompt for text conversations. WhatsApp messages, SMS and the chat API use it in place of system_prompt. Calls, WhatsApp calls included, always use system_prompt. Leave it out to use system_prompt everywhere.

  • first_messagestringoptional

    Greeting the agent says when a call connects. If omitted the agent waits for the user to speak first.

  • languagestringoptional

    Language for STT and TTS (e.g. english, french). Default: english.

  • dialect_stylestringoptional

    Dialect style override (e.g. formal, local). Provider-specific.

  • metadataobjectoptional

    Arbitrary key-value pairs stored with the agent.

  • llm_modelstringoptional

    LLM model ID — a public catalog name from GET /api/v1/models (for example claude-sonnet-4-6, gpt-4o, or aethex-default). Omit it or send an empty string to use the platform default. Responses always echo the public catalog name; the internal provider routing behind it is never exposed.

  • temperaturenumberoptional

    Sampling temperature (0.0–2.0). Lower values produce more deterministic responses. Ignored for OpenAI's reasoning models (the o-series and the gpt-5 family), which take no temperature.

  • max_tokensintegeroptional

    Maximum tokens per LLM response, an integer from 1 to 8192. Omit or send null for the platform default (configurable via AETHEX_LLM_MAX_COMPLETION_TOKENS, 512 unless the deployment overrides it).

  • max_context_tokensintegeroptional

    Maximum LLM context window for this agent (1024–262144 tokens). Null uses the platform default.

  • frequency_penaltynumberoptional

    LLM frequency penalty between -2.0 and 2.0. Omitting or sending null falls back to the Aethex platform default of 0.4 (not a provider-native default).

  • presence_penaltynumberoptional

    LLM presence penalty between -2.0 and 2.0. Omitting or sending null falls back to the Aethex platform default of 0.9 (not a provider-native default).

  • max_duration_secondsintegeroptional

    Hard cap on call duration in seconds (30–3,600). Call ends automatically when reached.

  • silence_timeout_secondsintegeroptional

    End the call if the user is silent for this many seconds. Null disables.

  • max_turnsintegeroptional

    Hang up when the caller begins their Nth user turn, where N is this value (1–1000); that turn is not answered. Null inherits the platform default (no turn cap).

  • history_truncation_enabledbooleanoptional

    Drop older turns once the conversation grows long. Null inherits the platform default; the platform overrides false on models it serves itself.

  • history_max_turnsintegeroptional

    Turn count that triggers truncation (1–200) — not the number of turns retained. Null inherits the platform default.

  • sms_message_idsstring[]optional

    Which of your text messages this agent may send, by id. Omit or send [] for every active message. Past about 8 choices an agent picks between them less reliably — advice, not a limit.

  • sms_max_sends_per_messageintegeroptional

    How many times one call may send the same message (1–30). Null inherits the default of 2. The call's own ceiling still bounds the total.

  • interruption_enabledbooleanoptional

    Allow the caller to interrupt the agent mid-response (default: true).

  • barge_in_min_speech_secsnumberoptional

    How long, in seconds, the caller must keep talking over the agent before it stops to listen, from 0 to 3. A shorter sound, such as a cough or a quick "mm-hmm", no longer cuts the agent off, and the agent does not respond to it. While the agent is silent, speech starts the caller's turn at once; on some models a reply that is about to play is protected the same way, so a short sound just before it does not cancel it. Null uses the platform default of 0.6; 0 stops the agent at the first speech it hears. A change applies from the agent's next call.

  • turn_eagernessstringoptional

    How aggressively the agent claims its turn: patient, normal, or eager. Null uses the platform default.

  • end_call_enabledbooleanoptional

    Whether the agent may end the call itself (default: true).

  • end_call_phrasesstring[]optional

    Phrases the caller may say to end the call. When the agent hears any of them, it says a brief goodbye and ends the call.

  • end_call_behaviorstringoptional

    When to end calls: auto_detect (LLM intent + phrases) or phrases_only (default: auto_detect). phrases_only is advisory — it steers the agent toward ending on your end_call_phrases, but the model may still end on a clear conversation conclusion.

  • voicemail_detection_enabledbooleanoptional

    Detect when the call has gone to voicemail (default: false).

  • voicemail_messagestringoptional

    Message to leave when voicemail is detected. Requires voicemail_detection_enabled=true.

  • voicemail_actionstringoptional

    What to do on voicemail: leave_message or hangup (default: leave_message).

  • inbound_lobby_enabledbooleanoptional

    Play a holding message at the start of inbound calls before the agent picks up (default: false).

  • inbound_lobby_messagestringoptional

    Lobby greeting text, up to 120 characters.

  • inbound_lobby_audio_presetstringoptional

    Lobby background audio: none, ambient, or instrumental (default: ambient).

  • inbound_lobby_max_wait_secondsintegeroptional

    Maximum lobby wait in seconds (0–60, default: 45).

  • recording_enabledbooleanoptional

    Whether to record the call audio (default: true).

  • transcription_enabledbooleanoptional

    Whether to store the conversation transcript (default: true).

  • public_accessbooleanoptional

    When on, anyone can start a call with this agent from a browser or app using only its id, with no API key or proxy. Off by default. You are billed for public calls as usual, and platform limits cap abuse. Use allowed_origins to restrict which websites may embed it.

  • allowed_originsstring[]optional

    Optional list of website hostnames allowed to embed a public agent in a browser, for example example.com or app.example.com. Leave empty to allow any origin. Applies to browsers only, since native apps and servers send no origin. Has no effect unless public_access is on.

  • focus_guardrail_enabledbooleanoptional

    Block off-topic responses (default: true).

  • content_guardrail_enabledbooleanoptional

    Block unsafe content (default: false).

  • custom_guardrailsobject[]optional

    Custom natural-language rules: list of { name, prompt, is_enabled } objects.

  • script_adherencestringoptional

    How strictly the agent follows its system prompt: strict, medium, or loose (default: strict).

  • keypad_capture_enabledbooleanoptional

    Whether the agent accepts keypad (touch-tone) input on phone calls, so a caller can key in a reference or card number instead of saying it. On by default. No effect on browser agents, which have no keypad.

  • idle_check_in_after_secsnumberoptional

    Seconds of user silence before the agent checks in (1.0–600.0). Defaults to 15 seconds when unset.

  • max_idle_attemptsintegeroptional

    Maximum idle check-ins before the agent sends a goodbye and hangs up (>= 0). Use 0 for unlimited check-ins (agent never hangs up on silence alone).

  • soft_timeout_secondsnumberoptional

    Seconds before the agent plays a filler/holding line while it waits for the LLM (1.0–300.0). Null disables.

  • soft_timeout_messagestringoptional

    Filler text spoken when the soft timeout fires.

  • soft_timeout_use_llmbooleanoptional

    If true, the soft-timeout message is generated by the LLM instead of using soft_timeout_message verbatim (default: false).

  • response_min_sentencesintegeroptional

    Minimum sentences per response (>= 0). Defaults to 2 when unset.

  • response_max_sentencesintegeroptional

    Maximum sentences per response (>= 0). Must be >= response_min_sentences. Defaults to 3 when unset.

  • rag_top_kintegeroptional

    Number of knowledge-base chunks to retrieve per turn (1–20). Null uses the platform default of 6, chosen to improve recall for policies split across adjacent chunks while the voice pipeline still caps local prompt injection to the served context window.

  • rag_min_scorenumberoptional

    Minimum vector or keyword similarity score for retrieved chunks (0.0–1.0). Null uses the platform default of 0.1; set 0.0 to disable the floor.

  • transfer_phone_numberstringoptional

    E.164 number to transfer the call to when the agent triggers a transfer.

  • transfer_phone_numbersstring[]optional

    Up to five numbers in E.164, dialled in order: a warm transfer rolls to the next one when a leg goes unanswered or unavailable. When set it takes precedence over transfer_phone_number; send [] to go back to the single-number behaviour.

  • transfer_modestringoptional

    What the agent does once the person it transfers to picks up. warm (the default): it briefs them privately, then leaves the call. conference: it briefs them, then stays on the call without speaking — the rest of the call is recorded and transcribed, the person's words as human_agent turns, as far as the agent's recording_enabled and transcription_enabled allow. Conference needs the call to stay on the Aethex SIP bridge: SIP calls only, and an outbound trunk the transfer can dial through. On Twilio and Teams calls the agent transfers as warm.

  • outbound_trunk_idstring (uuid)optional

    The SIP trunk this agent dials out through. Must be one of your active outbound trunks; omit it to use the workspace default, and send "" to clear an existing choice. A trunk linked to the specific number still wins over this.

  • sms_sender_number_idstring (uuid)optional

    The number this agent's text messages go out from, as a phone-number id. It must be one of your active numbers with sms_sender on; 404 if it is not yours, 422 if it does not send. Omit it (or send "") and the agent uses the number carrying sms_sender_default, which is what every agent does until you set one. Checked again on every call, so a number you later release falls back to the default rather than sending from a line you no longer hold.

  • dynamic_variablesobjectoptional

    Default values for {{variable}} placeholders interpolated into the system prompt at call start. Inbound calls and messages have nobody to supply values, so every placeholder needs a default here or must be a built-in (system__channel, system__caller_id, …). The response's read-only unfilled_variables lists the placeholders that have neither (a blank "" default counts as none). No call or message is ever refused over one: the agent answers with [name: not provided] in its place, and the agent's webhook_url gets agent.prompt_variables.unfilled. An agent with any cannot be mapped to a WhatsApp number or a number that answers texts (422 unfilled_prompt_variables, with variables).

  • webhook_urlstringoptional

    HTTPS URL (port 443) that receives a signed call.ended report after each call ends, with the call status and transcript. The recording arrives separately via a recording.ready event once the audio finishes uploading. Signed with your tenant webhook secret via the X-Aethex-Signature header.

Errors

4
401Unauthorized

Missing or invalid API key.

Add X-API-Key: YOUR_KEY to your request headers.

403Forbidden

Your API key does not have the required scope (agents:read or agents:write).

Issue a new key with the agents:read or agents:write scope.

422Unprocessable Entity

Request body contains invalid or unknown fields.

Remove unknown fields and check the request body schema.

422Unprocessable Entity

voice_id does not match any voice available to your tenant.

Use a voice_id from GET /voices.

GET/agents/:id

Fetch a single agent by ID.

Get Agent

Returns the full agent record including all configuration fields.

Path & Query

1
  • idstringrequired

    UUID of the agent.

Errors

4
401Unauthorized

Missing or invalid API key.

Add X-API-Key: YOUR_KEY to your request headers.

403Forbidden

Your API key does not have the required scope (agents:read or agents:write).

Issue a new key with the agents:read or agents:write scope.

404Not Found

No agent with this ID exists.

Confirm the UUID from GET /agents.

422Unprocessable Entity

id is not a valid UUID.

Pass a valid UUID from GET /agents.

PATCH/agents/:id

Partially update an agent's configuration.

Update Agent

Accepts a partial body — only the fields you include are changed; omitted fields are left unchanged (any defaults noted in the field descriptions apply to create only). Returns the updated agent record.

Path & Query

1
  • idstringrequired

    UUID of the agent to update.

Request body

59
  • namestringoptional

    Display name for the agent.

  • system_promptstringoptional

    Replaces the system prompt entirely. To append, fetch the current value first. Cannot be set to null — omit the field to leave unchanged.

  • messaging_system_promptstringoptional

    Replaces the prompt for text conversations. Send null or an empty string to remove it, and text conversations use system_prompt again.

  • voice_idstringoptional

    Voice to use for TTS. Must be a valid voice ID from GET /voices.

  • first_messagestringoptional

    Greeting the agent says when a call connects. If omitted the agent waits for the user to speak first.

  • languagestringoptional

    Language for STT and TTS (e.g. english, french). Default: english.

  • dialect_stylestringoptional

    Dialect style override (e.g. formal, local). Provider-specific.

  • metadataobjectoptional

    Arbitrary key-value pairs stored with the agent.

  • llm_modelstringoptional

    LLM model ID — a public catalog name from GET /api/v1/models (for example claude-sonnet-4-6, gpt-4o, or aethex-default). Omit it or send an empty string to use the platform default. Responses always echo the public catalog name; the internal provider routing behind it is never exposed.

  • temperaturenumberoptional

    Sampling temperature (0.0–2.0). Lower values produce more deterministic responses. Ignored for OpenAI's reasoning models (the o-series and the gpt-5 family), which take no temperature.

  • max_tokensintegeroptional

    Maximum tokens per LLM response, an integer from 1 to 8192. Omit or send null for the platform default (configurable via AETHEX_LLM_MAX_COMPLETION_TOKENS, 512 unless the deployment overrides it).

  • max_context_tokensintegeroptional

    Maximum LLM context window for this agent (1024–262144 tokens). Null uses the platform default.

  • frequency_penaltynumberoptional

    LLM frequency penalty between -2.0 and 2.0. Omitting or sending null falls back to the Aethex platform default of 0.4 (not a provider-native default).

  • presence_penaltynumberoptional

    LLM presence penalty between -2.0 and 2.0. Omitting or sending null falls back to the Aethex platform default of 0.9 (not a provider-native default).

  • max_duration_secondsintegeroptional

    Hard cap on call duration in seconds (30–3,600). Call ends automatically when reached.

  • silence_timeout_secondsintegeroptional

    End the call if the user is silent for this many seconds. Null disables.

  • max_turnsintegeroptional

    Hang up when the caller begins their Nth user turn, where N is this value (1–1000); that turn is not answered. Null inherits the platform default (no turn cap).

  • history_truncation_enabledbooleanoptional

    Drop older turns once the conversation grows long. Null inherits the platform default; the platform overrides false on models it serves itself.

  • history_max_turnsintegeroptional

    Turn count that triggers truncation (1–200) — not the number of turns retained. Null inherits the platform default.

  • sms_message_idsstring[]optional

    Replaces which of your text messages this agent may send, by id. Omit it to keep the current selection; send [] or null to return the agent to every active message.

  • sms_max_sends_per_messageintegeroptional

    How many times one call may send the same message (1–30). Null inherits the default of 2. The call's own ceiling still bounds the total.

  • interruption_enabledbooleanoptional

    Allow the caller to interrupt the agent mid-response (default: true).

  • barge_in_min_speech_secsnumberoptional

    How long, in seconds, the caller must keep talking over the agent before it stops to listen, from 0 to 3. A shorter sound, such as a cough or a quick "mm-hmm", no longer cuts the agent off, and the agent does not respond to it. While the agent is silent, speech starts the caller's turn at once; on some models a reply that is about to play is protected the same way, so a short sound just before it does not cancel it. Null uses the platform default of 0.6; 0 stops the agent at the first speech it hears. A change applies from the agent's next call.

  • turn_eagernessstringoptional

    How aggressively the agent claims its turn: patient, normal, or eager. Null uses the platform default.

  • end_call_enabledbooleanoptional

    Whether the agent may end the call itself (default: true).

  • end_call_phrasesstring[]optional

    Phrases the caller may say to end the call. When the agent hears any of them, it says a brief goodbye and ends the call.

  • end_call_behaviorstringoptional

    When to end calls: auto_detect (LLM intent + phrases) or phrases_only (default: auto_detect). phrases_only is advisory — it steers the agent toward ending on your end_call_phrases, but the model may still end on a clear conversation conclusion.

  • voicemail_detection_enabledbooleanoptional

    Detect when the call has gone to voicemail (default: false).

  • voicemail_messagestringoptional

    Message to leave when voicemail is detected. Accepted on its own without re-sending voicemail_detection_enabled; only rejected if you set voicemail_detection_enabled=false in the same request.

  • voicemail_actionstringoptional

    What to do on voicemail: leave_message or hangup (default: leave_message).

  • inbound_lobby_enabledbooleanoptional

    Play a holding message at the start of inbound calls before the agent picks up (default: false).

  • inbound_lobby_messagestringoptional

    Lobby greeting text, up to 120 characters.

  • inbound_lobby_audio_presetstringoptional

    Lobby background audio: none, ambient, or instrumental (default: ambient).

  • inbound_lobby_max_wait_secondsintegeroptional

    Maximum lobby wait in seconds (0–60, default: 45).

  • recording_enabledbooleanoptional

    Whether to record the call audio (default: true).

  • transcription_enabledbooleanoptional

    Whether to store the conversation transcript (default: true).

  • public_accessbooleanoptional

    When on, anyone can start a call with this agent from a browser or app using only its id, with no API key or proxy. Off by default. You are billed for public calls as usual, and platform limits cap abuse. Use allowed_origins to restrict which websites may embed it.

  • allowed_originsstring[]optional

    Optional list of website hostnames allowed to embed a public agent in a browser, for example example.com or app.example.com. Leave empty to allow any origin. Applies to browsers only, since native apps and servers send no origin. Has no effect unless public_access is on.

  • focus_guardrail_enabledbooleanoptional

    Block off-topic responses (default: true).

  • content_guardrail_enabledbooleanoptional

    Block unsafe content (default: false).

  • custom_guardrailsobject[]optional

    Custom natural-language rules: list of { name, prompt, is_enabled } objects.

  • script_adherencestringoptional

    How strictly the agent follows its system prompt: strict, medium, or loose (default: strict).

  • keypad_capture_enabledbooleanoptional

    Whether the agent accepts keypad (touch-tone) input on phone calls, so a caller can key in a reference or card number instead of saying it. On by default. No effect on browser agents, which have no keypad.

  • idle_check_in_after_secsnumberoptional

    Seconds of user silence before the agent checks in (1.0–600.0). Defaults to 15 seconds when unset.

  • max_idle_attemptsintegeroptional

    Maximum idle check-ins before the agent sends a goodbye and hangs up (>= 0). Use 0 for unlimited check-ins (agent never hangs up on silence alone).

  • soft_timeout_secondsnumberoptional

    Seconds before the agent plays a filler/holding line while it waits for the LLM (1.0–300.0). Null disables.

  • soft_timeout_messagestringoptional

    Filler text spoken when the soft timeout fires.

  • soft_timeout_use_llmbooleanoptional

    If true, the soft-timeout message is generated by the LLM instead of using soft_timeout_message verbatim (default: false).

  • response_min_sentencesintegeroptional

    Minimum sentences per response (>= 0). Defaults to 2 when unset.

  • response_max_sentencesintegeroptional

    Maximum sentences per response (>= 0). Must be >= response_min_sentences. Defaults to 3 when unset.

  • rag_top_kintegeroptional

    Number of knowledge-base chunks to retrieve per turn (1–20). Null uses the platform default of 6, chosen to improve recall for policies split across adjacent chunks while the voice pipeline still caps local prompt injection to the served context window.

  • rag_min_scorenumberoptional

    Minimum vector or keyword similarity score for retrieved chunks (0.0–1.0). Null uses the platform default of 0.1; set 0.0 to disable the floor.

  • transfer_phone_numberstringoptional

    E.164 number to transfer the call to when the agent triggers a transfer.

  • transfer_phone_numbersstring[]optional

    Up to five numbers in E.164, dialled in order: a warm transfer rolls to the next one when a leg goes unanswered or unavailable. When set it takes precedence over transfer_phone_number; send [] to go back to the single-number behaviour.

  • transfer_modestringoptional

    What the agent does once the person it transfers to picks up. warm (the default): it briefs them privately, then leaves the call. conference: it briefs them, then stays on the call without speaking — the rest of the call is recorded and transcribed, the person's words as human_agent turns, as far as the agent's recording_enabled and transcription_enabled allow. Conference needs the call to stay on the Aethex SIP bridge: SIP calls only, and an outbound trunk the transfer can dial through. On Twilio and Teams calls the agent transfers as warm.

  • outbound_trunk_idstring (uuid)optional

    The SIP trunk this agent dials out through. Must be one of your active outbound trunks; omit it to use the workspace default, and send "" to clear an existing choice. A trunk linked to the specific number still wins over this.

  • sms_sender_number_idstring (uuid)optional

    The number this agent's text messages go out from, as a phone-number id. It must be one of your active numbers with sms_sender on; 404 if it is not yours, 422 if it does not send. Omit it (or send "") and the agent uses the number carrying sms_sender_default, which is what every agent does until you set one. Checked again on every call, so a number you later release falls back to the default rather than sending from a line you no longer hold.

  • dynamic_variablesobjectoptional

    Default values for {{variable}} placeholders interpolated into the system prompt at call start. Inbound calls and messages have nobody to supply values, so every placeholder needs a default here or must be a built-in (system__channel, system__caller_id, …). The response's read-only unfilled_variables lists the placeholders that have neither (a blank "" default counts as none). No call or message is ever refused over one: the agent answers with [name: not provided] in its place, and the agent's webhook_url gets agent.prompt_variables.unfilled. An agent with any cannot be mapped to a WhatsApp number or a number that answers texts (422 unfilled_prompt_variables, with variables).

  • webhook_urlstringoptional

    HTTPS URL (port 443) that receives a signed call.ended report after each call ends, with the call status and transcript. The recording arrives separately via a recording.ready event once the audio finishes uploading. Signed with your tenant webhook secret via the X-Aethex-Signature header.

Errors

5
401Unauthorized

Missing or invalid API key.

Add X-API-Key: YOUR_KEY to your request headers.

403Forbidden

Your API key does not have the required scope (agents:read or agents:write).

Issue a new key with the agents:read or agents:write scope.

404Not Found

No agent with this ID exists.

Confirm the UUID from GET /agents.

422Unprocessable Entity

Request body contains fields that cannot be updated via this endpoint.

Remove unknown fields and check the request body schema.

422Unprocessable Entity

voice_id does not match any voice available to your tenant.

Use a voice_id from GET /voices.

DELETE/agents/:id

Permanently delete an agent.

Delete Agent

Deletes the agent and all associated tools and knowledge-base documents. This action is irreversible.

Path & Query

1
  • idstringrequired

    UUID of the agent to delete.

Errors

3
401Unauthorized

Missing or invalid API key.

Add X-API-Key: YOUR_KEY to your request headers.

403Forbidden

Your API key does not have the required scope (agents:read or agents:write).

Issue a new key with the agents:read or agents:write scope.

404Not Found

No agent with this ID exists.

Confirm the UUID from GET /agents.

POST/agents/:id/duplicate

Create a copy of an existing agent.

Duplicate Agent

Creates a new agent with the same configuration as the source agent. The copy's name is suffixed with "(copy)". Tools are also duplicated; knowledge-base documents are not.

Path & Query

1
  • idstringrequired

    UUID of the agent to duplicate.

Errors

4
401Unauthorized

Missing or invalid API key.

Add X-API-Key: YOUR_KEY to your request headers.

403Forbidden

Your API key does not have the required scope (agents:read or agents:write).

Issue a new key with the agents:read or agents:write scope.

404Not Found

No agent with this ID exists.

Confirm the UUID from GET /agents.

422Unprocessable Entity

voice_id does not match any voice available to your tenant.

Use a voice_id from GET /voices.

POST/agents/:id/tools

Attach a new HTTP tool to an agent.

Add Tool

Adds an HTTP-callable tool that the agent's LLM can invoke during a conversation. Define the JSON Schema for the parameters so the LLM knows how to call it.

Path & Query

1
  • idstringrequired

    UUID of the agent.

Request body

8
  • namestringrequired

    Tool name used in the LLM function call (snake_case, no spaces).

  • descriptionstringoptional

    Human-readable description of what the tool does. The LLM uses this to decide when to call it.

  • tool_typestringoptional

    Tool type — function for HTTP callbacks. Default: function.

  • parameters_schemaobjectoptional

    JSON Schema object describing the tool's parameters.

  • parametersobjectoptional

    Alias for parameters_schema.

  • endpoint_urlstringoptional

    HTTPS URL (port 443) the platform calls when the agent invokes this tool. Must be a publicly resolvable hostname or public IP literal (no localhost, no private/internal IPs, no embedded credentials, no URL fragments). Enforced at API-validation time when the tool is created — the request is rejected if the host cannot be resolved or resolves to a non-public address (or the URL is not on port 443).

  • headersobjectoptional

    Additional HTTP headers to send with the tool request (e.g. {"Authorization": "Bearer token"}).

  • http_methodstringoptional

    HTTP method used to dispatch the tool. POST (default): LLM arguments and contextual IDs go in the JSON request body. GET: arguments go in the URL query string (non-scalar values JSON-encoded); contextual IDs are forwarded as X-Aethex-Agent-Id, X-Aethex-Conversation-Id, and X-Aethex-Call-Id headers; no body is sent. Operator-pinned query parameters in the endpoint URL are always authoritative — if the LLM supplies an argument with the same key it is silently dropped. Only POST and GET are accepted. Type note (GET only): scalars are stringified directly, so string "true" and boolean true both arrive as flag=true — indistinguishable on the receiving end. null arrives as the literal string "null".

Errors

5
401Unauthorized

Missing or invalid API key.

Add X-API-Key: YOUR_KEY to your request headers.

403Forbidden

Your API key does not have the required scope (agents:read or agents:write).

Issue a new key with the agents:read or agents:write scope.

404Not Found

No agent with this ID exists.

Confirm the UUID from GET /agents.

422Unprocessable Entity

name is missing, the parameters_schema is not valid JSON Schema, or endpoint_url is not a valid HTTPS URL on port 443 (no credentials, no fragment, no private/internal IPs).

Provide a snake_case name, valid JSON Schema in parameters_schema, and a valid https:// URL on port 443 with a publicly resolvable hostname.

503Service Unavailable

endpoint_url hostname could not be resolved or resolution timed out.

Ensure the hostname resolves publicly before creating the tool.

GET/agents/:id/tools

List all tools attached to an agent.

List Tools

Returns an array of all tools configured on the agent.

Path & Query

1
  • idstringrequired

    UUID of the agent.

Errors

3
401Unauthorized

Missing or invalid API key.

Add X-API-Key: YOUR_KEY to your request headers.

403Forbidden

Your API key does not have the required scope (agents:read or agents:write).

Issue a new key with the agents:read or agents:write scope.

404Not Found

No agent with this ID exists.

Confirm the UUID from GET /agents.

PATCH/agents/:id/tools/:tool_id

Update a tool's configuration.

Update Tool

Partially updates a tool. Only the fields you include are changed.

Path & Query

2
  • idstringrequired

    UUID of the agent.

  • tool_idstringrequired

    UUID of the tool to update.

Request body

8
  • namestringoptional

    New tool name.

  • descriptionstringoptional

    New tool description.

  • tool_typestringoptional

    Tool type.

  • parameters_schemaobjectoptional

    Replacement JSON Schema for parameters.

  • parametersobjectoptional

    Alias for parameters_schema.

  • endpoint_urlstringoptional

    New HTTPS endpoint URL (port 443). Must be a publicly resolvable hostname or public IP literal (no localhost, no private/internal IPs, no embedded credentials, no URL fragments). Enforced at API-validation time when the tool is updated — the request is rejected if the host cannot be resolved or resolves to a non-public address (or the URL is not on port 443).

  • headersobjectoptional

    New headers object.

  • http_methodstringoptional

    New HTTP method — POST or GET. See the create-tool description for dispatch details.

Errors

7
401Unauthorized

Missing or invalid API key.

Add X-API-Key: YOUR_KEY to your request headers.

403Forbidden

Your API key does not have the required scope (agents:read or agents:write).

Issue a new key with the agents:read or agents:write scope.

404Not Found

No agent with this ID exists.

Confirm the UUID from GET /agents.

404Not Found

No tool with this ID exists on the agent.

Confirm the tool UUID from GET /agents/:id/tools.

422Unprocessable Entity

Request body is empty — no fields to update.

Include at least one field to update.

422Unprocessable Entity

A field value is invalid (e.g. parameters_schema is not valid JSON Schema, or endpoint_url is not HTTPS on port 443, contains credentials or a URL fragment, or resolves to a private/internal IP).

Check field types and constraints.

503Service Unavailable

endpoint_url hostname could not be resolved or resolution timed out.

Ensure the hostname resolves publicly before updating the tool.

DELETE/agents/:id/tools/:tool_id

Remove a tool from an agent.

Delete Tool

Permanently removes the tool from the agent. This action is irreversible.

Path & Query

2
  • idstringrequired

    UUID of the agent.

  • tool_idstringrequired

    UUID of the tool to remove.

Errors

4
401Unauthorized

Missing or invalid API key.

Add X-API-Key: YOUR_KEY to your request headers.

403Forbidden

Your API key does not have the required scope (agents:read or agents:write).

Issue a new key with the agents:read or agents:write scope.

404Not Found

No agent with this ID exists.

Confirm the UUID from GET /agents.

404Not Found

No tool with this ID exists on the agent.

Confirm the tool UUID from GET /agents/:id/tools.

POST/agents/:id/knowledge-base

Add a document to an agent's knowledge base.

Upload Knowledge Base Document

Uploads a PDF, DOCX, TXT, or MD file to the agent's RAG knowledge base. The platform processes and indexes it for retrieval during conversations.

Path & Query

1
  • idstringrequired

    UUID of the agent.

Request body

3
  • filebinaryoptional

    Document file to upload (PDF, DOCX, TXT, MD).

  • textstringoptional

    Plain-text content to add as a virtual document instead of a file.

  • filenamestringoptional

    Filename to assign to the virtual text document.

Errors

5
401Unauthorized

Missing or invalid API key.

Add X-API-Key: YOUR_KEY to your request headers.

403Forbidden

Your API key does not have the required scope (agents:read or agents:write).

Issue a new key with the agents:read or agents:write scope.

404Not Found

No agent with this ID exists.

Confirm the UUID from GET /agents.

400Bad Request

Both file and text are missing.

Provide either a file (multipart) or a text field.

422Unprocessable Entity

The file field is present but empty, or the file type is not supported.

Upload a non-empty PDF, DOCX, TXT, or MD file.

POST/agents/:id/knowledge-base/by-upload

Add a knowledge base document from a pre-staged upload.

Upload KB Document by Upload ID

Attaches a document to the agent's knowledge base using a file already staged via POST /uploads/presign. Avoids re-uploading when the file is already in storage.

Path & Query

1
  • idstringrequired

    UUID of the agent.

Request body

3
  • upload_idstringrequired

    Signed upload token returned by POST /uploads/presign. Opaque string, 8–8192 characters.

  • languagestringoptional

    Language hint for text extraction.

  • filenamestringoptional

    Override for the document filename.

Errors

5
401Unauthorized

Missing or invalid API key.

Add X-API-Key: YOUR_KEY to your request headers.

403Forbidden

Your API key does not have the required scope (agents:read or agents:write).

Issue a new key with the agents:read or agents:write scope.

404Not Found

No agent with this ID exists.

Confirm the UUID from GET /agents.

422Unprocessable Entity

upload_id is invalid or refers to a file that has already been consumed.

Request a fresh upload token via POST /uploads/presign.

503Service Unavailable

The document processing service is temporarily unavailable.

Retry after a few seconds.

GET/agents/:id/knowledge-base

List all documents in an agent's knowledge base.

List KB Documents

Returns an array of all indexed documents for the agent, including filename, size, status, and chunk count.

Path & Query

1
  • idstringrequired

    UUID of the agent.

Errors

3
401Unauthorized

Missing or invalid API key.

Add X-API-Key: YOUR_KEY to your request headers.

403Forbidden

Your API key does not have the required scope (agents:read or agents:write).

Issue a new key with the agents:read or agents:write scope.

404Not Found

No agent with this ID exists.

Confirm the UUID from GET /agents.

POST/agents/:id/knowledge-base/:doc_id/process

Re-index a knowledge base document.

Reprocess KB Document

Re-triggers the chunking and indexing pipeline for a document. Use this if indexing previously failed or if you want to update the chunks after changing chunking parameters.

Path & Query

2
  • idstringrequired

    UUID of the agent.

  • doc_idstringrequired

    UUID of the document to reprocess.

Errors

5
401Unauthorized

Missing or invalid API key.

Add X-API-Key: YOUR_KEY to your request headers.

403Forbidden

Your API key does not have the required scope (agents:read or agents:write).

Issue a new key with the agents:read or agents:write scope.

404Not Found

No agent with this ID exists.

Confirm the UUID from GET /agents.

404Not Found

No knowledge-base document with this ID exists on the agent.

Confirm the document UUID from GET /agents/:id/knowledge-base.

422Unprocessable Entity

Document processing failed — unsupported file content or extraction error.

Check the document content; replace it with a supported file type if needed.

POST/agents/:id/knowledge-base/query

Test retrieval against an agent's knowledge base.

Query Knowledge Base

Runs a hybrid retrieval query (pgvector similarity + pg_trgm keyword matching, fused via RRF), applies the relevance floor, and returns the top matching chunks. Results are ordered by RRF rank; each public score is the relevance value used by the floor (max vector similarity or keyword similarity), so scores are not guaranteed descending. Useful for debugging RAG behavior before deploying the agent.

Path & Query

1
  • idstringrequired

    UUID of the agent.

Request body

3
  • querystringrequired

    Free-text query to run against the knowledge base.

  • top_kintegeroptional

    Number of chunks to return. Omit to use the agent's rag_top_k override or the platform default of 6.

  • min_scorenumberoptional

    Minimum relevance score. Omit to use the agent's rag_min_score override or the platform default of 0.1.

Errors

4
401Unauthorized

Missing or invalid API key.

Add X-API-Key: YOUR_KEY to your request headers.

403Forbidden

Your API key does not have the required scope (agents:read or agents:write).

Issue a new key with the agents:read or agents:write scope.

404Not Found

No agent with this ID exists.

Confirm the UUID from GET /agents.

422Unprocessable Entity

query is missing or empty.

Provide a non-empty query string.

GET/agents/:id/knowledge-base/texts

Retrieve the full extracted text from all knowledge base documents.

Get KB Texts

Returns the raw extracted text from every document in the agent's knowledge base. Useful for auditing what content the agent can access during conversations.

Path & Query

1
  • idstringrequired

    UUID of the agent.

Errors

3
401Unauthorized

Missing or invalid API key.

Add X-API-Key: YOUR_KEY to your request headers.

403Forbidden

Your API key does not have the required scope (agents:read or agents:write).

Issue a new key with the agents:read or agents:write scope.

404Not Found

No agent with this ID exists.

Confirm the UUID from GET /agents.

DELETE/agents/:id/knowledge-base/:doc_id

Remove a document from an agent's knowledge base.

Delete KB Document

Permanently deletes the document and its index chunks from the agent's knowledge base. This action is irreversible.

Path & Query

2
  • idstringrequired

    UUID of the agent.

  • doc_idstringrequired

    UUID of the document to delete.

Errors

4
401Unauthorized

Missing or invalid API key.

Add X-API-Key: YOUR_KEY to your request headers.

403Forbidden

Your API key does not have the required scope (agents:read or agents:write).

Issue a new key with the agents:read or agents:write scope.

404Not Found

No agent with this ID exists.

Confirm the UUID from GET /agents.

404Not Found

No knowledge-base document with this ID exists on the agent.

Confirm the document UUID from GET /agents/:id/knowledge-base.