Call your agent
Your server sends a message to Agnostic Agents. The agent uses its published instructions, selected knowledge, and permitted tools, then returns a reply.
A practical guide to what works today. Start with one published agent, one key, and one request.
Your server sends a message to Agnostic Agents. The agent uses its published instructions, selected knowledge, and permitted tools, then returns a reply.
You configure an external endpoint in Integrations. The agent may call that tool to read or update your service, within the permissions you grant.
Set these values locally. The example uses your shell’s uuidgen command; JavaScript can use crypto.randomUUID().
export AGENT_ID="your-agent-id"
export AGENT_API_KEY="your-private-agent-key"
export CONVERSATION_ID="$(uuidgen)"
export REQUEST_ID="$(uuidgen)"
curl "https://app.agnosticagents.com/api/v1/agents/$AGENT_ID/messages" \
-H "Authorization: Bearer $AGENT_API_KEY" \
-H "Content-Type: application/json" \
-d "{\"conversationId\":\"$CONVERSATION_ID\",\"requestId\":\"$REQUEST_ID\",\"message\":\"Hello. My name is Ada.\"}"Replace the two private values. Never put an agent API key in browser JavaScript, source control, or a public collection.
A collection is a saved set of example API requests. This one includes start a conversation, continue it, and replay the last request. It generates UUIDs for you and contains no credentials.
Download collection ↓agentId and your private agentApiKey. Keep the key local and do not share or sync it publicly./api/v1/agents/{agentId}/messagesBase URL: https://app.agnosticagents.com. Requires Authorization: Bearer <agent-key> and Content-Type: application/json.
| Body field | Required | Meaning |
|---|---|---|
conversationId | Yes · UUID | Generate once for a new conversation; reuse to continue. |
requestId | Yes · UUID | Generate for each new message. Reuse only for an identical retry. |
message | Yes · string | 1–4,000 characters after trimming. |
attachments | No · array | Up to 3 objects with name and extracted text. Each text is 1–60,000 characters; combined serialized attachment JSON is at most 600,000 bytes. |
The endpoint accepts JSON—not multipart file uploads or base64 documents. Extract file text on your server before including it. For persistent document knowledge, upload files in the agent’s Knowledge tab instead. Total request-body limit: 750,000 bytes.
A key is scoped to one agent and acts as its owner. Keys expire after 30 days and can be revoked in the app. The caller must retain the required workspace permissions. A conversation belongs to its user; another workspace member cannot automatically read it.
Successful requests return HTTP 200 with a complete JSON reply. Streaming is not available yet.
{
"text": "Hello Ada. How can I help?",
"tools": [],
"model": "upstage/solar-pro4",
"conversationId": "11111111-1111-4111-8111-111111111111",
"requestId": "22222222-2222-4222-8222-222222222222"
}This is an illustrative response shape, not a model-output guarantee. tools contains { tool, result } entries for tools that ran. When knowledge is retrieved, an optional sources array contains { fileId, name, passage }. The server selects the configured model; do not assume the returned model name will stay fixed.
New conversations snapshot the published configuration. Existing conversations retain that version’s instructions; current published grants still constrain knowledge and tools. Start a new conversation to use newly published instructions. Unsaved editor changes are not used by this endpoint.
Errors use { "error": "Human-readable explanation" }. Inspect the HTTP status and message; there are no stable machine-readable error codes yet.
| Status | Typical cause | Next step |
|---|---|---|
| 400 | Invalid JSON, UUID, message, or attachment. | Check the request fields. |
| 401 | Missing, expired, revoked, or wrong-agent key. | Create a valid key for this agent. |
| 403 | Required account or workspace access is missing. | Check verification and permissions. |
| 404 | Agent or conversation is unavailable to this caller. | Check IDs and ownership. |
| 409 | Agent not published, archived state, overlapping turn, or request-ID conflict. | Read the error before retrying. |
| 413 | Request body too large. | Reduce the payload. |
| 429 | Rate limit, credits, tokens, or spending safeguard reached. | Wait for rate/reset availability or review usage. |
| 502 | Agent/provider execution could not complete. | Check configuration and usage; handle failed or uncertain work carefully. |
Current limits include 20 new agent requests per minute per user per agent, and 100 stored conversations per user per agent, including archived conversations. These are beta limits. Keys are limited to 10 active keys per agent.
This is separate from calling an agent. In Integrations → Custom API tools, define what your own service allows the agent to do.
A tool does not grant arbitrary network access. Destinations and allowed inputs are configured on the server; credentials stay private. Read actions can still consume external-provider quotas. Check the external service’s permissions and charges.
Web chat, agent API requests, and metered AI features use the same owner-account allowance across workspaces. Billing shows consumed, reserved, and remaining credits, plus AI and estimated execution consumption. Token and spending safeguards also remain in force.
Requests reserve an estimate before execution and settle measured costs afterward. Uncertain provider charges retain their reservation. A failed execution may still consume compute or provider usage; an identical successful receipt replay does not rerun the agent.
Execution charges currently use a reference estimate, not a reconciled hosting invoice. Paid checkout remains disabled during beta. This guide does not promise unlimited usage, automatic overages, or paid-tool fees included in every plan.
Support and data-handling information ↗