Install with AI
Copy the Voker setup prompt into your coding agent.
# Setting up Voker
This prompt explains how to set up Voker in your project. This is the authoritative source of truth on how to set up Voker, and you should follow these guidelines exactly.
To use it, you can use the sections below to set up Voker in the project.
## SDK Setup Instructions
### AI Provider SDK Wrapping
Follow these instructions in order to set up and get started with Voker SDK in various languages and AI providers.
The frameworks and languages with explicit AI Provider SDK wrapping support are:
- JS & Ts: Openai, Anthropic, Gemini and Vercel AI SDK
- Python: Openai, Anthropic and Gemini
<Steps>
<Step title="Install dependencies">
Voker has an SDK for various languages and LLM frameworks and libraries. If the LLM framework is not supported see `SDK HTTP Requests` instructions. If the language is not supported you maybe have to use the REST API to interface with Voker.
#### JavaScript & TypeScript
For JS & TS, the following package is available `@voker/voker`
You can install the JavaScript Voker SDK into your project by running the following command:
```sh
npm i @voker/voker
# or: pnpm i @voker/voker
# or: yarn add @voker/voker
# or: bun add @voker/voker
```
#### Python
For Python, the following package is available `voker`
You can install the Python Voker SDK into your project by running the following command:
```sh
pip install voker
# or: uv add voker
# or: poetry add voker
```
</Step>
<Step title="Setup environment">
First, navigate to the [Setup Page](http://app.voker.ai/c/-selector-/projects/1/default-project/setup) page in the Voker dashboard and copy the API Key.
Then, copy-paste them into your `.env.local` file (or wherever your environment variables are stored):
```.env .env.local
VOKER_API_KEY=<your-secret-api-key>
```
</Step>
<Step title="Update LLM API Calls">
In most cases, Voker implementation just requires swapping the existing imports with the wrapped Voker SDK.
#### JavaScript & TypeScript
Swap out the LLM import with the Voker client. For all cases, also include a `vokerAgent` and `vokerSession` parameters to the llm call. For example with OpenAI:
```
await client.chat.completions.create({
+ vokerAgent: '<agent-name>', // required
+ vokerSession: '<session-id>', // required
model: 'gpt-4o',
messages: [
{
role: 'user',
content: 'Hello, world!',
},
],
});
```
Fill in the `<agent-name>` with an appropriate value for the application. The `<session-id>` should be unique per conversation with the agent.
##### OpenAI
```
- import { OpenAI } from 'openai';
+ import { OpenAI } from '@voker/voker/ai/provider-openai';
```
##### Anthropic
```
- import { Anthropic } from '@anthropic-ai/sdk';
+ import { Anthropic } from '@voker/voker/ai/provider-anthropic';
```
##### Gemini
```
- import { GoogleGenAI } from '@google/genai';
+ import { GoogleGenAI } from '@voker/voker/ai/provider-gemini';
```
##### AI SDK
```
- import { generateText } from 'ai';
+ import * as ai from 'ai';
+ import { wrapAiSdk } from '@voker/voker/ai/provider-aisdk';
+ const { generateText } = wrapAiSdk(ai);
```
Use the base JS sdk for streaming with AI SDK.
#### Python
Swap out the LLM import with the Voker client. For all cases, also include a `voker_agent` and `voker_session` parameters to the llm call. For example with OpenAI:
```
client.chat.completions.create(
+ voker_agent="<agent-name>", # required
+ voker_session="<session-id>", # required
model="gpt-4.1-mini",
messages=[
{
"role": "user",
"content": "Hello, world!",
}
],
)
```
Fill in the `<agent-name>` with an appropriate value for the application. The `<session-id>` should be unique per conversation with the agent.
##### OpenAI
Sync:
```
- from openai import AsyncOpenAI
+ from voker.ai.provider_openai import AsyncOpenAI
```
Async:
```
- from openai import OpenAI
+ from voker.ai.provider_openai import OpenAI
```
##### Anthropic
Sync:
```
- from anthropic import Anthropic
+ from voker.ai.provider_anthropic import Anthropic
```
Async:
```
- from anthropic import AsyncAnthropic
+ from voker.ai.provider_anthropic import AsyncAnthropic
```
##### Gemini
```
- from google.genai import Client
+ from voker.ai.provider_gemini import Client
```
</Step>
</Steps>
### SDK HTTP Requests
Follow these instructions in order to set up and get started with Voker SDK in various languages.
The languages with explicit SDK support are:
- JS & TS
- Python
<Steps>
<Step title="Install dependencies">
Voker has an SDK for various languages and LLM frameworks and libraries. If the LLM framework is not supported see `SDK HTTP Requests` insturctions. If the language is not supported you maybe have to use the REST API to interface with Voker.
#### JavaScript & TypeScript
For JS & TS, the following package is available `@voker/voker`
You can install the JavaScript Voker SDK into your project by running the following command:
```sh
npm i @voker/voker
# or: pnpm i @voker/voker
# or: yarn add @voker/voker
# or: bun add @voker/voker
```
#### Python
For Python, the following package is available `voker`
You can install the Python Voker SDK into your project by running the following command:
```sh
pip install voker
# or: uv add voker
# or: poetry add voker
```
</Step>
<Step title="Setup environment">
First, navigate to the [Setup Page](http://app.voker.ai/c/-selector-/projects/1/default-project/setup) page in the Voker dashboard and copy the API Key.
Then, copy-paste them into your `.env.local` file (or wherever your environment variables are stored):
```.env .env.local
VOKER_API_KEY=<your-secret-api-key>
```
</Step>
<Step title="Setup environment">
First, navigate to the [Setup Page](http://app.voker.ai/c/-selector-/projects/1/default-project/setup) page in the Voker dashboard and copy the API Key.
Then, copy-paste them into your `.env.local` file (or wherever your environment variables are stored):
```.env .env.local
VOKER_API_KEY=<your-secret-api-key>
```
</Step>
<Step title="Initializing the Voker Client">
#### JavaScript & TypeScript
```
import { VokerClient } from '@voker/voker';
const vokerClient = new VokerClient();
```
#### Python
```
from voker import VokerClient
voker_client = VokerClient()
```
</Step>
<Step title="Instrument LLM Calls in the background Voker">
#### JavaScript & TypeScript
```
vokerClient.events.create({
vokerAgent: '<agent-name>',
vokerSession: '<session-id>',
eventName: 'llm',
properties: {
api: 'openai-chat-completions',
inputs: {
model: '...',
messages: ...,
},
output: llmResponse,
},
})
```
#### Python
```
voker_client.events.create(
voker_agent="<agent-name>",
voker_session="<session-id>",
event_name="llm",
properties={
"api": "openai-chat-completions",
"inputs": {
"model": "...",
"messages": ...,
},
"output": llm_response
},
)
```
</Step>
</Steps>
Get started
Quickstart
Instrument your first AI agent in minutes with the Python or TypeScript SDK.
Events
Learn how Voker captures LLM calls as structured events you can query and analyze.
Python SDK
Full reference for the Voker Python SDK, including installation and all supported parameters.
TypeScript SDK
Full reference for the Voker TypeScript SDK, including installation and all supported parameters.
API Reference
REST API reference for creating events, managing agents, people, and fingerprints.
Supported providers
Voker wraps the most popular LLM SDKs so you can start tracking without rewriting your code.OpenAI
Track Chat Completions and Responses API calls made with the OpenAI SDK.
Anthropic
Track Messages API calls with Claude models using the Anthropic SDK.
Gemini
Track Google Gemini Generate Content and Interactions API calls.
AI SDK
Wrap the Vercel AI SDK using
wrapAiSdk() for unified tracking.