Python SDK for agentkernel — run AI coding agents in secure, isolated microVMs
Project description
agentkernel
Python SDK for agentkernel — run AI coding agents in secure, isolated microVMs.
Install
pip install agentkernel-sdk
Requires Python 3.10+.
Quick Start
from agentkernel import AgentKernel
with AgentKernel() as client:
result = client.run(["echo", "hello"])
print(result.output) # "hello\n"
Async
from agentkernel import AsyncAgentKernel
async with AsyncAgentKernel() as client:
result = await client.run(["echo", "hello"])
print(result.output)
Sandbox Sessions
with AgentKernel() as client:
with client.sandbox("test", image="python:3.12-alpine") as sb:
sb.run(["pip", "install", "numpy"])
result = sb.run(["python3", "-c", "import numpy; print(numpy.__version__)"])
print(result.output)
# sandbox auto-removed
Streaming
for event in client.run_stream(["python3", "script.py"]):
if event.type == "output":
print(event.data["data"], end="")
Configuration
client = AgentKernel(
base_url="http://localhost:18888", # default
api_key="sk-...", # optional
timeout=30.0, # default
)
Or use environment variables:
export AGENTKERNEL_BASE_URL=http://localhost:18888
export AGENTKERNEL_API_KEY=sk-...
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 agentkernel_sdk-0.4.0.tar.gz.
File metadata
- Download URL: agentkernel_sdk-0.4.0.tar.gz
- Upload date:
- Size: 7.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
59b86cc353bfaf9317b7be7b11469656dd8c01ffa209331d5efbc8ef825cb89d
|
|
| MD5 |
6ed0d1a104b09cc45d2f8eacdc53519b
|
|
| BLAKE2b-256 |
4b2de5da71fb1c32176f4bcd89af4d9e19bb20a48b284fe142e7a5c210ed0a9d
|
Provenance
The following attestation bundles were made for agentkernel_sdk-0.4.0.tar.gz:
Publisher:
sdk-publish.yml on thrashr888/agentkernel
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
agentkernel_sdk-0.4.0.tar.gz -
Subject digest:
59b86cc353bfaf9317b7be7b11469656dd8c01ffa209331d5efbc8ef825cb89d - Sigstore transparency entry: 873929918
- Sigstore integration time:
-
Permalink:
thrashr888/agentkernel@ed0b137ad00ea5996365ea713f2d2a5156dedb4a -
Branch / Tag:
refs/tags/v0.4.0 - Owner: https://github.com/thrashr888
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
sdk-publish.yml@ed0b137ad00ea5996365ea713f2d2a5156dedb4a -
Trigger Event:
push
-
Statement type:
File details
Details for the file agentkernel_sdk-0.4.0-py3-none-any.whl.
File metadata
- Download URL: agentkernel_sdk-0.4.0-py3-none-any.whl
- Upload date:
- Size: 9.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
69eadfe5f8ea61dfb9a30f7816eeca4a7f6cb8b96ae18aa334cebb0411269c24
|
|
| MD5 |
daf92e0819816666049c75d76fc084e7
|
|
| BLAKE2b-256 |
076d7edd3bc35d980c0642c350101729ce97f356108b63cf2ae1dc0a7f95e3ee
|
Provenance
The following attestation bundles were made for agentkernel_sdk-0.4.0-py3-none-any.whl:
Publisher:
sdk-publish.yml on thrashr888/agentkernel
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
agentkernel_sdk-0.4.0-py3-none-any.whl -
Subject digest:
69eadfe5f8ea61dfb9a30f7816eeca4a7f6cb8b96ae18aa334cebb0411269c24 - Sigstore transparency entry: 873929968
- Sigstore integration time:
-
Permalink:
thrashr888/agentkernel@ed0b137ad00ea5996365ea713f2d2a5156dedb4a -
Branch / Tag:
refs/tags/v0.4.0 - Owner: https://github.com/thrashr888
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
sdk-publish.yml@ed0b137ad00ea5996365ea713f2d2a5156dedb4a -
Trigger Event:
push
-
Statement type: