> ## Documentation Index
> Fetch the complete documentation index at: https://docs.corti.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Quickstart

> Create your first agent, attach a connector, and send a message in minutes.

This guide walks you through creating your first agent with a registry connector, sending a message, and receiving a response. By the end, you will have a working end-to-end agent.

<Tip>After completing this quickstart, you will have a working agent and know where to go next based on your use case.</Tip>

## Prerequisites

* API access credentials (client ID and client secret, or an access token)
* Development environment set up
* Basic understanding of REST APIs

If you haven't set up authentication, follow the [Creating Clients](/authentication/creating_clients) and [authentication quickstart](/authentication/quickstart) guides first.

<Steps>
  <Step title="Create a project in the Corti Console" titleSize="h3">
    Start by creating a project in the [Corti Console](https://console.corti.app). This gives you a workspace and access to manage your clients and credentials.
  </Step>

  <Step title="Create your first agent" titleSize="h3">
    Use the Agentic API to create your first agent. You need an access token (obtained using your client credentials) and your tenant name.

    The example below creates a persistent agent with a registry connector (`memory-expert`) attached.

    <CodeGroup>
      ```ts title="JavaScript" theme={null}
      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",
          lifecycle: "persistent",
          connectors: [
              { type: "registry", name: "memory-expert" },
          ],
      });
      ```

      ```csharp title="C# .NET" theme={null}
      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 AgentsCreateRequest
          {
              Name = "My First Agent",
              Description = "A simple agent to get started with the Corti Agentic Framework",
              Lifecycle = AgentsLifecycle.Persistent,
              Connectors = new[]
              {
                  new CommonRegistryConnectorCreate
                  {
                      Type = "registry",
                      Name = "memory-expert",
                  },
              },
          }
      );
      ```

      ```python title="Python" expandable theme={null}
      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/agentic/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",
              "lifecycle": "persistent",
              "connectors": [
                  {"type": "registry", "name": "memory-expert"},
              ],
          },
      )
      response.raise_for_status()
      agent = response.json()
      ```

      ```bash title="cURL" theme={null}
      # 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/agentic/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",
          "lifecycle": "persistent",
          "connectors": [
            {"type": "registry", "name": "memory-expert"}
          ]
        }'
      ```
    </CodeGroup>

    <Check>
      The response includes the agent's `id` (a prefixed UUIDv7 like `agt.0192f4c8-...`). Save this ID for the next step.
    </Check>
  </Step>

  <Step title="Send a message" titleSize="h3">
    Send a message to your agent using the A2A HTTP+JSON binding. The response is either a `Task` (for longer work) or a `Message` (for quick responses).

    <CodeGroup>
      ```ts title="JavaScript" theme={null}
      const agentResponse = await client.agents.messageSend(myAgent.id, {
          message: {
              role: "ROLE_USER",
              parts: [{
                  text: "Hello there. This is my first message.",
              }],
              messageId: crypto.randomUUID(),
          },
      });

      if (agentResponse.task) {
          console.log(agentResponse.task.status.state);
          console.log(agentResponse.task.history?.at(-1)?.parts?.[0]?.text);
      } else if (agentResponse.message) {
          console.log(agentResponse.message.parts[0].text);
      }
      ```

      ```csharp title="C# .NET" theme={null}
      var agentResponse = await client.Agents.MessageSendAsync(
          myAgent.Id,
          new A2ASendMessageRequest
          {
              Message = new CommonMessage
              {
                  Role = CommonRole.RoleUser,
                  Parts = new[]
                  {
                      new CommonPart
                      {
                          Text = "Hello there. This is my first message.",
                      }
                  },
                  MessageId = Guid.NewGuid().ToString(),
              },
          }
      );

      if (agentResponse.Task != null)
      {
          Console.WriteLine(agentResponse.Task.Status.State);
      }
      else if (agentResponse.Message != null)
      {
          Console.WriteLine(agentResponse.Message.Parts[0].Text);
      }
      ```

      ```python title="Python" expandable theme={null}
      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/agentic/agents/{AGENT_ID}/a2a/message:send",
          headers={
              "Authorization": f"Bearer {TOKEN}",
              "Tenant-Name": TENANT,
              "Content-Type": "application/json",
              "A2A-Version": "1.0",
          },
          json={
              "message": {
                  "role": "ROLE_USER",
                  "parts": [
                      {"text": "Hello there. This is my first message."}
                  ],
                  "messageId": str(uuid.uuid4()),
              }
          },
      )
      response.raise_for_status()
      result = response.json()

      if "task" in result:
          task = result["task"]
          print(task["status"]["state"])
          if task.get("history"):
              print(task["history"][-1]["parts"][0]["text"])
      elif "message" in result:
          print(result["message"]["parts"][0]["text"])
      ```

      ```bash title="cURL" theme={null}
      # 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/agentic/agents/${AGENT_ID}/a2a/message:send" \
        -H "Authorization: Bearer ${TOKEN}" \
        -H "Tenant-Name: ${TENANT}" \
        -H "Content-Type: application/json" \
        -H "A2A-Version: 1.0" \
        -d '{
          "message": {
            "role": "ROLE_USER",
            "parts": [{ "text": "Hello there. This is my first message." }]
          }
        }'
      ```
    </CodeGroup>
  </Step>

  <Step title="Verify the response" titleSize="h3">
    Check the response to confirm your agent processed the message:

    * If the response contains a `task`, check `task.status.state`. A `TASK_STATE_COMPLETED` state means the task finished successfully. The agent's response is in `task.history` (the last `ROLE_AGENT` message).
    * If the response contains a `message`, the agent responded directly. The text is in `message.parts[0].text`.

    <Info>The response includes `task.metadata.$usage.credits`, reporting the credits used for the request. See [Tracking credit consumption](/get_started/tracking-credit-consumption) to attribute this to your own customers or features.</Info>
  </Step>
</Steps>

## Next steps

<CardGroup cols={2}>
  <Card title="Core concepts" icon="book-open" href="/agentic/core-concepts">Learn the fundamental building blocks: agents, connectors, tasks, messages, and contexts.</Card>
  <Card title="Connectors" icon="plug" href="/agentic/connectors">Understand the five connector types and how to attach them to agents.</Card>
  <Card title="Send a message" icon="send" href="/agentic/guides/send-message">Go deeper into message sending: blocking vs. non-blocking, DataParts, error handling.</Card>
  <Card title="Stream responses" icon="radio" href="/agentic/guides/stream-responses">Stream agent responses in real time via SSE.</Card>
</CardGroup>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.