Skip to main content

Everruns SDK for Python

Python SDK for the Everruns API.

Installation

pip install everruns-sdk

Quick Start

import asyncio
from everruns_sdk import Everruns


async def main():
    # Uses EVERRUNS_API_KEY and optional EVERRUNS_ORG_ID environment variables
    client = Everruns()

    # Create an agent
    agent = await client.agents.create(
        name="Assistant",
        system_prompt="You are a helpful assistant.",
    )

    # Create a session
    session = await client.sessions.create(agent_id=agent.id)

    # Send a message
    await client.messages.create(session.id, "Hello!")

    # Stream events
    async for event in client.events.stream(session.id):
        if event.type == "output.message.completed":
            print(event.data)
            break

    await client.close()


asyncio.run(main())

Agent Harness

Each agent owns a harness. Set it on create/update with harness_name (preferred) or harness_id (mutually exclusive); omit both to default to the org's generic harness. A session created from the agent runs on the agent's harness.

# Create an agent on a specific harness
agent = await client.agents.create(
    name="researcher",
    system_prompt="You do deep research.",
    harness_name="deep-research",
)

# Agent-first session: no harness needed — it runs on the agent's harness
session = await client.sessions.create(agent_name="researcher")

Harnesses & Models

Discover and manage harnesses, and browse available models to choose a default_model_id.

# Browse harnesses, then create one
harnesses = await client.harnesses.list()  # or .search("research")
harness = await client.harnesses.get(harnesses[0].id)
custom = await client.harnesses.create(
    name="my-harness",
    system_prompt="Base instructions for every session.",
)
examples = await client.harnesses.list_examples()

# List models to pick a default for an agent
models = await client.models.list()

Initial Files

from everruns_sdk import Everruns, InitialFile

client = Everruns()

session = await client.sessions.create(
    agent_id="agent_...",
    initial_files=[
        InitialFile(
            path="/workspace/README.md",
            content="# Demo Project\n",
            encoding="text",
            is_readonly=True,
        ),
        InitialFile(
            path="/workspace/src/app.py",
            content='print("hello")\n',
            encoding="text",
        ),
    ],
)

Runnable example: examples/initial_files.py

Authentication

The SDK uses personal access token authentication. Set EVERRUNS_API_KEY 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
client = Everruns()

Or with an explicit token and organization:

client = Everruns(api_key="evr_pat_...", org_id="org_...")

Agent Versions

version = await client.agents.create_version(
    "agent_...",
    change_kind="manual",
    summary="Baseline",
)

versions = await client.agents.list_versions("agent_...")
diff = await client.agents.diff_versions("agent_...", "agentver_1", version.id)
fork = await client.agents.fork_version(
    "agent_...",
    version.id,
    name="forked-agent",
)
rollback = await client.agents.rollback_version(
    "agent_...",
    version.id,
    save_version=True,
)

Workspaces

Workspaces hold files shared across sessions.

workspace = await client.workspaces.create(name="team-docs")

await client.workspace_files.create(
    workspace.id,
    "/notes/welcome.md",
    "# Welcome\n",
    encoding="text",
)
file = await client.workspace_files.read(workspace.id, "/notes/welcome.md")
files = await client.workspace_files.list(workspace.id, recursive=True)

Runnable example: examples/workspaces.py

Memories

Memories are long-term, searchable knowledge stores for agents.

memory = await client.memories.create(name="product-knowledge")

await client.memories.create_file(
    memory.id,
    "/facts/product.md",
    "# Product\n",
    encoding="text",
)
results = await client.memories.grep_files(memory.id, "product")
await client.memories.sync(memory.id)

Runnable example: examples/memories.py

License

MIT

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

everruns_sdk-0.2.1.tar.gz (75.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

everruns_sdk-0.2.1-py3-none-any.whl (26.7 kB view details)

Uploaded Python 3

File details

Details for the file everruns_sdk-0.2.1.tar.gz.

File metadata

  • Download URL: everruns_sdk-0.2.1.tar.gz
  • Upload date:
  • Size: 75.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for everruns_sdk-0.2.1.tar.gz
Algorithm Hash digest
SHA256 b2e83e45eb10304d0e35fa4960a5cbe837cc444ad73d8dcd601d2550ce77ce09
MD5 368748ce26b405abdd29ee962f99cd86
BLAKE2b-256 ecfa654cbdf2434adc5c8fb5800a9ececd95309fcefeeec0f188986f045cc88b

See more details on using hashes here.

Provenance

The following attestation bundles were made for everruns_sdk-0.2.1.tar.gz:

Publisher: publish.yml on everruns/sdk

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file everruns_sdk-0.2.1-py3-none-any.whl.

File metadata

  • Download URL: everruns_sdk-0.2.1-py3-none-any.whl
  • Upload date:
  • Size: 26.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for everruns_sdk-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 bf77769c70a005a5f2ed3695a81f1b4cae0afd79492cde247e596ba65b6229a5
MD5 97950b87541d8c8be70fe4b44142ef4b
BLAKE2b-256 efe9baec9c974dc23c4f708a6dc2310f3d2ee7b7438026fb2dfd6b5b323385b9

See more details on using hashes here.

Provenance

The following attestation bundles were made for everruns_sdk-0.2.1-py3-none-any.whl:

Publisher: publish.yml on everruns/sdk

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

This release

0.2.1 This release

2 files

0.2.0

2 files

0.1.10

2 files

0.1.9

2 files

0.1.8

2 files

0.1.7

2 files

0.1.6

2 files

0.1.5

2 files

0.1.4

2 files

0.1.3

2 files

0.1.2

2 files

0.1.1

2 files

0.1.0

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page