sayou

io.github.pixell-global由 GitHub 账号 pixell-global 发布v0.2.2更新于 Oct 24, 2026

Persistent knowledge workspace for AI agents. Versioned files, search, and MCP tools.

概览

AI 生成的概览

面向 AI 代理的本地文件式知识工作区,通过 MCP 工具提供带版本的文件、搜索、键值存储和链接管理。

可以做什么
写入、读取、列出和软删除带 YAML frontmatter 的版本化文件,支持二进制内容和行范围。按全文查询、frontmatter 过滤或分块搜索文件,并用 glob 模式或 grep 式内容搜索查找文件。查看版本历史、比较两个版本的差异并读取旧版本。存取带可选 TTL 的键值对。管理文件链接和知识图谱,读取分块大纲或指定分块。配置嵌入提供方后可选用向量相似度搜索。
适用场景
适合需要让助手跨会话保留研究、笔记、决策或项目文档,而不是随对话结束而丢失的场景;也适合希望保留代理写入内容可审计版本记录的情况。多代理共享同一工作区时同样适用。
运行要求
作为本地进程从 PyPI 用 pip 安装运行,需要 Python。默认使用 SQLite 加本地磁盘,无需配置,工作区默认为本地目录。可选附加组件提供 REST API、S3 存储或参考代理。通过 Sayou Drive 云同步需运行认证命令并输入 API 密钥。生产环境 MySQL 加 S3 需在环境变量中提供数据库和 S3 凭据。
安装前请注意
这些工具会写入、更新和软删除工作区文件,助手可以改动已存内容;历史会保留,但删除只是软删除。完成认证后云同步会把工作区数据发送到 Sayou Drive。生产配置通过环境变量传入数据库和 S3 凭据,例如 S3 访问密钥和密钥。可选的参考代理能在沙箱中执行 bash 和 Python 并使用网络搜索,需要另外的 API 密钥。

安装

在 SourceWeft 中

  1. 打开 控制台中的 sayou,将其添加到工作区。
  2. 为需要使用其工具的对话启用该服务。

Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。

其他 MCP 客户端

参照 仓库 中的启动说明。

README

sayou

A file-system inspired context store for AI agents.

Built to replace the databases of the web era. Open source. File-first. SQL-compatible.

[License] [Python]

Databases were designed for transactions — they reduce nuance to fit a schema. Agents think deeply, then forget everything when the session ends. sayou is where reasoning persists, context accumulates, and knowledge compounds over time.

  • Files that hold what databases can't — Frontmatter for structure. Markdown for context. Versioned. Auditable.
  • One read. Full context. — Every read accepts a token_budget. Returns summaries with section pointers when content exceeds the budget.
  • Knowledge that compounds — Append-only version history. Every change is a new version. Full audit trail and time-travel reads.
  • Any agent can connect — MCP server, Python library, or CLI. Optional REST API with pip install sayou[api].

Quick Start

Claude Code (recommended)

From within Claude Code:

/plugin install sayou@pixell-global

Or from the terminal:

bash
claude plugin install sayou@pixell-global

One command. This installs the plugin with lifecycle hooks (workspace context on session start, passive activity capture, session summaries) and skills (/ws, /save, /recall). If sayou isn't installed yet, the plugin auto-installs it on first run.

Cloud mode: To sync your workspace via Sayou Drive, run sayou auth after installing and paste your API key from Settings.

pip install

bash
pip install sayou && sayou init --claude

This installs sayou and configures ~/.claude/mcp.json. You get the 11 MCP tools but no hooks or skills. You can also use --cursor or --windsurf, or run sayou init without flags to get the config snippet to paste manually.

To verify either method, run sayou status — you should see your workspace path, database location, and 11 tools registered. If you see errors, jump to Troubleshooting.

Try It

Open Claude Code and paste any of these prompts. Each one triggers a different MCP tool — no setup beyond the Quick Start above.

