Skip to main content

TypeScript SDK

Build Node.js and TypeScript applications with the Auggie SDK

Python SDK

Build Python applications with the Auggie SDK

Installation

npm install @augmentcode/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

For production deployments and CI/CD, consider using Service Accounts when they are available for your plan.
First, log in to create a local session:
auggie login
For automation or non-interactive environments, get your session JSON:
auggie token print
Then set the AUGMENT_SESSION_AUTH environment variable to the session JSON:
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

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();

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
    • 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 for details