SDKs
Official client libraries for Rust, Python, and TypeScript — typed clients, async APIs, SSE streaming with automatic reconnection.
The Everruns SDKs are official client libraries for building agent applications. Rust, Python, and TypeScript with a consistent API across all three.
What the SDKs handle for you:
- Consistent API across languages
- Async/await patterns throughout
- SSE streaming with automatic reconnection, heartbeat-based stale detection, and
since_idresumption - Typed models generated from the OpenAPI spec
- Sub-client organization (
agents,sessions,messages,events,filesystem, …)
For a hands-on lesson, see Build your first agent or the minimal Run an Agent notebook.
To call one agent from an application without a personal access token, use the SDKs’ AgentClient with an agent key instead of the management client. See Agent API.
Install
Requires Rust 1.70+
cargo add everruns-sdkRequires Python 3.10+
pip install everruns-sdkRequires Node.js 18+
npm install @everruns/sdkAuthenticate
All SDKs read EVERRUNS_API_KEY (a personal access token, evr_pat_...) and
EVERRUNS_API_URL from the environment. Always set the URL: use
https://app.everruns.com/api for the Everruns demo instance, or
http://<your-host>/api for a self-hosted Platform. Create the token under
Settings > Personal Access Tokens.
use everruns_sdk::Everruns;
let client = Everruns::from_env()?; // EVERRUNS_API_KEY + EVERRUNS_API_URLlet client = Everruns::with_base_url("evr_pat_...", "https://app.everruns.com/api")?;from everruns_sdk import Everruns
client = Everruns() # EVERRUNS_API_KEY + EVERRUNS_API_URLclient = Everruns(api_key="evr_pat_...", base_url="https://app.everruns.com/api")import { Everruns } from "@everruns/sdk";
const client = new Everruns(); // EVERRUNS_API_KEY + EVERRUNS_API_URLconst client = new Everruns({ apiKey: "evr_pat_...", baseUrl: "https://app.everruns.com/api" });API coverage
| Resource | Operations |
|---|---|
| Agents | Create, list, get, apply, copy, delete, import, export, stats, versions, health checks |
| Sessions | Create, list, get, delete, cancel, resume, pin, export, set secrets, budgets |
| Messages | Create, list, submit client-side tool results |
| Events | List, stream (SSE) |
| Capabilities | List, get, guardrail dry runs |
| Harnesses | Create, list, search, get, update, delete |
| Models | List, get |
| Workspaces | Create, list, get, update, delete |
| Workspace files | List, read, create, update, delete, move, copy, grep, stat |
| Memories | Create, list, get, update, delete, sync, file operations |
| Budgets | Create, list, get, update, delete, top up, ledger, check |
| Connections | Set, list, remove |
Everything else (providers, MCP servers, organizations, schedules) is available through the REST API.
Error handling
| Error type | Description |
|---|---|
AuthenticationError | Invalid or missing API key (Python, TypeScript) |
NotFoundError | Resource not found (Python, TypeScript) |
RateLimitError | Rate limit exceeded (Python, TypeScript) |
ApiError | General API error; Rust uses Error::Api { status, .. } for all HTTP errors and Error::Auth for credential problems |
use everruns_sdk::Error;
match client.agents().get("invalid-id").await { Ok(agent) => println!("Found: {}", agent.name), Err(Error::Api { status: 404, message, .. }) => println!("Not found: {}", message), Err(Error::Auth(msg)) => println!("Auth error: {}", msg), Err(e) => println!("Other error: {}", e),}from everruns_sdk import NotFoundError, AuthenticationError
try: agent = await client.agents.get("invalid-id")except NotFoundError as e: print(f"Not found: {e}")except AuthenticationError as e: print(f"Auth error: {e}")import { NotFoundError, AuthenticationError } from "@everruns/sdk";
try { const agent = await client.agents.get("invalid-id");} catch (e) { if (e instanceof NotFoundError) { console.log(`Not found: ${e.message}`); } else if (e instanceof AuthenticationError) { console.log(`Auth error: ${e.message}`); }}Do something
- Build your first agent — guided tutorial.
- Call your agent from code —
AgentClientwith an agent key. - Stream events with the SDK — common streaming patterns.
- Handle errors and cancel turns — graceful failure paths.
- Orchestrate multi-agent pipelines — chain agents together.
See also
- API reference — every endpoint, generated from OpenAPI.
- Agent API — the routes
AgentClientcalls. - Event Reference — every event type.
- GitHub Repository — source code and examples.