Skip to main content
This guide will walk you through setting up your first agent and getting it running end-to-end.
After completing this quickstart, you’ll have a working agent and know where to go next based on your use case.

Prerequisites

  • API access credentials
  • Development environment set up
  • Basic understanding of REST APIs
1

Create a Project in the Corti Console

Start by creating a project in the Corti console. This gives you a workspace and access to manage your clients and credentials. If you haven’t set up authentication before, follow the Creating Clients and authentication quickstart guides.
2

Create Your First Agent

Use the Corti Agentic API to create your first agent. You’ll need an access token (obtained using your client credentials) and your tenant name.
import { CortiClient } from "@corti/sdk";

// Replace these with your values
const CLIENT_ID = "<your-client-id>";
const CLIENT_SECRET = "<your-client-secret>";
const ENVIRONMENT = "<eu-or-us>";
const TENANT = "<your-tenant-name>";

const client = new CortiClient({
    tenantName: TENANT,
    environment: ENVIRONMENT,
    auth: {
        clientId: CLIENT_ID,
        clientSecret: CLIENT_SECRET,
    },
});

const myAgent = await client.agents.create({
    name: "My First Agent",
    description: "A simple agent to get started with the Corti Agentic Framework",
});
using Corti;

// Replace these with your values
const string CLIENT_ID = "<your-client-id>";
const string CLIENT_SECRET = "<your-client-secret>";
const string ENVIRONMENT = "<eu-or-us>";
const string TENANT = "<your-tenant-name>";

var client = new CortiClient(
    tenantName: TENANT,
    environment: ENVIRONMENT,
    auth: CortiClientAuth.ClientCredentials(clientId: CLIENT_ID, clientSecret: CLIENT_SECRET)
);

var myAgent = await client.Agents.CreateAsync(
    new AgentsCreateAgent
    {
        Name = "My First Agent",
        Description = "A simple agent to get started with the Corti Agentic Framework",
    }
);
import requests

# Replace these with your values
ENVIRONMENT = "<eu-or-us>"
TENANT = "<your-tenant-name>"
TOKEN = "<your-access-token>"

response = requests.post(
    f"https://api.{ENVIRONMENT}.corti.app/v2/agents",
    headers={
        "Authorization": f"Bearer {TOKEN}",
        "Tenant-Name": TENANT,
        "Content-Type": "application/json",
    },
    json={
        "name": "My First Agent",
        "description": "A simple agent to get started with the Corti Agentic Framework",
    },
)
response.raise_for_status()
agent = response.json()
# Replace these with your values
ENVIRONMENT="<eu-or-us>"
TENANT="<your-tenant-name>"
TOKEN="<your-access-token>"

curl -X POST "https://api.${ENVIRONMENT}.corti.app/v2/agents" \
  -H "Authorization: Bearer ${TOKEN}" \
  -H "Tenant-Name: ${TENANT}" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "My First Agent",
    "description": "A simple agent to get started with the Corti Agentic Framework"
  }'
3

Run Your Agent

Use your stored credentials to authenticate, then run your agent end-to-end and verify it processes input and returns the expected outputs.
const agentResponse = await client.agents.messageSend(myAgent.id, {
    message: {
        role: "user",
        parts: [{
            kind: "text",
            text: "Hello there. This is my first message.",
        }],
        messageId: crypto.randomUUID(),
        kind: "message",
    },
});

console.log(agentResponse.task.status.message.parts[0].text);
var agentResponse = await client.Agents.MessageSendAsync(
    myAgent.Id,
    new AgentsMessageSendParams
    {
        Message = new AgentsMessage
        {
            Role = AgentsMessageRole.User,
            Parts = new AgentsPart[]
            {
                new AgentsTextPart
                {
                    Kind = AgentsTextPartKind.Text,
                    Text = "Hello there. This is my first message.",
                }
            },
            MessageId = "messageId",
            Kind = AgentsMessageKind.Message,
        },
    }
);
import uuid
import requests

# Replace these with your values
AGENT_ID = "<your-agent-id>"
ENVIRONMENT = "<eu-or-us>"
TENANT = "<your-tenant-name>"
TOKEN = "<your-access-token>"

response = requests.post(
    f"https://api.{ENVIRONMENT}.corti.app/v2/agents/{AGENT_ID}/v1/message:send",
    headers={
        "Authorization": f"Bearer {TOKEN}",
        "Tenant-Name": TENANT,
        "Content-Type": "application/json",
    },
    json={
        "message": {
            "role": "user",
            "parts": [
                {
                    "kind": "text",
                    "text": "Hello there. This is my first message.",
                }
            ],
            "messageId": str(uuid.uuid4()),
            "kind": "message",
        }
    },
)
response.raise_for_status()
task_response = response.json()

# Print the task status message text (equivalent to agentResponse.task.status.message.parts[0].text)
print(task_response["task"]["status"]["message"]["parts"][0]["text"])
# Replace these with your values
AGENT_ID="<your-agent-id>"
ENVIRONMENT="<eu-or-us>"
TENANT="<your-tenant-name>"
TOKEN="<your-access-token>"

curl -X POST "https://api.${ENVIRONMENT}.corti.app/v2/agents/${AGENT_ID}/v1/message:send" \
  -H "Authorization: Bearer ${TOKEN}" \
  -H "Tenant-Name: ${TENANT}" \
  -H "Content-Type: application/json" \
  -d '{
    "message": {
      "role": "user",
      "parts": [{ "kind": "text", "text": "Hello there. This is my first message." }],
      "messageId": "msg-001",
      "kind": "message"
    }
  }'

Next Steps

Depending on your use case:
Please contact us if you need more information about the Corti Agentic Framework.