Skip to main content

Assistants

Assistants are AI entities that interact with users through different channels. They can be configured with specific languages, models, instructions, and connected to MCP (Model Context Protocol) servers for extended capabilities.

Get Assistant

GET /assistant/:assistant_id

Returns detailed information about a specific assistant.
:assistant_id
string
required
Assistant unique identifier

Response

message
string
Success message
data
object

Update Assistant

PATCH /assistant/:assistant_id

Updates an existing assistant’s properties. Only provided fields will be updated.
:assistant_id
string
required
Assistant unique identifier

Request Body

string
Name of the assistant
array
List of language codes. Must be in format “xx” or “xx-XX” (e.g., “pt”, “pt-BR”, “en-US”)
string
AI provider. Currently supports: OPENAI
string
AI model identifier
string
System instructions for the assistant
object

Response

message
string
Success message
data
object
Updated assistant object with same structure as GET response

Error Responses

422
object
Validation Error - Invalid language formats or other validation errors

Delete Assistant

DELETE /assistant/:assistant_id

Deletes an existing assistant.
:assistant_id
string
required
Assistant unique identifier

Response

message
string
Success message indicating the assistant was deleted

MCP Integration

Assistants can be connected to MCP (Model Context Protocol) servers to extend their capabilities with custom tools and functions.

Get MCP Tools

GET /assistant/:assistant_id/mcp/tools

Gets all available tools from MCP servers connected to the assistant.
:assistant_id
string
required
Assistant unique identifier

Attach MCP to Assistant

PUT /assistant/:assistant_id/mcp/:mcp_id

Attaches an MCP server to a specific assistant, enabling its tools for use.
:assistant_id
string
required
Assistant unique identifier
:mcp_id
string
required
MCP server unique identifier

Detach MCP from Assistant

DELETE /assistant/:assistant_id/mcp/:mcp_id

Removes an MCP server connection from an assistant.
:assistant_id
string
required
Assistant unique identifier
:mcp_id
string
required
MCP server unique identifier

Language Format

When specifying languages, use ISO 639-1 format:
  • Two-letter code: "pt", "en", "es"
  • Language-region code: "pt-BR", "en-US", "es-MX"
Invalid formats will result in a 422 validation error.

Examples

Get Assistant

curl -X GET https://api.plati.ai/assistant/abc123 \
  -H "Authorization: Bearer YOUR_API_KEY"

Update Assistant

curl -X PATCH https://api.plati.ai/assistant/abc123 \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Customer Support Bot",
    "languages": ["pt-BR", "en-US"],
    "instructions": "You are a helpful customer support assistant.",
    "configs": {
      "temperature": 0.7,
      "max_token_limit": 2000
    }
  }'

Delete Assistant

curl -X DELETE https://api.plati.ai/assistant/abc123 \
  -H "Authorization: Bearer YOUR_API_KEY"

Next Steps