PromptWhat happensTool
"Save a note about our Q1 goals with status: draft"Creates a versioned file with YAML frontmatterworkspace_write
"What files are in my workspace?"Lists all files and subfoldersworkspace_list
"Search for anything tagged status: draft"Filters files by frontmatter metadataworkspace_search
"Read the Q1 goals note"Retrieves file content with token-budget awarenessworkspace_read
"Update the status to reviewed"Writes a new version (old version preserved)workspace_write
"Show me the diff between versions"Compares two versions with unified diffworkspace_history
"Store a setting: theme = dark"Saves a key-value pair (with optional TTL)workspace_kv
"Find all markdown files in research/"Matches files by glob patternworkspace_glob
"Search file contents for the word 'budget'"Grep-style content search with contextworkspace_grep

Every write creates a new version. Nothing is overwritten. You can always go back.

What It Looks Like

A short conversation showing sayou in action across sessions:


You: Research competitor pricing for our enterprise tier and save your findings.

Claude Code: I'll research this and save my findings to the workspace.

[Uses workspace_write to create research/competitor-pricing.md]

Saved to research/competitor-pricing.md with frontmatter: status: draft, topic: competitor-pricing


You (next day, new session): What did we learn about competitor pricing?

Claude Code: Let me check our workspace.

[Uses workspace_search with query "competitor pricing"]

Found research/competitor-pricing.md (saved yesterday):

  • Competitor A: $99/seat/month
  • Competitor B: $149/seat/month (includes support)
  • Competitor C: $79/seat/month (limited features)

You: Update the status to "reviewed" and show me the diff.

Claude Code: [Uses workspace_write to create version 2, then workspace_history to diff]

diff
- status: draft+ status: reviewed+ reviewer_notes: |+   Competitor B is closest to our positioning.

The key insight: Claude Code remembered the research across sessions because sayou persisted it as a versioned file — not a chat message that disappears.

Setup for Other Editors

Cursor

bash
sayou init --cursor

This adds sayou to .cursor/mcp.json in your current working directory.

Windsurf

bash
sayou init --windsurf

This adds sayou to ~/.codeium/windsurf/mcp_config.json.

Any MCP-compatible client

sayou is a standard MCP server. Run sayou init (no flag) to get the config snippet, then paste it into your editor's MCP config. The entry is always the same — just "command": "sayou".

MCP Tools

The agent gets 11 tools (12 with embeddings enabled):

ToolDescription
workspace_writeWrite or update a file (text or binary with YAML frontmatter)
workspace_readRead latest or specific version, with optional line range
workspace_listList files and subfolders with auto-generated index
workspace_searchSearch by full-text query, frontmatter filters, or chunk-level
workspace_deleteSoft-delete a file (history preserved)
workspace_historyVersion history with timestamps, or diff between two versions
workspace_globFind files matching a glob pattern
workspace_grepSearch file contents with context lines
workspace_kvKey-value store (get/set/list/delete with optional TTL)
workspace_linksFile links and knowledge graph (get or add links)
workspace_chunksChunk outline or read a specific chunk by index
workspace_semantic_searchVector similarity search (requires SAYOU_EMBEDDING_PROVIDER)

Python API

python
import asynciofrom sayou import Workspace
async def main():    async with Workspace() as ws:        # Write a file with YAML frontmatter        await ws.write("notes/hello.md", """\---status: activetags: [demo, quickstart]---# Hello from sayouThis file is versioned and searchable.""")
        # Read it back        doc = await ws.read("notes/hello.md")        print(doc["content"])
        # Search by frontmatter        results = await ws.search(filters={"status": "active"})        print(f"Found {results['total']} active files")
asyncio.run(main())

See examples/quickstart.py for a runnable version.

CLI

