everruns-sdk
Rust SDK for the Everruns API.
Installation
Quick Start
use ;
async
Agent Harness
Each agent owns a harness. Set it with .harness_name(...) (preferred) or .harness_id(...) (mutually exclusive) on CreateAgentRequest; omit both to default to the org's generic harness. A session created from the agent runs on the agent's harness.
use ;
// Create an agent on a specific harness
let agent = client
.agents
.create_with_options
.await?;
// Agent-first session: runs on the agent's harness
let session = client
.sessions
.create_with_options
.await?;
Harnesses & Models
Discover and manage harnesses, and browse available models to choose a default_model_id.
// Browse harnesses, then create one
let harnesses = client.harnesses.list.await?; // or .search("research")
let harness = client.harnesses.get.await?;
let custom = client
.harnesses
.create
.await?;
let examples = client.harnesses.list_examples.await?;
// List models to pick a default for an agent
let models = client.models.list.await?;
Initial Files
use ;
let session = client
.sessions
.create_with_options
.await?;
Runnable example: examples/initial_files.rs
Agent Versions
use ;
let version = client
.agents
.create_version
.await?;
let versions = client.agents.list_versions.await?;
let diff = client
.agents
.diff_versions
.await?;
Workspaces
Workspaces hold files shared across sessions.
use CreateWorkspaceRequest;
let workspace = client
.workspaces
.create
.await?;
client
.workspace_files
.create
.await?;
let file = client
.workspace_files
.read
.await?;
let files = client
.workspace_files
.list
.await?;
Runnable example: examples/workspaces.rs
Memories
Memories are long-term, searchable knowledge stores for agents.
use CreateMemoryRequest;
let memory = client
.memories
.create
.await?;
client
.memories
.create_file
.await?;
let results = client.memories.grep_files.await?;
client.memories.sync.await?;
Runnable example: examples/memories.rs
Authentication
The SDK uses personal access token authentication. Set the EVERRUNS_API_KEY environment variable or pass the token explicitly. For personal access tokens with access to multiple organizations, set EVERRUNS_ORG_ID or pass org_id explicitly:
// From environment variable
let client = from_env?;
Or with an explicit token and organization:
let client = builder
.api_key
.org_id
.build?;
Streaming Events
The SDK supports SSE streaming with automatic reconnection:
use StreamExt;
use StreamOptions;
let stream = client.events.stream.await?;
while let Some = stream.next.await
Error Handling
use Error;
match client.agents.get.await
License
MIT