@profy-ai/sdk is the official TypeScript SDK for the Profy platform. It uses the native fetch API and supports both Node.js and browser environments.
Installation
fetch support needed).
Quick Start
Client Configuration
Resource Namespaces
Agents
agents.run() — Invoke an Expert
AgentRunResult type definition:
agents.runStream() — Stream an Expert Invocation
AgentRunChunk type definition:
Chat Completions
chat.completions.create() — Chat Completion
Non-streaming (returns ChatResponse):
AsyncGenerator<ChatChunk>):
Models
models.list() — Get Model List
Datasets and experiments
The eval client is@profy-ai/agent-sdk. The key owner must be that expert’s creator. The verifier on each example writes the score. This client has no method that submits one. HTTP fields are on Offline eval.
create turns examples into one dataset.json and uploads it. Pass files instead of examples when the package is already built. Omitting suite uses seed.
evaluate runs every example on the platform, then polls until the experiment leaves running. Use experiments.run to start without waiting. Use experiments.create when you run each turn yourself, and pass profyEval to agents.run:
metadata.profy_eval. After the turn, call experiments.closeRun(expert, experimentId, { task, trial }).
Other reads:
Error Handling
The SDK throwsProfyApiError when the API returns a non-2xx status code:
Timeout Handling
agents.run() will attempt to return partial results already received on timeout (result.partial = true).
Browser Environment
The SDK uses nativefetch and works in the browser:
Full Example: Express API Proxy
Full Example: Multi-Turn Conversation
Next Steps
Python SDK
Python SDK guide
API Reference
Complete API documentation

