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

# Auggie SDK

> Build custom integrations and agents using the Auggie SDK.

<CardGroup cols={2}>
  <Card title="TypeScript SDK" icon="js" href="/cli/sdk-typescript">
    Build Node.js and TypeScript applications with the Auggie SDK
  </Card>

  <Card title="Python SDK" icon="python" href="/cli/sdk-python">
    Build Python applications with the Auggie SDK
  </Card>
</CardGroup>

## Installation

<CodeGroup>
  ```sh TypeScript theme={null}
  npm install @augmentcode/auggie-sdk
  ```

  ```sh Python theme={null}
  pip install auggie-sdk
  ```
</CodeGroup>

## Authentication

The Auggie SDK supports multiple authentication methods:

1. **Using `auggie login` (Recommended)** - Creates a session file at `~/.augment/session.json`
2. **Using Environment Variables** - Set `AUGMENT_SESSION_AUTH` to the session JSON from `auggie token print`
3. **Passing Credentials Directly** - Provide `apiKey` and `apiUrl` parameters when initializing

### Finding your credentials

<Note>
  For production deployments and CI/CD, consider using [Service Accounts](/cli/automation/service-accounts) when they are available for your plan.
</Note>

First, log in to create a local session:

```bash theme={null}
auggie login
```

For automation or non-interactive environments, get your session JSON:

```bash theme={null}
auggie token print
```

Then set the `AUGMENT_SESSION_AUTH` environment variable to the session JSON:

```bash theme={null}
export AUGMENT_SESSION_AUTH='<session-json>'
```

The session JSON includes both your access token and tenant URL, so no separate URL variable is needed.

## Quick Start

<CodeGroup>
  ```typescript TypeScript theme={null}
  import { Auggie } from "@augmentcode/auggie-sdk";

  const client = await Auggie.create({ model: "sonnet4.5" });
  const response = await client.prompt("What files are in the current directory?");
  console.log(response);
  await client.close();
  ```

  ```python Python theme={null}
  from auggie_sdk import Auggie

  agent = Auggie(model="sonnet4.5")
  result = agent.run("What is 2 + 2?", return_type=int)
  print(result)  # 4
  ```
</CodeGroup>

## Key Features

Both SDKs provide:

* **High-level API** - Simple interface for common tasks
* **Multiple Output Modes** - String responses, typed returns, streaming, and more
* **Codebase Awareness** - Automatic indexing and context from your workspace
* **Custom Tools** - Extend Auggie with your own tools and integrations

## TypeScript-Specific Features

The TypeScript SDK also includes:

* **AI SDK Provider** - Use Augment as a language model provider with [Vercel's AI SDK](https://sdk.vercel.ai/docs)
  * Compatible with `generateText`, `streamText`, and other AI SDK functions
  * Full support for tool calling (function calling)
  * Works with API credentials only (no local Auggie installation needed)
  * See the [TypeScript SDK documentation](/cli/sdk-typescript#ai-sdk-provider-vercel-ai-sdk) for details
