🧩 Framework & Thư viện•Mã nguồn mở•Đang hoạt động

Agent Kernel

Runtime triển khai AI agent lên production, hỗ trợ 4 framework (OpenAI, CrewAI, LangGraph, ADK), deploy multi-cloud AWS/Azure, session persistence sẵn.

#agent-kernel
Danh mục
🧩 Framework & Thư viện
Giá
Mã nguồn mở
GitHub Stars
⭐ 190
Ngôn ngữ
Python
License
Apache-2.0
Ngày thêm
2026-03-29
Tóm tắt từ README GitHub
The Operating System for Scalable & Compliant Enterprise AI Agents Run, orchestrate, and deploy production AI agents at scale — across frameworks and clouds — without lock-in, rewrites, or fragile glue code. 📖 Docs • 🚀 Quick Start • ✨ Features • ☁️ Deploy • 💬 Discord • 🛠 Developer Guide --- Why Agent Kernel? Most agent frameworks help you build a prototype . Agent Kernel is the platform layer that gets you to production — with the governance, portability, and operational maturity that enterprises actually require. Agent Kernel --- --- 🔌 Framework-Agnostic Run OpenAI Agents SDK, LangGraph, CrewAI, and Google ADK side by side. Swap with 2 import lines. ☁️ Cloud-Agnostic The same agent code ships to AWS Lambda/ECS, Azure Functions/Container Apps, GCP Cloud Run, or on-prem. 🔁 Queue-Pipeline Execution Every chat request runs through a queued pipeline: in-process by default (zero services, full retry/FIFO/dedup semantics locally), SQS, Kafka, and NATS JetStream transports for distributed deployments; a Helm chart ships the topology to any Kubernetes cluster. 🛡️ Compliant by Default Built-in guardrails (OpenAI, AWS Bedrock), PII detection, full audit traces, jai
Xem thêm từ README.md

Đánh giá chi tiết

Tổng quan

Agent Kernel là runtime giúp đưa AI agent từ code lên production mà không phải tự build hạ tầng. Yaala Labs phát triển, license Apache 2.0, thành viên Linux Foundation và AAIF. Viết bằng Python, hỗ trợ Python 3.12+.

Ý tưởng cốt lõi: tách biệt logic agent (viết bằng framework nào cũng được) khỏi phần triển khai (session, deploy, monitoring, messaging). Agent Kernel đóng vai trò adapter layer ở giữa.

Tính năng chính

  • Hỗ trợ 4 framework: OpenAI Agents SDK, CrewAI, LangGraph, Google ADK. Chuyển đổi framework chỉ cần đổi 2 dòng import. Có thể chạy agent từ nhiều framework cùng lúc trong một runtime.
  • Session persistence với 4 backend: in-memory (dev), Redis, DynamoDB (AWS), Cosmos DB (Azure). TTL mặc định 7 ngày, có LRU cache tùy chỉnh.
  • Deploy multi-cloud: AWS Lambda, ECS/Fargate, Azure Functions, Azure Container Apps. Dùng Terraform modules có sẵn trên registry (yaalalabs). Google Cloud đang phát triển.
  • Tích hợp messaging: Slack, WhatsApp, Facebook Messenger, Instagram, Telegram, Gmail. Teams đang phát triển.
  • Guardrails 3 provider: OpenAI (LLM-based), AWS Bedrock (30+ loại PII), Walled AI (PII masking/unmasking). Hỗ trợ cả input và output.
  • Observability qua Langfuse hoặc OpenLLMetry (Traceloop). Trace token usage, latency, tool invocations.
  • Hỗ trợ MCP (Model Context Protocol) và A2A (Agent-to-Agent) protocol. Agent tự động expose thành MCP tool hoặc A2A capability card.
  • Testing framework tích hợp pytest: 3 chế độ so sánh (fuzzy bằng RapidFuzz, judge bằng LLM/Ragas, fallback kết hợp cả hai).
  • Execution hooks (PreHook/PostHook) cho RAG injection, auth, moderation, analytics.

Hướng dẫn bắt đầu

Cài đặt:

pip install agentkernel[openai]   # hoặc [crewai], [langgraph], [adk]

Ví dụ tối giản với CrewAI:

from crewai import Agent as CrewAgent
from agentkernel.cli import CLI
from agentkernel.crewai import CrewAIModule

agent = CrewAgent(
    role="general",
    goal="Trả lời câu hỏi chung",
    backstory="Trợ lý AI đa năng.",
    verbose=False,
)

CrewAIModule([agent])

if __name__ == "__main__":
    CLI.main()  # chạy interactive CLI

Chạy REST API thay vì CLI:

from agentkernel.api import RESTAPI
RESTAPI.run()  # mặc định port 8000

Deploy lên AWS Lambda:

from agentkernel.aws import Lambda
handler = Lambda.handler  # export handler cho Lambda

Config qua biến môi trường hoặc file config.yaml. Ví dụ bật Redis session + MCP:

AK_SESSION__TYPE=redis
AK_SESSION__REDIS__URL=redis://localhost:6379
AK_MCP__ENABLED=true

Stack kỹ thuật

Python 3.12+. Dependency theo từng extra: openai-agents, crewai, langgraph, google-adk. Terraform modules cho cloud deploy. Config qua env vars hoặc YAML.

Điểm mạnh

  • Framework-agnostic thật sự: mix agent từ nhiều framework trong cùng deployment. Không lock-in.
  • Từ prototype đến production nhanh: session management, deploy config, messaging integrations đều có sẵn, không phải tự build.
  • Multi-cloud: cùng code chạy được trên cả AWS và Azure. Terraform modules publish trên registry.
  • Thin adapter layer: overhead nhỏ, không phải abstraction nặng. Giữ nguyên native API của từng framework.

Hạn chế

  • Cộng đồng còn nhỏ: 25 stars, 10 forks trên GitHub (tính đến 03/2026). Docs khá đầy đủ nhưng ít ví dụ thực tế ngoài quickstart.
  • Một số tính năng đang "Coming Soon": streaming response, Google Cloud deploy, long-term memory, Teams integration, retry logic.
  • Hooks chỉ chạy cho prompt đầu từ user. Handoff giữa các agent chưa trigger hook.
  • Phiên bản hiện tại 0.2.14, chưa đạt 1.0. API có thể thay đổi giữa các bản.

Phù hợp khi nào

Khi bạn đã chọn được framework cho agent (OpenAI, CrewAI, LangGraph, hoặc ADK) và cần đưa lên production nhanh với session management, cloud deploy, messaging integration mà không muốn tự build hạ tầng. Đặc biệt hữu ích nếu muốn giữ khả năng đổi framework hoặc cloud provider sau này.

Agent Kernel | Atlas for AI