Python SDK for the AIOS AI Kernel — the operating system layer for AI agents
Project description
aios-kernel-sdk
Python SDK for the AIOS AI Kernel — the operating system layer for AI agents.
Installation
pip install aios-kernel-sdk
# With LangGraph adapter:
pip install "aios-kernel-sdk[langgraph]"
Quickstart
import asyncio
from aios_sdk import AIKernel, LLMQuery
async def main():
async with AIKernel("http://localhost:8000", "my-agent") as kernel:
response = await kernel.llm(LLMQuery(
model="anthropic/claude-haiku-4-5-20251001",
messages=[{"role": "user", "content": "Summarise the Q4 report"}],
))
print(response["content"])
asyncio.run(main())
Start the kernel first:
git clone https://github.com/stagsz/aios && cd aios
docker compose up -d
Features
- Async-first client with graceful fallback to litellm on kernel unavailability
- Typed Pydantic v2 query models
- LangGraph checkpointer adapter (M3 stub — full implementation post-M1)
- OpenAI-compatible adapter stub
- Prompt-injection sanitization on all tool output (M6)
Error handling
from aios_sdk import KernelError
try:
response = await kernel.llm(query)
except KernelError as e:
print(f"Kernel error {e.status_code}: {e.detail}")
When the kernel is unreachable and fallback_to_litellm=True (default), the SDK calls litellm directly — no code change required.
Links
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 aios_kernel_sdk-0.1.0.tar.gz.
File metadata
- Download URL: aios_kernel_sdk-0.1.0.tar.gz
- Upload date:
- Size: 6.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
323026d4c217228400fcecb6eff7dc78072b515803ccccb873ead2b9a514cf13
|
|
| MD5 |
2d9edafa9870695a271ead92f2184179
|
|
| BLAKE2b-256 |
5a7aab4507de49fd88dc309df22876a48ac5863a9e42cbbb5ceeb76b08f6ad14
|
File details
Details for the file aios_kernel_sdk-0.1.0-py3-none-any.whl.
File metadata
- Download URL: aios_kernel_sdk-0.1.0-py3-none-any.whl
- Upload date:
- Size: 7.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c1f17182bb1e7ae35c1b330a5011e486b7e78a34f70be679155b73f5fd41b345
|
|
| MD5 |
f48efcf9a5cc77ab4e5b405e74179cd0
|
|
| BLAKE2b-256 |
76b7700dad07b03e7a7e94b09fcf795b563110996f71e2f34cb3aca48b743f40
|