Introduction to Agent Kernel
The Operating System for Scalable & Compliant Enterprise AI Agents.
๐ฆ Sandbox - Let agents execute code and shell commands in an isolated, permission-bounded environment, with pluggable providers, workload profiles, and per-user identity. Learn more โ
๐งต Conversation Threads - Persistent, named conversation threads with auto-naming and REST APIs for listing threads and reading history. Learn more โ
๐ง Knowledge Base Support - Backend-agnostic knowledge base interface with support for ChromaDB (vector), Neo4j (graph) and Starburst Galaxy (SQL/analytics). Learn more โ
What is Agent Kernel?โ
Agent Kernel is an open-source runtime that lets you build, test and deploy AI agents to production in days instead of months. It works with any major AI framework (OpenAI Agents SDK, LangGraph, CrewAI, Google ADK, Smolagents) and can run agents from multiple frameworks together in a single runtime. It deploys to AWS, Azure, GCP, or your own servers with zero platform code, and scales from a single REST container to queue-backed, token-streaming production topologies. Built-in integrations for Slack, WhatsApp and more mean your agents can reach users instantly.
Think of it like Express.js for web servers, or Spring Boot for Java microservices, but for AI agents. It gives you the scaffolding, execution environment, session management and deployment infrastructure so you can focus on writing the logic that matters.
Supported Python Versions: 3.12 - 3.13.x Supported Cloud Platforms: AWS, Azure, GCP
It's not:
- A substitute for popular agent frameworks and SDKs like LangGraph, OpenAI Agents, CrewAI, or Google ADK
- Another heavy abstraction that you have to learn
It's a lightweight, thin adapter that wraps your existing agents and instantly provides everything else: testing, deployment, integrations, session management, observability.
Why Agent Kernel?โ
Effortless Migrationโ
Build agents using any AI agentic framework and migrate them to Agent Kernel to benefit from its execution framework capabilities. No need to build a platform code from scratch to run your agents. You can focus on domain-specific Agent development and Agent Kernel takes care of testing, deployment and execution.
Ready-to-Use Executionโ
Agent Kernel provides pre-built execution capabilities:
- CLI Testing Environment for local development
- REST API Server for web integration
- Built-in popular integrations for pluggable integrations and ability to build custom integrations quickly
- Slack
- Messenger
- Telegram
- Gmail
- Microsoft Teams
- Multi-Cloud Serverless Deployment for scalable production
- AWS Lambda
- Azure Functions
- GCP Cloud Run (scale-to-zero)
- Multi-Cloud Containerized Deployment for consistent loads
- AWS ECS/Fargate
- Azure Container Apps
- GCP Cloud Run (always-on)
- Scalable Queue Mode (AWS): SQS-backed decoupling of request handling and agent execution, with retries, DLQs, and backlog-based auto-scaling on Lambda and ECS
- Token Streaming: SSE streaming on the REST API, and WebSocket token streaming on AWS serverless
- WebSocket Delivery (AWS): real-time push of full responses (
asyncmode) or per-token chunks (streammode) - MCP Server for Model Context Protocol tool publishing
- A2A Server for Agent-to-Agent communication
Multi-Cloud Architectureโ
Deploy the same agent code to AWS, Azure, or GCP without modification. Agent Kernel provides:
- Cloud-agnostic agent development
- Provider-specific optimizations
- Consistent APIs across clouds
- No vendor lock-in
Pluggable Architectureโ
Easily extend Agent Kernel with custom framework adapters, memory back-ends, and deployment profiles.
Enterprise-Ready Featuresโ
-
Knowledge Bases: Backend-agnostic durable knowledge storage across sessions
- ChromaDB for semantic/vector search
- Neo4j for entity and relationship graph queries
- Starburst Galaxy for SQL analytics over MongoDB, Google Sheets, PostgreSQL, and more
KnowledgeBuildercomposes multiple backends with framework-agnostic toolssemantic_mapkeeps agent prompts portable across deployments- You can also build your own backend by implementing a
KnowledgeBaseadapter and registering it withKnowledgeBuilderLearn more about knowledge bases โ
-
Session Management: Built-in conversational state tracking across multiple backends
-
Memory Management: Pluggable memory with smart caching
- In-memory (development)
- Redis / Valkey (all clouds)
- DynamoDB (AWS)
- Cosmos DB (Azure)
- Firestore (GCP)
- Volatile Cache: Request-scoped temporary storage for RAG context, file content, and intermediate data
- Non-Volatile Cache: Session-persistent storage for user preferences, metadata, and configurations
Learn more about session management โ | Advanced memory features โ
-
Execution Hooks: Powerful pre and post-execution hooks for ultimate control
- Pre-execution hooks: Guardrails, RAG context injection, input validation, authentication
- Post-execution hooks: Response moderation, disclaimers, output filtering, analytics
- Hook chaining: Compose multiple hooks in sequence for complex behaviors
- Early termination: Pre-hooks can halt execution and return custom responses
-
Fault Tolerance: Production-grade resilience
- Multi-AZ deployments for high availability
- Automatic failure recovery and retry mechanisms (SQS visibility-timeout retries and DLQs in queue mode)
- Health monitoring and auto-scaling (backlog-based auto-scaling in AWS queue mode)
- Persistent state across failures
-
Traceability: Track and audit all agent operations
- LangFuse
- OpenLLMetry
-
Multi-Agent Collaboration: Leverage multi-agent hierarchies of supported agentic frameworks
-
Multimodal Attachments: Image and file support with pluggable attachment storage and on-demand vision analysis
-
Sandbox: Execute agent-generated code and shell commands in an isolated, permission-bounded environment, with pluggable providers (
local_subprocess,docker), workload profiles, policy enforcement, and per-user identity. Learn more โ -
Conversation Threads: Persistent, named threads with auto-naming and REST read APIs
-
Structured Output: Typed/JSON agent replies (
AgentReplyAny) across OpenAI, LangGraph, ADK, CrewAI, and Smolagents -
Agent Testing Capability: Built in Agent test framework so that you can write automated tests easily
-
Governance: Input/output guardrails with OpenAI Guardrails, AWS Bedrock Guardrails, and Walled AI (including PII redaction)
Key Featuresโ
Unified APIโ
from agentkernel.core import Agent, Runner, Session, Module, Runtime
All framework adapters expose the same core abstractions:
- Agent: Framework-specific agent wrapped by Agent Kernel
- Runner: Framework-specific execution strategy
- Session: Shared conversational state
- Module: Container for registering agents
- Runtime: Global orchestrator
Execution Hooksโ
Powerful pre-execution and post-execution hooks give you surgical control over agent behavior:
- Pre-hooks: Intercept prompts before agents see them
- ๐ก๏ธ Guardrails and content filtering
- ๐ง RAG context injection from knowledge bases
- ๐ Input validation and authentication
- ๐ Request logging and analytics
- Post-hooks: Transform responses after generation
- โ๏ธ Add disclaimers and compliance messages
- ๐ Output moderation and filtering
- ๐ Response analytics and monitoring
Works with any framework - same hook code across OpenAI, CrewAI, LangGraph, and ADK.
Learn more in our blog post โ
Smart Memory Managementโ
Two types of cache with identical APIs but different lifecycles:
- Volatile Cache: Request-scoped temporary storage
- Perfect for RAG context, file content, intermediate calculations
- Auto-clears after request completion
- Keeps prompts clean and reduces token usage
- Non-Volatile Cache: Session-persistent storage
- Store user preferences, metadata, configurations
- Persists across multiple requests
- Share data between hooks and tools
Multiple backends with multi-cloud support - swap between in-memory (local), Redis/Valkey, DynamoDB (AWS), Cosmos DB (Azure), or Firestore (GCP) with just environment variables.
Read the advanced memory guide โ
Multi-Framework Supportโ
Agent Kernel currently supports:
- OpenAI Agents SDK - Official OpenAI agents framework
- CrewAI - Role-based multi-agent framework
- LangGraph - Graph-based agent orchestration
- Google ADK - Google's Agent Development Kit
- Smolagents - Hugging Face's lightweight agentic framework
Coming soon:
- LiveKit Agents - Real-time audio/video agent framework for voice-enabled AI applications
Flexible Deploymentโ
Quick Exampleโ
Here's a simple agent built with Agent Kernel using CrewAI:
from crewai import Agent as CrewAgent
from agentkernel.cli import CLI
from agentkernel.crewai import CrewAIModule
# Define your agent
agent = CrewAgent(
role="assistant",
goal="Help users with their questions",
backstory="You are a helpful AI assistant",
verbose=False,
)
# Register with Agent Kernel
CrewAIModule([agent])
# Run with built-in CLI
if __name__ == "__main__":
CLI.main()
You can:
- Test locally with the CLI
- Deploy to AWS Lambda, Azure Functions, or GCP Cloud Run with one line-change (multi-cloud!)
- Deploy to AWS ECS/Fargate, Azure Container Apps, or GCP Cloud Run (always-on) for containerized workloads
- Expose as a REST API, with SSE token streaming via
execution.mode: stream - Scale out with SQS-backed queue mode and WebSocket delivery on AWS
- Integrate with MCP or A2A protocols
All without changing your agent code!
Who Should Use Agent Kernel?โ
Agent Kernel is built for four types of teams:
Software Companies (Services)โ
Development houses and IT services firms with clients asking for AI-powered solutions. Agent Kernel lets them stand up AI agent capabilities quickly without a 6-month R&D cycle, focusing developer time on client-specific agent logic, not infrastructure.
Software Companies (Products)โ
SaaS and enterprise software companies wanting to embed AI agents into their products. Agent Kernel's framework-agnostic design eliminates lock-in: add intelligent agents today, switch frameworks tomorrow, and your platform code never changes.
AI Startupsโ
Early to growth-stage startups building AI-native products. With open-source, no licensing costs, and full deployment infrastructure (Terraform, Docker) out of the box, startups go from prototype to production in days, not quarters.
Domain Expertsโ
Subject matter experts in finance, healthcare, legal, education, or other fields who want to build AI products without a fulltime engineering team. Agent Kernel dramatically reduces the software engineering surface area: define your agent logic, and Agent Kernel handles the rest.
Next Stepsโ
Ready to get started? Here's what to do next:
- Install Agent Kernel - Get up and running in minutes
- Quick Start Guide - Build your first agent
- Core Concepts - Understand the architecture
- Execution Hooks - Add guardrails, RAG, and response control
- Session Management - Session configuration and storage
- Memory Management - Advanced caching and persistence
- Framework Integration - Choose your framework
- Deployment Guide - Deploy to production
Community & Supportโ
- GitHub: yaalalabs/agent-kernel
- PyPI: agentkernel
- Issues: Report bugs or request features
- Discord: Community chat
Licenseโ
Agent Kernel is released under the Apache License 2.0. See the LICENSE file for details.
Built with โค๏ธ by Yaala Labs
