Python SDK for Everruns API
Project description
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())
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 API key authentication. Set EVERRUNS_API_KEY or pass the key explicitly. For API keys with access to multiple organizations, set EVERRUNS_ORG_ID or pass org_id explicitly:
# From environment
client = Everruns()
# Explicit key and organization
client = Everruns(api_key="evr_...", 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,
)
License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file everruns_sdk-0.1.9.tar.gz.
File metadata
- Download URL: everruns_sdk-0.1.9.tar.gz
- Upload date:
- Size: 91.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4f390ea315960b8ce1bb37776c8e0e6bb5087ae6f40e694c5f4f351058fe0426
|
|
| MD5 |
c67e2c122ad58e91c51bdbbf7c9f0fee
|
|
| BLAKE2b-256 |
209b3de93b247b193a31eaccef0ce27f0ebc6f7e9fc79406d88fe2f4b6e564e6
|
Provenance
The following attestation bundles were made for everruns_sdk-0.1.9.tar.gz:
Publisher:
publish.yml on everruns/sdk
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
everruns_sdk-0.1.9.tar.gz -
Subject digest:
4f390ea315960b8ce1bb37776c8e0e6bb5087ae6f40e694c5f4f351058fe0426 - Sigstore transparency entry: 1481431131
- Sigstore integration time:
-
Permalink:
everruns/sdk@35bdb0778b8412ca65d588fde46f23c23810a9bb -
Branch / Tag:
refs/heads/main - Owner: https://github.com/everruns
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@35bdb0778b8412ca65d588fde46f23c23810a9bb -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file everruns_sdk-0.1.9-py3-none-any.whl.
File metadata
- Download URL: everruns_sdk-0.1.9-py3-none-any.whl
- Upload date:
- Size: 46.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c29a30aad38c7ca6833c1d27c8b778b8fa3171a6be746f17fb1b7acda628aa5e
|
|
| MD5 |
a05a536a051cb96617379fecd55734b1
|
|
| BLAKE2b-256 |
e4b1dbe4284642bcd1125f8def7778980a659589b918ee3d80a28899d76c98b4
|
Provenance
The following attestation bundles were made for everruns_sdk-0.1.9-py3-none-any.whl:
Publisher:
publish.yml on everruns/sdk
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
everruns_sdk-0.1.9-py3-none-any.whl -
Subject digest:
c29a30aad38c7ca6833c1d27c8b778b8fa3171a6be746f17fb1b7acda628aa5e - Sigstore transparency entry: 1481431299
- Sigstore integration time:
-
Permalink:
everruns/sdk@35bdb0778b8412ca65d588fde46f23c23810a9bb -
Branch / Tag:
refs/heads/main - Owner: https://github.com/everruns
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@35bdb0778b8412ca65d588fde46f23c23810a9bb -
Trigger Event:
workflow_dispatch
-
Statement type: