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
agentkernel_sdk-0.2.0.tar.gz
(7.1 kB
view details)
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.2.0.tar.gz.
File metadata
- Download URL: agentkernel_sdk-0.2.0.tar.gz
- Upload date:
- Size: 7.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4656dcf3ec37ba13ebfd4a9cf6b3166d08af433bf00674c07128f0d97c9fd47e
|
|
| MD5 |
d802a51977dfa821c4a85fb14b7e1183
|
|
| BLAKE2b-256 |
4f9e7ac19405a77df77fe5f21846eb14fa6c2708c904b0dbb916aefc6173f36a
|
File details
Details for the file agentkernel_sdk-0.2.0-py3-none-any.whl.
File metadata
- Download URL: agentkernel_sdk-0.2.0-py3-none-any.whl
- Upload date:
- Size: 8.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9a0eca0bcf7621168a31aad1bef1e8ef3a9d513994b3af5db7b96142a0cf94dc
|
|
| MD5 |
24729c9714e98e0579506a0c2e3f9551
|
|
| BLAKE2b-256 |
ee937b629e760487ea91bfa37fe7382c060f6e5e8f67fd0bbb2b6d671dbdbd0f
|