Aki

Aki

Aki is a local stdio MCP server that gives AI coding assistants durable project memory, allowing them to remember decisions, search prior notes, and save context across sessions.

Category
访问服务器

README

Aki

Portable project memory for AI coding agents — powered by Qwen, delivered through MCP.

Python Tests License

Aki is an AI agent that gives coding assistants durable project memory. It runs locally as a stdio MCP server so hosts such as OpenCode, Claude Code, and other MCP-compatible agents can retrieve project context before editing code and save new decisions after useful work.

What is Aki?

Aki is a hackathon MVP for portable memory across AI coding sessions. Instead of forcing every agent session to rediscover repository conventions, architecture choices, and setup procedures, Aki stores those memories locally and exposes them through MCP tools.

Use Aki when you want an AI coding agent to:

  • remember project decisions across sessions;
  • search prior implementation notes before changing code;
  • keep procedural setup knowledge close to the repository;
  • extract structured memories from architecture prose with Qwen;
  • keep working locally when Qwen credentials are unavailable.

Features

  • Local stdio MCP server: primary runtime is uv run aki mcp.
  • Five MCP memory tools: memory_context, memory_search, memory_save, memory_extract, and memory_explain.
  • Qwen extraction: turns prose into structured memory candidates when Qwen Cloud credentials are configured.
  • Deterministic fallback: manual save/search/context and keyword explanations remain available without Qwen credentials.
  • Episodic, semantic, and procedural memory: stores recent events, durable facts/decisions, and repeatable procedures.
  • Project-aware context: uses explicit project names or current-directory detection.
  • Host integration docs: includes setup notes for OpenCode, Claude Code, and Antigravity-style MCP hosts.

Architecture

┌────────────────────┐       stdio MCP        ┌────────────────────┐
│ AI coding host      │ ─────────────────────▶ │ Aki MCP server      │
│ OpenCode / Claude   │ ◀───────────────────── │ FastMCP tools       │
└────────────────────┘                         └─────────┬──────────┘
                                                          │
                         ┌────────────────────────────────┼──────────────────────────────┐
                         ▼                                ▼                              ▼
              ┌──────────────────┐             ┌──────────────────┐          ┌──────────────────┐
              │ Memory handlers  │             │ Qwen extraction  │          │ Project detector │
              │ context/search   │             │ structured JSON  │          │ cwd/name aware   │
              │ save/explain     │             └──────────────────┘          └──────────────────┘
              └────────┬─────────┘
                       ▼
              ┌──────────────────┐
              │ Memory store     │
              │ SQLite + Chroma  │
              └──────────────────┘

The public CLI entry point is aki. The legacy agentos command remains available as a compatibility alias during the MVP transition.

Installation

Requirements

  • Python 3.11+
  • uv
  • Optional: Qwen Cloud/DashScope-compatible API key for extraction and enriched explanations

From source with uv

git clone https://github.com/Akicoders/aki.git
cd aki
uv sync --all-extras

Local editable install

uv pip install -e .

pip install

The package is not published to PyPI yet. Until a release is published, install from source.

Configuration

Create a local environment file:

cp .env.example .env

Qwen configuration:

QWEN_API_KEY=your_qwen_api_key_here
QWEN_BASE_URL=https://dashscope-intl.aliyuncs.com/compatible-mode/v1
QWEN_MODEL=qwen3.7-max
QWEN_EXTRACTION_MODEL=qwen3.7-plus
QWEN_CONSOLIDATION_MODEL=qwen3.7-max
QWEN_EMBEDDING_MODEL=text-embedding-v3

Memory storage defaults:

MEMORY_DB_PATH=data/agentos.db
MEMORY_CHROMA_PATH=data/chroma_db
MEMORY_EMBEDDING_MODEL=sentence-transformers/all-MiniLM-L6-v2
MEMORY_MAX_CONTEXT_TOKENS=8000

config.yaml contains the same defaults for local development. Do not commit real API keys.

Usage

Primary MCP runtime:

uv run aki mcp

Generate MCP snippets for supported hosts:

uv run aki mcp-config opencode
uv run aki mcp-config claude-code
uv run aki mcp-config generic-json

Other available CLI commands:

uv run aki --help
uv run aki chat "remember that we use pnpm" --project my-project
uv run aki recall "package manager" --project my-project
uv run aki remember "The MVP runtime is MCP stdio, not HTTP" --project my-project
uv run aki facts --project my-project

The agentos command is retained for compatibility. A matching aki console script is available after installing the package.

MCP Integration

OpenCode

uv run aki mcp-config opencode

Expected output:

{
  "mcp": {
    "aki_memory": {
      "type": "local",
      "command": ["uv", "run", "aki", "mcp"],
      "enabled": true
    }
  }
}

Add aki_memory to your OpenCode MCP configuration and restart OpenCode from the repository root.

Claude Code

uv run aki mcp-config claude-code

Expected output:

{
  "name": "aki_memory",
  "transport": "stdio",
  "command": "uv",
  "args": ["run", "aki", "mcp"]
}

Generic stdio JSON hosts

uv run aki mcp-config generic-json

See docs/integration.md for host-specific notes.

Demo walkthrough

The evaluator walkthrough is in docs/demo.md. It shows how to:

  1. start aki mcp as an OpenCode local MCP server;
  2. save a project decision such as “we use pnpm”;
  3. extract structured memories from an architecture paragraph;
  4. query memory_context and show it changing agent behavior;
  5. demonstrate fallback behavior when Qwen credentials are absent.

Docker and compose

Docker is a development helper, not the normal runtime path for coding hosts. MCP stdio must remain attached to the host process.

docker build -t aki-memory .
docker compose run --rm aki aki --help

There are intentionally no compose ports and no /health checks. Aki's MVP interface is stdio MCP, not HTTP.

Development

uv sync --all-extras
uv run ruff check .
uv run pytest tests/ -q
uv run aki mcp-config opencode

Project Status

Aki is an MVP built for the Qwen hackathon. It is useful for local agent memory workflows, but it is not a hosted production service.

Out of scope for this MVP:

  • REST API or web dashboard
  • multi-user/team tenancy
  • WhatsApp, Telegram, or voice ingestion
  • hosted production deployment
  • HTTP health checks

Roadmap

  • Publish the package and container image under final repository coordinates.
  • Add more host-specific MCP examples after real-world testing.
  • Improve structured extraction prompts and memory ranking.
  • Add release automation once the public repository is created.

Contributing

Contributions are welcome. Please read CONTRIBUTING.md, run the test suite, and avoid committing credentials or local memory data.

License

MIT. See LICENSE.

Credits

Built for the Qwen hackathon using Qwen Cloud-compatible APIs, MCP, SQLite, and ChromaDB.

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选