profy is the official Python SDK for the Profy platform, providing both async and sync clients with built-in authentication, streaming, and error handling.
Installation
profy-sdk; the import name is profy (from profy import Profy). Requires Python 3.9+. The SDK is built on httpx.
Quick Start
Async Client (Recommended)
Sync Client
Client Configuration
Resource Namespaces
The SDK organizes API methods through resource namespaces:Agents
agents.run() — Invoke an Expert
AgentRunResponse object:
agents.run_stream() — Stream an Expert Invocation
AgentRunChunk contains:
Chat Completions
chat.completions.create() — Chat Completion
Non-streaming:
ChatResponse object:
Models
models.list() — Get Model List
Events
events.report() — Report a Custom Event
Error Handling
The SDK raisesProfyApiError when the API returns a 4xx/5xx status code:
Timeout Handling
agents.run() will attempt to return partial results already received on timeout (result.partial = True) rather than raising an exception directly.
Sync Client
ProfySync provides the exact same API but with synchronous methods:
ProfySync exposes the exact same resource namespaces as Profy (including events). Note: events.report() requires constructing the client with an OAuth Access Token (ProfySync(api_key=oauth_token)); calling /v1/events with an sk-pro- API Key returns 401.Full Example: Multi-Turn Chat Bot
Next Steps
TypeScript SDK
TypeScript SDK guide
API Reference
Complete API documentation

