KAIROS-ARK
Overview
KAIROS-ARK is a high-performance, deterministic execution kernel designed for mission-critical agentic AI workflows. Unlike traditional frameworks that prioritize prompt engineering, KAIROS-ARK prioritizes system integrity, reproducibility, and industrial-grade governance.
It provides a specialized "Operating System" for agents, handling:
- Scheduling: Deterministic, multi-threaded task execution.
- Memory: Zero-copy shared memory for large datasets.
- Security: Kernel-level policy enforcement and sandboxing.
- Time: Logical clocks for bit-for-bit identical replay debugging.
- Governance: Human-in-the-Loop (HITL) approvals and cryptographic audit logs.
Key Features
| Feature | Description |
|---|---|
| ⚡ High Throughput | Process 720,000+ nodes/second with Rust-native execution. |
| 🔒 Policy Engine | Restrict agent capabilities (Network, FS, Exec) at the kernel level. |
| ⏱️ Time-Travel | Replay any execution from a ledger with 100% determinism. |
| 🚀 Zero-Copy | Pass GB-sized payloads between tasks in microseconds. |
| 🤝 Interoperability | Native adapters for LangGraph, CrewAI, and MCP tools. |
| 🛡️ Governance | Cryptographically signed audit logs and enforced HITL protocols. |
Installation
pip install kairos-ark
Or build from source for maximum performance:
git clone https://github.com/YASSERRMD/KAIROS-ARK.git
cd KAIROS-ARK
pip install maturin
maturin develop
Quick Start
1. Hello World Agent
from kairos_ark import Agent
# Create a deterministic agent
agent = Agent(seed=42)
# Add tasks (nodes)
agent.add_node("fetch", lambda: {"data": "raw data"})
agent.add_node("process", lambda: {"status": "processed"})
# Connect workflow
agent.connect("fetch", "process")
# Execute
results = agent.execute("fetch")
print(f"Executed {len(results)} nodes")
2. Parallel Execution
KAIROS-ARK uses a Rayon-backed thread pool for true parallelism:
# Fork execution into parallel branches
agent.add_fork("start_parallel", ["scrape_web", "query_db", "check_cache"])
# Join results
agent.add_join("sync_results", ["scrape_web", "query_db", "check_cache"])
agent.execute("start_parallel")
Core Capabilities
🛡️ Security & Policy Engine
Prevent "excessive agency" by sandboxing tools at the kernel level.
from kairos_ark import Agent, Policy, Cap
# Define a restrictive policy
policy = Policy(
allowed_capabilities=[Cap.LLM_CALL], # Only allow LLM calls
max_tool_calls={"web_search": 5}, # Rate limit specific tools
forbidden_content=["password", "api_key"] # Automatic redaction
)
# Run agent with policy
agent.run("start", policy=policy)
💾 Persistence & Time-Travel Debugging
Debug "Heisenbugs" by replaying execution logs exactly as they happened.
# 1. Save execution ledger
agent.save_ledger("run_001.jsonl")
# 2. Replay later (reconstructs state without re-running side effects)
state = agent.replay("run_001.jsonl")
print(f"Final State: {state['node_outputs']}")
# 3. Create Snapshots for fast recovery
agent.create_snapshot("checkpoint.json", "run_001")
🚀 Zero-Copy Shared Memory
Pass large objects (images, embeddings, codebases) between Python/Rust without serialization overhead.
# Write 1GB data once (~5µs latency)
handle = agent.kernel.write_shared(large_data_list)
# Pass unique handle to other nodes
result = agent.kernel.read_shared(handle)
🤝 Interoperability & Ecosystem
KAIROS-ARK acts as a native backend for other frameworks, with built-in adapters.
# 1. LangGraph Adapter (Native Checkpointer)
from kairos_ark.integrations.langgraph import ArkNativeCheckpointer
checkpointer = ArkNativeCheckpointer(agent)
# 2. Universal Connectors
from kairos_ark.connectors import (
ArkGeminiConnector,
ArkOpenAIConnector,
ArkClaudeConnector,
ArkOllamaConnector,
ArkCohereConnector
)
# Gemini (Google)
llm = ArkGeminiConnector(model_name="gemini-2.0-flash-lite")
# Cohere (Enterprise)
cohere = ArkCohereConnector(model="command-r-plus")
# OpenAI / Groq / DeepSeek
groq = ArkOpenAIConnector(
base_url="https://api.groq.com/openai/v1",
api_key="gsk_...",
model="llama3-70b-8192"
)
# Local (Ollama)
local_llm = ArkOllamaConnector(model="llama3")
# 3. Native Tools (Zero-Copy Ready)
from kairos_ark.tools import ArkTools
results = ArkTools.tavily_search("KAIROS-ARK Architecture")
Kernel-Level Support
# State Store (~4µs access)
agent.kernel.state_set("messages", json.dumps(history))
# MCP Tool Registry
agent.kernel.mcp_register_tool("search", "Search tool")
⚖️ Governance & HITL
Industrial-grade compliance features built-in.
# 1. Human-in-the-Loop (HITL) Interrupts
req_id = agent.kernel.request_approval("run_1", "deploy", "Deploy to prod?")
# Execution suspends until approved
agent.kernel.approve(req_id, "admin_user")
# 2. Cryptographic Verification
ledger = agent.get_audit_log_json()
signed = agent.kernel.sign_ledger(ledger, "run_1")
is_valid = agent.kernel.verify_ledger(signed)
Documentation
- Getting Started Guide: Build your first agent in 5 minutes.
- The Scheduler: Deep dive into logical clocks and determinism.
- Policy Engine: Configuring capabilities and sandboxes.
- Zero-Copy Memory: Optimizing for large-scale data.
- Time-Travel Debugging: Mastering the Replay Engine.
Benchmarks
KAIROS-ARK is built for speed.
| Category | Metric | Performance | Verdict |
|---|---|---|---|
| Core | Kernel Overhead | 8.37 µs / node | 🚀 10x Faster than Frameworks |
| Core | Tool Chaining | 0.45 ms (Total) | ⚡ Instant |
| Core | Determinism | Byte-for-Byte Match | ✅ Exact Replay |
| Core | Parallelism | 206ms (4x 200ms) | 🧵 True Parallel Fan-out |
| Throughput | Node Throughput | 720,000+ nodes/sec | High Frequency |
| Latency | Task Dispatch | ~1.4 µs | Real-time |
| Latency | Policy Check | ~3.0 µs | Zero-Cost Security |
| Latency | State Store | ~4.0 µs | Fast IPC |
License
MIT License - see LICENSE for details.
Author
YASSERRMD
Metadata
Release files for kairos-ark 0.1.8
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| kairos_ark-0.1.8.tar.gz | 1.3 MB | Details |
Built distributions (wheels)
Total release size: 5.4 MB
Release files / kairos_ark-0.1.8.tar.gz
| Download URL | kairos_ark-0.1.8.tar.gz |
|---|---|
| Size | 1.3 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
9ae10814d11e629f0d753f2b299dbbdf637b8a392ad2d69504ee94dd30aac439
|
|
BLAKE2b-256 checksum How to use checksums |
d98d8f0b2ae8a7f3228bd6c3bff63bbfe9523b4e256cb3c93a6ef2a30838449c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.3
|
Release files / kairos_ark-0.1.8-pp311-pypy311_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | kairos_ark-0.1.8-pp311-pypy311_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
|---|---|
| Size | 590.9 kB |
| Tags | Linux glibc 2.17+ x86-64 PyPy 3.11 PyPy 3.11 7.3 |
|
SHA-256 checksum How to use checksums |
1cc1d11357b39713f16841d810f998bf98b598f8f7641a3c440a757df7b6aabd
|
|
BLAKE2b-256 checksum How to use checksums |
9df42eadc91b43cab88888394528c8ada9465adc764fe3a9c6a659b2555d3fb6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.3
|
Release files / kairos_ark-0.1.8-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | kairos_ark-0.1.8-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
|---|---|
| Size | 589.4 kB |
| Tags | CPython 3.13 Linux glibc 2.17+ x86-64 |
|
SHA-256 checksum How to use checksums |
c1d4120fc72de5120f596eec083d3c5e642383c5b19ae463d48aaa169c2f9db9
|
|
BLAKE2b-256 checksum How to use checksums |
506e9e633c0e059e79f1974dcc824959125045a0cd321070e46d214af5aaefd5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.3
|
Release files / kairos_ark-0.1.8-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | kairos_ark-0.1.8-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
|---|---|
| Size | 589.5 kB |
| Tags | CPython 3.12 Linux glibc 2.17+ x86-64 |
|
SHA-256 checksum How to use checksums |
add9678fd11d61e04498df2391345461d8289fede3d4d200685c591d9ae99c47
|
|
BLAKE2b-256 checksum How to use checksums |
7504be82153a8d335b97aa5cfbae84ac2c96d0abc8b11f0049f66f7290873c0d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.3
|
Release files / kairos_ark-0.1.8-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | kairos_ark-0.1.8-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
|---|---|
| Size | 591.9 kB |
| Tags | CPython 3.11 Linux glibc 2.17+ x86-64 |
|
SHA-256 checksum How to use checksums |
5a1dc499d33c1f34c9ee8c05f329814ec6babf8cd83fb9593e93684ba006602d
|
|
BLAKE2b-256 checksum How to use checksums |
3f3a9c4bb86c5ee231d52551af2865043d8fd962ab78017562358151246b077d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.3
|
Release files / kairos_ark-0.1.8-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | kairos_ark-0.1.8-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
|---|---|
| Size | 595.6 kB |
| Tags | CPython 3.10 Linux glibc 2.17+ x86-64 |
|
SHA-256 checksum How to use checksums |
1599a6803fcfec1b74c084ebf1ffa0162a72c890df96f5f6f47ab5ac8d8140cb
|
|
BLAKE2b-256 checksum How to use checksums |
c654e1aecf9d50afefbea96453415cec5285cccf2bcdb3d398156fe884c38bf7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.3
|
Release files / kairos_ark-0.1.8-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | kairos_ark-0.1.8-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
|---|---|
| Size | 595.6 kB |
| Tags | CPython 3.9 Linux glibc 2.17+ x86-64 |
|
SHA-256 checksum How to use checksums |
1c235d3cf48c75a75018f646cf002d983b7302a20e968daf8f09dbc5afc3393f
|
|
BLAKE2b-256 checksum How to use checksums |
d29ee5a039cda33fde2ecb8f97e4bb1e81dec584511dd8fd02c131537418fde7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.3
|
Release files / kairos_ark-0.1.8-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | kairos_ark-0.1.8-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
|---|---|
| Size | 594.9 kB |
| Tags | CPython 3.8 Linux glibc 2.17+ x86-64 |
|
SHA-256 checksum How to use checksums |
a508dcc5a23d6f14a58abe30e2ad2b4322e51b07aab8b6ccd7f79e504f2f1fb3
|
|
BLAKE2b-256 checksum How to use checksums |
0df84d4a26b850f6b326def50a3f5a6a1f570a771a558cdc377f7f515b89cfa6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.3
|