<aside> 🧭

Navigation:


Set Up an Organization

LLM Models

Model Evaluation Tool

Logs

Contact us

</aside>

Create and Deploy an Agent


To create your first AI agent, log in to the Deploy.AI Admin Panel and click the "+ Create Agent" button.

Screenshot 2025-01-07 at 15.33.55.png

Name Your Agent by assigning a clear, descriptive title. Optionally, add a short description to help identify it later.

Screenshot 2025-01-07 at 17.03.49.png

Define Agent Instructions by filling in the agent’s configuration. The config includes UI instructions, AI model selection, model prompt and agent features. We’ll cover each component in detail in the next section.

Screenshot 2025-01-07 at 17.07.16.png

Publish and Test Agents


Once the configuration is complete, click "Create" to deploy the agent.

image.png

While still in the editor window, go to the User Groups section that appears. Click "Edit User Groups" and toggle Visibility ON to ensure your agent is accessible.

You can now test your agent using the "Use the Agent" button or by accessing it at chat.sandbox.deploy.ai.

🔌 Generate Agent API

Agents built on Deploy.AI can be seamlessly integrated into your internal tools, client-facing applications, or custom workflows via a secure API. This gives teams full flexibility to use AI agents not only in the Deploy web interface, but also across any environment where automation or AI assistance is needed.

Whether you're embedding an agent into a customer support dashboard, enabling document analysis inside a CRM, or powering a chatbot on your website, Deploy's API makes it straightforward.

Here’s a full walkthrough of the Deploy API integration process.


1. Authenticate via OAuth2

Use your client_id and client_secret to obtain an access token.

Request

curl '<https://api-auth.sandbox.deploy.ai/oauth2/token>' \\
  -X POST \\
  --data-urlencode grant_type=client_credentials \\
  --data-urlencode client_id=YOUR_CLIENT_ID \\
  --data-urlencode client_secret=YOUR_CLIENT_SECRET

Response

{
  "access_token": "YOUR_ACCESS_TOKEN",
  "token_type": "Bearer",
  "expires_in": 3600
}

2. Create a Chat Session

Use the token to start a new chat session with a specific agent.

Request

curl '<https://core-api.sandbox.deploy.ai/chats>' \\
  -X POST \\
  -H 'Content-Type: application/json' \\
  -H 'Authorization: Bearer YOUR_ACCESS_TOKEN' \\
  --data-raw '{"agentId":"YOUR_AGENT_ID"}'

Response

{
  "id": "CHAT_ID"
}

3. Upload a File (Optional)

If your agent needs to process documents, upload them to the chat session.

Request

curl '<https://core-api.sandbox.deploy.ai/chats/CHAT_ID/files>' \\
  -X POST \\
  -H 'Authorization: Bearer YOUR_ACCESS_TOKEN' \\
  -H 'Content-Type: multipart/form-data' \\
  -F fieldName=inputFile \\
  -F [email protected]

Response

{
  "id": "FILE_ID"
}

4. Send a Message to the Agent

Ask a question or initiate interaction. You can reference uploaded files using fileId.

Request

curl '<https://core-api.sandbox.deploy.ai/messages>' \\
  -X POST \\
  -H 'Content-Type: application/json' \\
  -H 'Authorization: Bearer YOUR_ACCESS_TOKEN' \\
  --data-raw '{
    "chatId": "CHAT_ID",
    "content": [
      {
        "type": "form",
        "value": {
          "fields": [
            {
              "name": "inputFile",
              "value": "FILE_ID"
            }
          ]
        }
      }
    ],
    "stream": false
  }'

5. Use WebSocket for Real-Time Responses (Optional)

To receive streaming responses in real time, set stream: true in your message request and connect via WebSocket.

WebSocket Connection

wscat -c "wss://ws.sandbox.deploy.ai/?access_token=YOUR_ACCESS_TOKEN"

🛠 Supported Methods and Protocols

Feature Supported?
HTTP Methods POST (primary method)
Protocols HTTPS (default), WebSocket (wss://)
Auth Method OAuth2 (Bearer token in Authorization header)
Data Format JSON for most payloads, multipart/form-data for file uploads

🧾 Quick Reference

Term Description
client_id Your Deploy.AI client ID
client_secret Your Deploy.AI client secret
access_token Token used in Authorization header
chatId ID of the chat session
fileId ID of the uploaded file (if any)