> ## 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.

You're viewing docs for **Auggie 0.x.x**
. To see Auggie 1.x.x, go to
[the 1.x.x docs](https://docs.augmentcode.com/cli/sdk.md)
.

> **[TypeScript SDK](https://docs.augmentcode.com/cli/v0/sdk-typescript.md)**
>
> Build Node.js and TypeScript applications with the Auggie SDK

> **[Python SDK](https://docs.augmentcode.com/cli/v0/sdk-python.md)**
>
> Build Python applications with the Auggie SDK

## Installation

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

```sh Python theme={null}
pip install auggie-sdk
```

## 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](https://docs.augmentcode.com/cli/v0/automation/service-accounts.md) when they are available for your plan.

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

```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
```

## 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](https://docs.augmentcode.com/cli/v0/sdk-typescript.md#ai-sdk-provider-vercel-ai-sdk) for details


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