Python SDK for the komputer.ai platform
Project description
komputer-ai Python SDK
Python client for the komputer.ai platform.
Installation
pip install komputer-ai-sdk
Or install directly from the repository:
pip install git+https://github.com/komputer-ai/komputer-ai.git#subdirectory=komputer-sdk/python
Quick Start
from komputer_ai.client import KomputerClient
client = KomputerClient("http://localhost:8080")
# Create an agent
agent = client.create_agent(
name="my-agent",
instructions="Summarize the latest Kubernetes release notes",
model="claude-sonnet-4-6",
)
# Stream events as the agent works
for event in client.watch_agent("my-agent"):
if event.type == "text":
print(event.payload.content)
elif event.type == "task_completed":
print(f"Done — cost: ${event.payload.cost_usd}")
break
Usage
Agents
# Create
client.create_agent(name="researcher", instructions="Research AI trends", model="claude-sonnet-4-6")
# List
agents = client.list_agents()
# Get
agent = client.get_agent("researcher")
# Update
client.patch_agent("researcher", model="claude-haiku-4-5-20251001", lifecycle="Sleep")
# Send a follow-up task to an idle agent
client.create_agent(name="researcher", instructions="Now focus on LLM benchmarks")
# Cancel a running task
client.cancel_agent_task("researcher")
# Delete
client.delete_agent("researcher")
Memories
client.create_memory(name="company-context", content="We are a B2B SaaS company.", description="Background info")
client.patch_agent("my-agent", memories=["company-context"])
memories = client.list_memories()
client.patch_memory("company-context", content="Updated context.")
client.delete_memory("company-context")
Skills
client.create_skill(name="healthcheck", description="Check service health", content="curl -s http://api/healthz")
client.patch_agent("my-agent", skills=["healthcheck"])
skills = client.list_skills()
client.delete_skill("healthcheck")
Schedules
client.create_schedule(
name="daily-report",
schedule="0 9 * * *",
instructions="Generate a daily status report",
timezone="America/New_York",
)
schedules = client.list_schedules()
client.patch_schedule("daily-report", schedule="0 10 * * *")
client.delete_schedule("daily-report")
Secrets
client.create_secret(name="api-keys", data={"GITHUB_TOKEN": "ghp_xxx", "SLACK_TOKEN": "xoxb-xxx"})
client.patch_agent("my-agent", secret_refs=["api-keys"])
secrets = client.list_secrets()
client.update_secret("api-keys", data={"GITHUB_TOKEN": "ghp_new"})
client.delete_secret("api-keys")
Connectors
client.create_connector(name="slack", service="slack", url="https://mcp.slack.com", auth_type="token")
client.patch_agent("my-agent", connectors=["slack"])
connectors = client.list_connectors()
client.delete_connector("slack")
Offices
offices = client.list_offices()
office = client.get_office("my-office")
Streaming Events
for event in client.watch_agent("my-agent"):
match event.type:
case "task_started":
print("Agent started working...")
case "text":
print(event.payload.content)
case "tool_call":
print(f"Using tool: {event.payload.tool}")
case "task_completed":
print(f"Done — cost: ${event.payload.cost_usd}")
break
case "error":
print(f"Error: {event.payload.error}")
break
Event types: task_started, thinking, tool_use, tool_result, text, task_completed, task_cancelled, error.
Context Manager
with KomputerClient("http://localhost:8080") as client:
agents = client.list_agents()
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 komputer_ai_sdk-0.11.6.tar.gz.
File metadata
- Download URL: komputer_ai_sdk-0.11.6.tar.gz
- Upload date:
- Size: 136.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5d0acfe858d9ec7b5aa2cdb06e7168bfd3fab982ef2d5c53aa51e9d97a146e4e
|
|
| MD5 |
53be10886a9044a063f630422f653df8
|
|
| BLAKE2b-256 |
1f05b7fc3177cf5cdb83231370da6de2b597e18acca74efb39cdc0c57987c865
|
Provenance
The following attestation bundles were made for komputer_ai_sdk-0.11.6.tar.gz:
Publisher:
build.yaml on komputer-ai/komputer-ai
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
komputer_ai_sdk-0.11.6.tar.gz -
Subject digest:
5d0acfe858d9ec7b5aa2cdb06e7168bfd3fab982ef2d5c53aa51e9d97a146e4e - Sigstore transparency entry: 1358957344
- Sigstore integration time:
-
Permalink:
komputer-ai/komputer-ai@bb1053634c2702e8627c2129848ab9e37fb51fbe -
Branch / Tag:
refs/tags/v0.11.6 - Owner: https://github.com/komputer-ai
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
build.yaml@bb1053634c2702e8627c2129848ab9e37fb51fbe -
Trigger Event:
push
-
Statement type:
File details
Details for the file komputer_ai_sdk-0.11.6-py3-none-any.whl.
File metadata
- Download URL: komputer_ai_sdk-0.11.6-py3-none-any.whl
- Upload date:
- Size: 339.5 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 |
6d9c925c5da6cd5f54bd9649af775a2a96461fa9f6b880142ded08a2f64aab61
|
|
| MD5 |
1e0cb38c32b6a0809890fcc25dc122bf
|
|
| BLAKE2b-256 |
5c78453195e37cac17e55bf25d13f5d2761688865d1487b721a3327291d37159
|
Provenance
The following attestation bundles were made for komputer_ai_sdk-0.11.6-py3-none-any.whl:
Publisher:
build.yaml on komputer-ai/komputer-ai
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
komputer_ai_sdk-0.11.6-py3-none-any.whl -
Subject digest:
6d9c925c5da6cd5f54bd9649af775a2a96461fa9f6b880142ded08a2f64aab61 - Sigstore transparency entry: 1358957351
- Sigstore integration time:
-
Permalink:
komputer-ai/komputer-ai@bb1053634c2702e8627c2129848ab9e37fb51fbe -
Branch / Tag:
refs/tags/v0.11.6 - Owner: https://github.com/komputer-ai
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
build.yaml@bb1053634c2702e8627c2129848ab9e37fb51fbe -
Trigger Event:
push
-
Statement type: