Agents

Use AI Agents with specialized capabilities and tools. Call different Agents using different agent_id values.

What is an Agent?

Agents are specialized AI assistants with specific instructions, tools, and knowledge bases. Unlike regular LLM APIs, Agents can call multiple tools to complete complex tasks.

How to Use an Agent

The main difference between using Agent API and regular LLM API is:

  • Different API endpoint: agent/api/v1/chat/completions

  • Specify agent_id to select different Agents

  • Add X-Project: SeaCloud header

curl https://seacloud.api.seaart.ai/agent/api/v1/chat/completions \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "X-Project: SeaCloud" \
  -d '{
    "agent_id": "seagen_agent_gateway",
    "model": "gpt-4o",
    "messages": [
      {
        "role": "user",
        "content": [
          {
            "type": "text",
            "text": "Hello, please introduce yourself."
          }
        ]
      }
    ]
  }'

Get Agent ID

You can get agent_id in two ways:

1

Use Pre-built Agents

Browse pre-built Agents provided by SeaCloud and get agent_id. Steps:

  • Click "Agents" in the top navigation, then select "Explore"

  • Browse and select an Agent you are interested in

  • On the Agent details page, you can see the agent_id (displayed below the Agent name), click the copy button to copy it

  • In the "API" tab on the details page, you can also view the complete curl example

2

Create Custom Agent in Agent Studio

You can create your own Agent in Agent Studio and get the corresponding agent_id for API calls. Steps:

  • Visit Agent Studio page by clicking "Studio" in the top navigation

  • Click the "Create Agent" button in the top right corner

  • Configure Agent instructions, tools, and knowledge base

  • Click "Save" to save. A dialog will appear showing the agent_id and complete curl example for API calls

Agent vs LLM API Comparison

Feature
LLM API
Agent API

Endpoint

/llm/chat/completions

/agent/api/v1/chat/completions

Parameters

model, messages

agent_id, model, messages

Headers

Authorization

Authorization, X-Project

Capabilities

Text chat only

Tool calling, multi-modal

Tip: Agent API provides more powerful capabilities including tool calling and multi-modal support, making it ideal for complex tasks that require multiple steps or external tool integration.

Last updated