Downloads
SDKs & client libraries
Install from your package manager or download the source directly. All SDKs are auto-generated from our OpenAPI spec and integration-tested against the live API.
Install
npm install @person.run/sdkFeatures
- Auto-generated types from OpenAPI spec
- Built-in retry logic with exponential backoff
- SSE streaming for real-time prompt responses
- Tree-shakeable ESM bundle
Quick start
typescript
import { PersonClient } from "@person.run/sdk";
const client = new PersonClient({
apiKey: process.env.PERSON_API_KEY,
defaultTenantId: "your-tenant-id",
});
const { persona } = await client.createPersona({
seed: { firstName: "Aria", age: 32 },
});
const reply = await client.prompt({
personaId: persona.id,
userPrompt: "Tell me about yourself.",
});Install
pip install person-sdkFeatures
- Zero required dependencies (stdlib only)
- Optional Pydantic models for typed responses
- SSE streaming via generator
- Works with Python 3.10+
Quick start
python
from person_sdk import PersonClient
client = PersonClient(
api_key="your-api-key",
default_tenant_id="your-tenant-id",
)
result = client.create_persona(
seed={"firstName": "Aria", "age": 32},
)
reply = client.prompt(
persona_id=result["persona"]["id"],
user_prompt="Tell me about yourself.",
)Install
devtools::install_github("person-run/person.run",
subdir = "packages/sdk-r")Features
- Built on httr2 for robust HTTP handling
- Designed for research and data science workflows
- SSE streaming for real-time responses
- Automatic retries with Retry-After support
Quick start
r
library(personrun)
client <- person_client(
api_key = "your-api-key",
default_tenant_id = "your-tenant-id"
)
result <- pr_create_persona(client, seed = list(
firstName = "Aria", age = 32
))
reply <- pr_prompt(client,
persona_id = result$persona$id,
user_prompt = "Tell me about yourself."
)