bash
# File operationssayou file read notes/hello.mdsayou file write notes/hello.md "# Hello World"sayou file list /sayou file search --query "hello" --filter status=active
# KV storesayou kv set config.theme '"dark"'sayou kv get config.theme
# Cloud authenticationsayou auth            # Connect to Sayou Drive (interactive)sayou auth status     # Show current mode (cloud/local)sayou auth logout     # Disconnect from Sayou Drive
# Diagnosticssayou init      # Initialize local setupsayou status    # Show diagnostic info

Examples

ExampleWhat it shows
quickstart.pyHello World — write, read, search, list in 30 lines
kv_config.pyKV store for config, feature flags, caching with TTL
version_control.pyVersion history, diff, time-travel reads
file_operations.pyMove, copy, binary files, glob patterns
multi_agent.pyMulti-agent collaboration with shared workspace
research_agent.pyAll methods exercised — the comprehensive reference

Reference Agent

sayou ships with a reference agent server — a multi-turn assistant that can search, read, write, and research using your workspace. It's a complete working example of building an agent on sayou.

Quick start

bash
# Install with agent dependenciespip install sayou[agent]
# Configure (copy and fill in your OpenAI key)cp agent/.env.example .env
# Run the agent serverpython -m sayou.agent

The agent runs on http://localhost:9008 with a streaming SSE endpoint at POST /chat/stream.

What the agent can do

CapabilityHow it works
Answer questionsSearches workspace first, falls back to web search
Research topicsMultiple web searches, extracts facts, saves structured findings
Store knowledgeWrites files with YAML frontmatter, section headings, source citations
Execute codeOptional E2B sandbox for Python and bash (set SAYOU_AGENT_E2B_API_KEY)

Evaluate the agent

bash
# Start agent in one terminalpython -m sayou.agent
# Quick pass/fail evalpython -m sayou.agent.benchmarks.eval
# Detailed scoring (0-10 per capability)python -m sayou.agent.benchmarks.eval_full

Architecture

Client → FastAPI (port 9008)         ↓      Orchestrator         ├─ LLMProvider (OpenAI streaming + tool calls)         ├─ ToolFactory         │  ├─ workspace_search/read/list/write (→ sayou SDK)         │  ├─ web_search (→ Tavily API, optional)         │  └─ execute_bash/python (→ E2B sandbox, optional)         └─ SandboxManager (per-session isolation, auto-cleanup)

SAMB: Structured Agent Memory Benchmark

sayou includes SAMB — an open benchmark for evaluating memory systems on real agentic workflows. Existing benchmarks (LOCOMO, LongMemEval, DMR) test conversation recall. SAMB tests what agents actually need: recalling decisions, retrieving artifact contents, and connecting knowledge across sessions.

What SAMB measures

DimensionWhat it tests
Decision reasoning"Why was bcrypt chosen over Argon2?"
Artifact content"What endpoints are in the API docs?"
Cross-session"How does session 3's auth decision affect session 5's implementation?"
Fact recall"What was the monthly GCP cost estimate?"
Temporal"What changed between the first and second architecture review?"

10 scenarios, 62 sessions, 131 QA pairs across 7 question types. Each scenario simulates a multi-session professional project (auth system design, cloud migration, email campaigns, incident response, etc.) with realistic conversations, decisions, and artifacts.

Run the benchmark

bash
# Prerequisites: pip install sayou mem0ai zep-cloud# Requires: OPENAI_API_KEY (for judge/answer models)#           ZEP_API_KEY (for zep adapter)
# Run all adapters on all scenariospython -m benchmarks.runner.cli
# Specific adapterspython -m benchmarks.runner.cli --adapter sayou mem0
# Specific scenariospython -m benchmarks.runner.cli --adapter sayou --scenario 01 03 08
# Verbose output (per-question scores)python -m benchmarks.runner.cli --verbose
# Override judge/answer modelspython -m benchmarks.runner.cli --judge-model gpt-4o --answer-model gpt-4o

Results are saved to benchmarks/results/ as JSON with full per-question breakdowns.

Available adapters

