luoguoxiong/aipack
aipack 是一个 TypeScript AI Agent 开发框架,自研运行时核心,集成记忆、压缩、可观测性等能力,开箱即用支持 13+ 主流大模型,并提供 CLI、桌面应用和示例应用。
What it solves
aipack is a lightweight, extensible TypeScript framework designed to simplify the creation of AI Agents. It provides a structured runtime and a pluggable ecosystem to handle the complexities of agent orchestration, session persistence, tool execution, and context management without relying on external agent frameworks.
How it works
The framework uses a three-part architecture consisting of a Runtime, Extensions, and Transformers:
- Runtime: The core scheduler that manages the flow from request to task graph, context transformation, model calls, and tool execution.
- Extensions: A plugin system using Tapable hooks to allow developers to inject logic into the agent's lifecycle (e.g.,
beforeRun,done,failed). - Transformers: A chain of sequential context modifiers used for tasks like tool output clipping, message summarization, and session snapshots.
It supports over 13 model providers (including OpenAI, DeepSeek, and Anthropic) and integrates with the Model Context Protocol (MCP) both as a client to use external tools and as a server to expose its own tools.
Who it’s for
TypeScript developers who want to build AI agents with full type safety, minimal "magic," and a modular approach to adding capabilities like long-term memory, context compression, and multi-agent orchestration.
Highlights
- Pluggable Ecosystem: Dedicated packages for long-term memory (BM25 + vector search), multi-level context compression, and observability.
- MCP Integration: Bi-directional support for the Model Context Protocol, allowing seamless tool sharing between aipack and other MCP servers.
- Permission System: A framework-level
PermissionPolicywith four decision levels (allow, deny, confirm, pending) to ensure tool execution is governed by a strict approval process. - Multi-Agent Orchestration: Built-in patterns for Pipeline, Router, Supervisor, Debate, and MapReduce workflows via
AgentGraph. - Integrated Eval: A complete evaluation system (
aipack-eval) with mock playback and baseline regression testing to measure agent performance without consuming API keys.
Related
- Project
- Project
- Project
- Project
- Project