AI Agents
SDK Documentation

TypeScript SDK

Type-safe SDK for Node.js and browser environments.

Estimated time: 10 minutes

Features

Full TypeScript types
Node.js & browser support
ESM and CommonJS
Tree-shakeable
Promise-based API
Automatic retries
1

Installation

npm install @tigeraccess/sdk

# or with yarn
yarn add @tigeraccess/sdk

# or with pnpm
pnpm add @tigeraccess/sdk
2

Initialize Client

import { TigerAccess } from '@tigeraccess/sdk';

// Using API key
const ta = new TigerAccess({ apiKey: 'your-api-key' });

// Using environment variable (TIGERACCESS_API_KEY)
const ta = new TigerAccess();
3

Create and Use Agent

// Create an agent
const agent = await ta.agents.create({
  name: 'my-agent',
  permissions: ['database:read:*'],
  rateLimits: { requestsPerMinute: 100 }
});

// Use agent session
const session = await agent.createSession();
try {
  const result = await session.db.query('analytics', 'SELECT * FROM users');
  console.log(result);
} finally {
  await session.close();
}
4

With Types

import { TigerAccess, Agent, Session, QueryResult } from '@tigeraccess/sdk';

interface User {
  id: string;
  email: string;
  name: string;
}

const ta = new TigerAccess();
const agent: Agent = await ta.agents.get('my-agent');

const session: Session = await agent.createSession();
const users: QueryResult<User[]> = await session.db.query<User[]>(
  'analytics',
  'SELECT * FROM users'
);

Ready to Build

Check out examples for common integration patterns.

View Examples