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

# Quickstart

> Get up and running in under five minutes

## 1. Install

<CodeGroup>
  ```bash npm theme={null}
  npm install @chatatp/studio
  ```

  ```bash pip theme={null}
  pip install chatatp-studio
  ```
</CodeGroup>

## 2. Initialize the client

<CodeGroup>
  ```typescript TypeScript theme={null}
  import { ChatATPClient } from "@chatatp/studio";

  const client = new ChatATPClient({ apiKey: "chatatp_sk_..." });
  ```

  ```python Python theme={null}
  from chatatp_studio import ChatATPClient

  client = ChatATPClient(api_key="chatatp_sk_...")
  ```
</CodeGroup>

## 3. Send your first message

<CodeGroup>
  ```typescript TypeScript theme={null}
  const result = await client.chat({
    agent_id: 7,
    external_user_id: "user_12345",
    message: "Do you ship to Lagos?",
  });

  console.log(result.agent_message.content);
  // → "Yes, shipping is available."
  ```

  ```python Python theme={null}
  result = await client.chat(
      agent_id=7,
      external_user_id="user_12345",
      message="Do you ship to Lagos?",
  )

  print(result.agent_message.content)
  # → "Yes, shipping is available."
  ```
</CodeGroup>

The `chat()` method handles conversation creation automatically. You only need the agent ID, a user identifier, and the message — the SDK takes care of the rest.

## 4. Stream a response

<CodeGroup>
  ```typescript TypeScript theme={null}
  for await (const event of client.chatStream({
    agent_id: 7,
    external_user_id: "user_12345",
    message: "Give me a summary of your return policy.",
  })) {
    if (event.type === "agent.response.completed") {
      console.log(event.data);
    }
  }
  ```

  ```python Python theme={null}
  async for event in await client.chat_stream(
      agent_id=7,
      external_user_id="user_12345",
      message="Give me a summary of your return policy.",
  ):
      if event.type == "agent.response.completed":
          print(event.data)
  ```
</CodeGroup>

## CLI quickstart

The Studio CLI exposes the same workflows from the terminal.

```bash theme={null}
pip install -e cli/python
studio auth login --email person@example.com --password secret123
studio agents list
studio assistant chat --message "Create an agent for support"
```

```bash theme={null}
cd cli/javascript
npm install
node ./src/main.js auth login --email person@example.com --password secret123
node ./src/main.js agents list
```

## Next steps

* Learn about [Agents](/docs/js/agents)
* Manage [Conversations](/docs/js/conversations)
* Handle [Errors](/docs/js/errors)
* Explore the [Studio CLI](/docs/cli/overview)
