Python
Installation
pip install vokeruv add vokerpoetry add vokerMake sure to set the environment variable VOKER_API_KEY.
Quick Start
If you're using one of our supported SDKs, you can simply swap out the class you instantiate:
from openai import OpenAI
from voker.ai.provider_openai import OpenAI
client = OpenAI()
client.chat.completions.create(
model="gpt-4.1-mini",
messages=[
{
"role": "user",
"content": "Hello, world!",
}
],
)Python SDK Reference
Voker Client
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
Voker Client.
Fields
events: VokerClient_Events
Access events related endpoints.
people: VokerClient_People
Access people related endpoints.
agents: VokerClient_Agents
Access agents related endpoints.
agent_versions: VokerClient_AgentVersions
Access agent versions related endpoints.
Methods
Method close
Class VokerClient_Agents
Access agents related endpoints.
Methods
Method create
Parameters
agent_name: str
Unique identifier for the agent.
description: Optional[str]
Class VokerClient_AgentVersions
Access agent versions related endpoints.
Methods
Method create
Parameters
agent_name: str
The name of the existing agent that this version belongs to.
agent_version_name: str
Unique identifier for the agent version within its agent.
description: Optional[str]
Class VokerClient_Events
Access events related endpoints.
Methods
Method create
Parameters
event_name: str
properties: EventProperties
agent: Optional[str]
The name of the agent associated with the event.If this agent does not exist, it will be created. If an agent is not supplied, a default agent will be used.
agent_version: Optional[str]
The name of the agent version associated with the event.If this agent version does not exist, it will be created. If an agent version is not supplied, a default version will be used.
person: Optional[str]
The unique identifier of the person associated with the event.If the person does not exist, it will be created.
session: Optional[str]
The unique identifier of the session associated with the event.If the session does not exist, it will be created.
Class VokerClient_People
Access people related endpoints.
API Client
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 cases for using the API Client directly.
Class ApiClient
Voker API Client.
Fields
events: ApiClient_Events
Access events related endpoints.
people: ApiClient_People
Access people related endpoints.
fingerprints: ApiClient_Fingerprints
Access fingerprints related endpoints.
agents: ApiClient_Agents
Access agents related endpoints.
agent_versions: ApiClient_AgentVersions
Access agent versions related endpoints.
Class ApiClient_Agents
Access agents related endpoints.
Class ApiClient_AgentVersions
Access agent versions related endpoints.
Methods
Method create
Parameters
agent_name: str
The name of the existing agent that this version belongs to.
agent_version_name: str
Unique identifier for the agent version within its agent.
description: Optional[str]
Returns: AgentVersionMethod get
Parameters
agent_name: str
agent_version_name: str
Returns: AgentVersion
Class ApiClient_Events
Access the events API endpoints.
Methods
Method create
Parameters
event_name: str
properties: EventProperties
fingerprint_id: str
The fingerprint of the client that generated the event.
agent: Optional[str]
The name of the agent associated with the event.If this agent does not exist, it will be created. If an agent is not supplied, a default agent will be used.
agent_version: Optional[str]
The name of the agent version associated with the event.If this agent version does not exist, it will be created. If an agent version is not supplied, a default version will be used.
person: Optional[str]
The unique identifier of the person associated with the event.If the person does not exist, it will be created.
session: Optional[str]
The unique identifier of the session associated with the event.If the session does not exist, it will be created.
Class ApiClient_Fingerprints
Access fingerprints related endpoints.
Methods
Method create
Returns: Fingerprint
Class ApiClient_People
Access the people API endpoints.
Types
Class Agent
Represents an agent.
See Agents for more information.
Fields
agent_name: str
Unique identifier for the agent.
description: str | None
agent_number: int
Unique number assigned to the agent.
created_at: datetime
deprecated_at: datetime | None
Class AgentVersion
Represents an agent version.
See Agent Versions for more information.
Fields
agent_version_name: str
Unique identifier for the agent version within its agent.
description: str | None
agent_version_number: int
Unique number assigned to the agent version within its agent.
created_at: datetime
deprecated_at: datetime | None
Class Fingerprint
Represents a fingerprint.
See Fingerprints for more information.
Fields
fingerprint_id: str
Class Person
Represents a person.
See People for more information.
Fields
person_id: str
properties: dict[str, Any] | None
created_at: datetime