cindy
Cindy is an open-source AI agent that runs locally on your machine, integrates multiple AI harnesses and models, and provides memory, skills, and automation to perform real work in your projects and apps.
它凭借层次化的记忆设计(QA 缓存、常识、历史、Web、知识图谱)让搜索随使用不断改进;全模块化的多阶段架构,每个阶段(路由/改写/检索/回答)可独立选择模型和提示词;提供类 Claude Code 的执行事件透明化机制,实时展示每一步耗时;且以 MIT 协议开源。
自agent被提出以来,学术界有太多的search agent框架:从最开始的search r1,到后面各种用于刷榜的web search。各位同行大佬们的奇思妙想都给我们无尽的思考;但对工业界、AI搜初学者、以及想搭建个人搜索助手极客们,层次化、稳定可控、耗时短,永远是最基础的需求。
业界那么多AI搜索应用,真正火出圈的也就perplexity、秘塔等;一个很重要的点:如何让你的搜索越用越好用,搭建一套完整的多级检索和自动更新的harness框架,可能远比单个模型优化、或者高耗时容忍的multi-agent自进化更重要。
我们这里开源 Alpha Agentic Search (AAS) 框架,它主打的就是“稳定、可控、低耗时”!并在快手AI搜上面有了相应的落地。无论你是一名初学者,一位刚入行的AI工程师,还是一位资深AI搜索架构师,相信这套系统对您都有所启发。
一个可运行、可教学、也可作生产原型的 Agentic Search 项目: 用
Route → Rewrite → Retrieve → Read的经典链路做联网问答, 并在检索侧接入了一套 5 层记忆 RAG 栈(L1–L5),实现 Perplexity 式的 “越用越强”。两大设计原则:
- 多 Provider / 多 Stage:每个阶段(路由 / 改写 / 回答)都能独立选模型、改 prompt,业务代码零硬编码。
- 统一向量空间:L1–L5 全部使用 FlagEmbedding BGE-M3 编码,跨层可比、可融合。
二期优化点:(未来一个月内)
- 多跳搜索的精准实现:当前依然倾向于单轮检索 (+模糊搜索实现的多跳问答);后续会增加 Controllableloop agent;
- 多模态 / 富媒体搜索:未来考虑”返回图片、表格、代码块”多模态搜索;并支持答案的图片来源和Markdown 表格渲染。
# 1) 本地 LLM(router / rewriter 阶段默认走 ollama)
ollama pull qwen3:4b-instruct-2507-q8_0
ollama serve
# 2) 依赖(建议在 conda 环境 search-agent 中安装)
pip install -r requirements.txt
# 3) summary 阶段默认走 DeepSeek(OpenAI 兼容协议)
export DEEPSEEK_API_KEY="sk-xxx"
# 4) 启动(CLI);启动会打印当前各 stage 使用的模型
python main.py
# 或启动 Web 图形界面(Gradio)
python main_web.py --port 7860
说明:RAG 的 L2/L5 需要离线索引才会真正召回;未构建索引时这两层自然返回空, 系统仍可正常用 L1/L3/L4 工作。索引构建见
rag/README.md§3.3。
CLI 内置命令:config(查看模型配置)、clear(清空记忆)、:stream on|off(切换流式)、exit。
Claude Code 风格的执行透明化:CLI 与 Web 都会把 Agent 的每个流水线步骤 (路由 / 改写 / 检索 / 回答)实时展示出来并标注 ⏱️ 耗时。
- CLI:每步以
🔀 工具路由 → ... ⏱️ 120ms的形式打印为一行 trace。- Web:每步渲染为一个可折叠的步骤块,最终回答在其下方流式输出; 界面为宽扁单屏布局(左侧聊天、右侧配置栏),无需下滑即可看到输入框与全部控件。
详见 §2.1「执行事件机制」。
┌──────────────────────────────┐
用户输入 ──────────► │ main.py (CLI) / main_web.py(Web)│
└───────────────┬──────────────┘
▼
┌──────────────────────────────┐
│ agent.py AgenticSearchAgent │ 主控编排
└───────────────┬──────────────┘
│
┌──────────────┬───────────────────┼───────────────────┬──────────────┐
▼
Alpha Agentic Search — 分层记忆 RAG 检索问答系统
根据分类、Topic 和编程语言匹配的相似项目。
Cindy is an open-source AI agent that runs locally on your machine, integrates multiple AI harnesses and models, and provides memory, skills, and automation to perform real work in your projects and apps.

Hermex is a native SwiftUI iPhone app that lets you control a self-hosted Hermes AI agent directly from your phone, with no subscriptions, tracking, or third-party relay.
A hands-on course that walks through building a Pi-style coding agent from scratch across 15 checkpoints, starting from an offline agent trajectory.