luoguoxiong/aipack

aipack 是一个 TypeScript AI Agent 开发框架,自研运行时核心,集成记忆、压缩、可观测性等能力,开箱即用支持 13+ 主流大模型,并提供 CLI、桌面应用和示例应用。

What it solves

aipack is a lightweight personal AI assistant framework designed to simplify the creation of AI agents. It provides a comprehensive set of tools for managing session persistence, long-term memory, and context window management to prevent token explosion in long conversations.

How it works

The project uses a three-part architecture consisting of a Runtime, Extension, and Transformer:

  • Runtime: The core scheduler that manages the flow from request to task graph, context transformation, model call, and tool execution.
  • Extension: A plugin system using Tapable hooks to allow developers to inject logic into the agent's lifecycle.
  • Transformer: A chain of context transformers that handle tasks like tool output clipping and snapshotting.

It supports over 13 model providers (including OpenAI, DeepSeek, and Anthropic) and offers both synchronous and streaming responses.

Who it’s for

Developers who want to build custom AI agents with built-in support for memory, observability, and multi-platform delivery (CLI, Desktop via Tauri, and Web).

Highlights

  • Hybrid Memory System: Combines BM25 keyword search and vector retrieval for cross-session long-term memory.
  • Five-Level Context Compression: Implements a tiered strategy (from tool output clipping to session handovers) to manage token usage.
  • Full-Stack Observability: Includes a dedicated SDK and server with a Dashboard to track token usage, latency, and tool success rates.
  • Multi-Model Support: Out-of-the-box integration with a wide array of LLM providers.
  • Ready-to-use CLI: A terminal-based AI programming assistant with built-in file and bash tools.

Related

  • Project
  • Project
  • Project
  • Project
  • Project