AdapterSystemRetrieval approach
sayousayou workspaceFTS5 + grep + file read (agentic, multi-tool)
mem0mem0LLM fact extraction + embedding search (agentic)
zepZep CloudKnowledge graph + temporal edges (agentic)
oracleBaselineDirect access to source sessions (upper bound)
no_memoryBaselineNo retrieval (lower bound)

Methodology

Each adapter uses agentic retrieval — an LLM generates multiple search queries rather than a single-shot lookup. This gives every system a fair chance at finding relevant information.

Scoring: LLM-judged (gpt-4o-mini) on a 0–3 scale, normalized to percentage. Task-type questions add holistic scoring (1–5) and evidence coverage (per-item FOUND/MISSING). Statistical significance via bootstrap confidence intervals with Bonferroni correction.

Full methodology: benchmarks/dataset/METHODOLOGY.md Dataset card: benchmarks/dataset/DATASET_CARD.md

Installation Options

bash
# Basic (MCP server + CLI + SQLite)pip install sayou
# With REST API supportpip install sayou[api]
# With S3 storagepip install sayou[s3]
# With reference agent serverpip install sayou[agent]
# Full installation (all features)pip install sayou[all]

Production Deployment

For team/production use with MySQL + S3:

json
{  "mcpServers": {    "sayou": {      "command": "sayou",      "env": {        "SAYOU_ORG_ID": "my-org",        "SAYOU_USER_ID": "alice",        "SAYOU_DATABASE_URL": "mysql+aiomysql://user:pass@host/sayou",        "SAYOU_S3_BUCKET_NAME": "my-bucket",        "SAYOU_S3_ACCESS_KEY_ID": "...",        "SAYOU_S3_SECRET_ACCESS_KEY": "..."      }    }  }}

Install with all backends: pip install sayou[all]

Storage Backends

BackendConfigUse case
SQLite + local disk (default)No config neededLocal dev, single-machine agents, MCP server
MySQL + S3Set database_url, S3 credentialsProduction, multi-agent, shared workspaces

Troubleshooting

Verify your setup

bash
sayou status

This shows your workspace path, database location, storage backend, and tool count. If everything is working, you'll see 11 tools registered.

Common issues

ProblemCauseFix
Claude Code doesn't see sayou toolsMCP config not loadedRestart Claude Code after editing ~/.claude/mcp.json
sayou: command not foundNot on PATHRun pip install sayou again, or use full path in MCP config: "command": "/path/to/sayou"
sayou status shows 0 toolsServer didn't initializeRun sayou init first, then check for errors in output
Files not persistingWrong workspace pathCheck sayou status for the workspace path — default is ~/.sayou/
Import errors on startupMissing optional dependencyInstall the extra you need: pip install sayou[api], sayou[s3], or sayou[all]

Get help

What sayou is NOT

  • Not a vector database. Pinecone, Weaviate, and Chroma store embeddings for similarity search. sayou stores structured files that agents read, write, and reason over.
  • Not a memory layer. Mem0 and similar tools store conversation snippets. sayou stores work product — research, client records, project documentation — that compounds over time.
  • Not a sandbox. E2B provides ephemeral execution environments. sayou provides persistent storage that outlives any single execution.
  • Not a filesystem. AgentFS intercepts syscalls to virtualize file operations. A knowledge workspace with versioning and indexing.

Philosophy

Read PHILOSOPHY.md for the founding vision and design principles.

Contributing

See CONTRIBUTING.md.

License

Apache 2.0 — See LICENSE

来源:README.md,提交 7fc503b

工具

0
SourceWeft 尚未在沙箱中启动过该软件包,因此其工具未知。

版本历史

1
  1. v0.2.2最新Sep 16, 2026

评分

已满足适用检查项的 50%

该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。

  • 近 30 天内可连通25 分

    请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。

  • 已声明认证方式10 分

    请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。

  • 已列出工具15 分

    请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。

  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分