Skip to main content

Installation

pip install voker
Set the VOKER_API_KEY environment variable to your API key before using the SDK. You can find your key in the Voker dashboard under settings.

Quick start

Replace your existing LLM provider import with the Voker-wrapped version. No other code changes are required.
from openai import OpenAI 
from voker.ai.provider_openai import OpenAI 

client = OpenAI()

client.chat.completions.create(
    voker_agent="customer-support-agent",  # required
    voker_session="user-session-1",        # required
    model="gpt-4.1-mini",
    messages=[{"role": "user", "content": "Hello, world!"}],
)
The voker_agent parameter identifies which agent handled the request. The voker_session parameter ties the call to a specific session. Both are required for Voker to associate the event with the correct agent and session in your dashboard. For provider-specific setup guides, see OpenAI, Anthropic, and Gemini.

Python SDK Reference

VokerClient

The Voker Client provides a way to create an update Agents, Agent Versions, People and Events programmatically. Requests are made in a separate thread as the main process as to not add latency to your application. This is used by the SDKs but can also be used directly if you want more control over when requests are sent. Class VokerClient
FieldTypeDescription
eventsVokerClient_EventsCreate events tied to sessions, agents, and people.
peopleVokerClient_PeopleCreate and update person records.
agentsVokerClient_AgentsCreate agent records.
agent_versionsVokerClient_AgentVersionsCreate agent version records.
close() - Waits for all pending background requests to complete and shuts down the worker thread. Call this before your process exits to avoid dropped events. Class VokerClient_Agents create(agent_name: str, description: Optional[str]) - Creates an agent with the given name. If the agent already exists, the call is a no-op. Class VokerClient_AgentVersions create(agent_name: str, agent_version_name: str, description: Optional[str]) - Creates a new version under the specified agent. Class VokerClient_Events create(event_name: str, properties: EventProperties, session: str, agent: Optional[str], agent_version: Optional[str], person: Optional[str]) - Enqueues an event for background delivery. session is required; all other association fields are optional. Class VokerClient_People create(person_id: str, properties: dict[str, Any]) - Creates a person record with the given ID and properties. If the person already exists, the call is a no-op. update(person_id: str, properties: dict) - Merges the provided properties into an existing person record.

ApiClient

The API Client provides a way to make requests to the Voker API directly. This is used under the hood by the Voker Client, but can also be used directly if you want more control over how requests are made. Fetching Agents, Agent Versions, and People is a common use case for using the API Client directly. Class ApiClient
FieldTypeDescription
eventsApiClient_EventsCreate events directly via the API.
peopleApiClient_PeopleGet, create, and update person records.
fingerprintsApiClient_FingerprintsCreate anonymous fingerprint identifiers.
agentsApiClient_AgentsCreate and fetch agent records.
agent_versionsApiClient_AgentVersionsCreate and fetch agent version records.
Class ApiClient_Agents create(agent_name: str, description: Optional[str]) -> Agent - Creates and returns a new agent. get(agent_name: str) -> Agent - Returns the agent with the given name. Class ApiClient_AgentVersions create(agent_name: str, agent_version_name: str, description: Optional[str]) -> AgentVersion - Creates and returns a new version under the given agent. get(agent_name: str, agent_version_name: str) -> AgentVersion - Returns the specified agent version. Class ApiClient_Events create(event_name: str, properties: EventProperties, session: str, fingerprint_id: str, agent: Optional[str], agent_version: Optional[str], person: Optional[str]) - Creates an event. Unlike VokerClient_Events, this method requires a fingerprint_id. Class ApiClient_Fingerprints create() -> Fingerprint - Generates and returns a new anonymous fingerprint identifier. Class ApiClient_People get(person_id: str) -> Person - Returns the person with the given ID. create(person_id: str, properties: dict[str, Any]) -> Person - Creates and returns a new person. update(person_id: str, properties: dict) -> Person - Merges properties into an existing person and returns the updated record.

Types

These Python data classes are returned by ApiClient methods.

Agent

Represents an AI agent registered in Voker.
FieldTypeDescription
agent_namestrUnique identifier name for the agent.
descriptionstr | NoneOptional human-readable description.
agent_numberintAuto-assigned numeric identifier.
created_atdatetimeTimestamp when the agent was created.
deprecated_atdatetime | NoneTimestamp when the agent was deprecated, if ever.

AgentVersion

Represents a specific version of an agent.
FieldTypeDescription
agent_version_namestrUnique name for this version within the agent.
descriptionstr | NoneOptional description.
agent_version_numberintAuto-assigned numeric identifier.
created_atdatetimeTimestamp when the version was created.
deprecated_atdatetime | NoneTimestamp when the version was deprecated, if ever.

Fingerprint

An anonymous identifier used to track activity without a known person ID.
FieldTypeDescription
fingerprint_idstrUnique fingerprint value.

Person

Represents a user or entity tracked in Voker.
FieldTypeDescription
person_idstrYour application’s identifier for this person.
propertiesdict[str, Any] | NoneArbitrary key-value metadata.
created_atdatetimeTimestamp when the person was first created.