开源AI工作流 是 AI Skill Hub 本期精选Agent工作流之一。综合评分 7.5 分,整体质量较高。我们推荐使用将其纳入你的 AI 工具库,帮助提升工作效率。
Open-source memory runtime for AI agents — reproducible, provenance-tagged conte,提供可靠的AI工作流解决方案。
开源AI工作流 是一套完整的 AI Agent 自动化工作流方案。通过可视化的节点编排,将复杂的多步骤任务拆解为清晰的自动化流程,实现全程无人值守的智能处理。支持与数百种外部服务和 API 无缝集成,适合构建数据处理管线、业务自动化和 AI 辅助决策系统。
Open-source memory runtime for AI agents — reproducible, provenance-tagged conte,提供可靠的AI工作流解决方案。
开源AI工作流 是一套完整的 AI Agent 自动化工作流方案。通过可视化的节点编排,将复杂的多步骤任务拆解为清晰的自动化流程,实现全程无人值守的智能处理。支持与数百种外部服务和 API 无缝集成,适合构建数据处理管线、业务自动化和 AI 辅助决策系统。
# 方式一:pip 安装(推荐)
pip install statewave
# 方式二:虚拟环境安装(推荐生产环境)
python -m venv .venv
source .venv/bin/activate # Windows: .venv\Scripts\activate
pip install statewave
# 方式三:从源码安装(获取最新功能)
git clone https://github.com/smaramwbc/statewave
cd statewave
pip install -e .
# 验证安装
python -c "import statewave; print('安装成功')"
# 命令行使用
statewave --help
# 基本用法
statewave input_file -o output_file
# Python 代码中调用
import statewave
# 示例
result = statewave.process("input")
print(result)
# statewave 配置文件示例(config.yml) app: name: "statewave" debug: false log_level: "INFO" # 运行时指定配置文件 statewave --config config.yml # 或通过环境变量配置 export STATEWAVE_API_KEY="your-key" export STATEWAVE_OUTPUT_DIR="./output"
Statewave is the open-source memory runtime that gives AI agents reproducible, provenance-tagged context — without sampling-noise from query-time retrieval.
If Statewave is useful to you, a ⭐ on the repo helps others discover it.
v1.1.0 — actively developed. Changelog · Roadmap · Limitations
The runtime essentials. Full capability inventory →
user:, repo:, account:, or any entity prefix you choosePOST /v1/receipts/{id}/replay for "what would today's code say with the original rules?"deny / redact) over per-memory tags (pii, financial, secret, …) with log_only and enforce modes. v0.9 adds advisory suggested_labels from heuristic detectors (pii.email/phone, financial.card, secret.token) with operator review + explicit promotion via the admin appX-Tenant-ID header, per-tenant config and policies. v0.9 adds per-tenant region pinning for residency: requests for a tenant pinned to eu are 403'd at any process running in another regionPGPASSWORD=statewave createdb -h localhost -U statewave statewave_test pytest tests/integration/ -v
from statewave import StatewaveClient
with StatewaveClient("http://localhost:8100") as sw:
sw.create_episode(subject_id="user-42", source="chat", type="message",
payload={"text": "Alice asked about pricing tiers"})
sw.compile_memories("user-42")
print(sw.get_context("user-42", task="answer pricing", max_tokens=1000).assembled_context)
That's the loop: ingest → compile → use — ranked, token-bounded context with provenance. Run the server below, or self-host with Docker / Helm. Full SDK docs: statewave-py (Python) · statewave-ts (TypeScript).
Three runnable examples in statewave-examples:
Plus the minimal quickstart, docs-grounded support, eval suite (56 assertions across 23 tests), a benchmark, and drop-in framework integrations — LangChain, CrewAI, and AutoGen — in the examples repo.
All settings use the STATEWAVE_ env prefix. Copy .env.example to .env to get started.
For best results: SetSTATEWAVE_COMPILER_TYPE=llmandSTATEWAVE_EMBEDDING_PROVIDER=litellmwith anSTATEWAVE_LITELLM_API_KEY. Statewave uses LiteLLM as its single provider abstraction, so you can use any supported provider — OpenAI, Anthropic, Azure, Ollama, Cohere, Gemini, Bedrock, Mistral, Groq, and 100+ others — by settingSTATEWAVE_LITELLM_MODELto any LiteLLM model identifier (e.g.gpt-4o-mini,claude-3-haiku-20240307,ollama/llama3,azure/gpt-4). The heuristic compiler still works without any LLM API key.
| Variable | Default | Description |
|---|---|---|
STATEWAVE_DATABASE_URL | postgresql+asyncpg://statewave:statewave@localhost:5432/statewave | Postgres connection string |
STATEWAVE_DEBUG | false | Enable debug logging |
STATEWAVE_COMPILER_TYPE | heuristic | heuristic or llm |
STATEWAVE_EMBEDDING_PROVIDER | stub | stub, litellm, or none |
STATEWAVE_LITELLM_API_KEY | — | Provider-neutral API key (e.g. OpenAI sk-..., Anthropic sk-ant-...) — passed through to the provider chosen by STATEWAVE_LITELLM_MODEL |
STATEWAVE_LITELLM_MODEL | gpt-4o-mini | Chat-completion model — any [LiteLLM identifier](https://docs.litellm.ai/docs/providers) (claude-3-haiku-20240307, ollama/llama3, azure/gpt-4, etc.) |
STATEWAVE_LITELLM_EMBEDDING_MODEL | text-embedding-3-small | Embedding model — any LiteLLM-supported (cohere/embed-english-v3.0, voyage/voyage-large-2, …) |
STATEWAVE_LITELLM_API_BASE | — | Custom base URL (e.g. http://localhost:11434 for Ollama, or a self-hosted OpenAI-compatible gateway) |
STATEWAVE_LITELLM_TIMEOUT_SECONDS | 60 | Request timeout |
STATEWAVE_LITELLM_MAX_RETRIES | 2 | Retries on transient errors |
STATEWAVE_EMBEDDING_DIMENSIONS | 1536 | Embedding vector dimensions |
STATEWAVE_API_KEY | — | API key for auth (empty = open access) |
STATEWAVE_RATE_LIMIT_RPM | 0 | Requests/min/IP (0 = disabled) |
STATEWAVE_RATE_LIMIT_STRATEGY | distributed | distributed (Postgres) or memory (in-process) |
STATEWAVE_WEBHOOK_URL | — | Webhook callback URL (empty = disabled) |
STATEWAVE_WEBHOOK_TIMEOUT | 5.0 | Webhook HTTP timeout in seconds |
STATEWAVE_WEBHOOK_EVENTS | — | Comma-separated event-type allowlist (empty = deliver every event) |
STATEWAVE_RECEIPT_SIGNING_KEYS | — | JSON {"<key_id>": "<base64>"} map of HMAC keys for receipt signing (≥32 bytes each). Never persisted to the DB; per-tenant active key id set via tenant_configs.config.receipt_signing_key_id. |
STATEWAVE_AUTO_LABELING_ENABLED | false | Run heuristic detectors at compile time and stamp advisory suggested_labels on memories (v0.9). See [docs/auto-labeling.md](docs/auto-labeling.md). |
STATEWAVE_AUTO_LABELING_PROVIDER | heuristic | Detector provider. Only heuristic is currently supported (since v0.9); the switch is reserved for future LLM-based classifiers. |
STATEWAVE_REGION | — | Region this server process is running in. When set, requests for tenants pinned to a different region are refused with HTTP 403 residency.mismatch (v0.9). Empty = single-region mode, residency disabled. See [docs/residency.md](docs/residency.md). |
STATEWAVE_TENANT_HEADER | X-Tenant-ID | Header for multi-tenant isolation |
STATEWAVE_REQUIRE_TENANT | false | Reject requests without tenant header |
STATEWAVE_DEFAULT_MAX_CONTEXT_TOKENS | 4000 | Default token budget for context assembly |
STATEWAVE_CORS_ORIGINS | ["*"] | Allowed CORS origins |
| Method | Path | Description |
|---|---|---|
POST | /v1/episodes | Ingest a single episode (append-only) |
POST | /v1/episodes/batch | Ingest up to 100 episodes at once |
POST | /v1/memories/compile | Compile memories from episodes (idempotent) |
GET | /v1/memories/search | Search by kind, text, or semantic similarity |
POST | /v1/context | Assemble ranked, token-bounded context bundle |
GET | /v1/timeline | Chronological subject timeline |
GET | /v1/subjects | List known subjects with episode/memory counts |
DELETE | /v1/subjects/{id} | Permanently delete all data for a subject |
POST | /v1/resolutions | Track issue resolution state per session |
GET | /v1/resolutions | List resolutions for a subject |
POST | /v1/handoff | Generate compact handoff context pack |
GET | /v1/subjects/{id}/health | Customer health score with explainable factors |
GET | /v1/subjects/{id}/sla | SLA metrics — response time, resolution time, breaches |
Full reference: API v1 contract.
npm install @statewavedev/connectors-github npm install @statewavedev/connectors-jira # preview npm install @statewavedev/connectors-database # preview — postgres/mysql/mariadb/mssql npm install @statewavedev/connectors-markdown npm install @statewavedev/connectors-slack npm install @statewavedev/connectors-n8n npm install @statewavedev/connectors-zapier npm install @statewavedev/mcp-server
A convenience meta-package `@statewavedev/connectors` re-exports the official connectors for the rare case where you want them all at once. **It is not required** for normal usage.
Quick examples (dry-run-first — nothing is ingested without your say-so):
bash statewave-connectors sync github \ --repo smaramwbc/statewave \ --subject repo:smaramwbc/statewave \ --dry-run
statewave-connectors sync markdown \ --path ./docs \ --subject repo:smaramwbc/statewave \ --dry-run
statewave-connectors mcp start ```
Where to go next:
@statewavedev/connectors-* (incl. preview Jira + database source connectors)No connector code lives in this repo. Connectors talk to Statewave through the same public HTTP API documented above. If you don't need any of them, you don't install any of them.
How is this different from Mem0 / Zep? Mem0 is lean and fast but loses on multi-hop reasoning in our bench. Zep extracts a graph but in our LoCoMo run its retrieval surface returned the same thread summary regardless of the query. Statewave compiles the context once per subject change, with provenance. See statewave-bench for row-level data and a 20-minute reproducibility command against your own keys.
Does it work with my model provider? Yes — Statewave uses LiteLLM so any of 100+ providers work (OpenAI, Anthropic, Azure, Bedrock, Ollama, Groq, Cohere, Gemini, Mistral, …). Set STATEWAVE_LITELLM_MODEL to any LiteLLM identifier.
What's the license — can I use this commercially? Yes. Statewave (server + SDKs) is Apache-2.0 — a permissive license with an explicit patent grant. Use it freely in proprietary, hosted, or commercial products with no source-disclosure obligations. See LICENSING.md.
Can I self-host? Yes — that's the default. Docker Compose, Helm chart, or bare-metal. See Deployment guide.
Why does it cost more tokens per answer than Mem0? Compiled context bundles are denser than Mem0's fact-store retrieval — that's what buys the higher multi-hop accuracy. If your queries are mostly single-hop and you're cost-sensitive, Mem0 may be the right call. The bench tells you when each system wins.
Statewave 是一个用于构建智能应用的开源框架,提供了一个强大的上下文管理系统,能够帮助开发者构建高效的智能应用。
Statewave 提供了多种功能,包括编译上下文包、追踪记忆、可插拔编译器等,能够帮助开发者构建高效的智能应用。
Statewave 需要 Postgres 数据库来运行集成测试,环境依赖包括 Python 3.11+ 和 Postgres。
可以通过 pip 安装 Statewave,或者从源码编译安装,具体步骤请参见文档。
使用 Statewave 可以通过创建 episode、编译记忆和获取上下文等步骤来构建智能应用,具体使用方法请参见文档。
Statewave 的配置使用 STATEWAVE_ 环境前缀,需要设置编译器类型和 LiteLLM API 键等参数,具体配置方法请参见文档。
Statewave 提供了多个 API endpoint,包括 ingest episode、compile memories 和 get context 等,具体 API 文档请参见文档。
Statewave 可以通过多个独立的包来构建智能应用,包括连接器、数据库连接器和 markdown 连接器等,具体工作流和模块说明请参见文档。
Statewave 与其他智能应用框架相比,具有更强大的上下文管理能力和多跳推理能力,具体 FAQ 请参见文档。
该项目提供了一个开源的AI工作流解决方案,支持可靠的AI工作流管理,适用于各种AI应用场景,但需要进一步优化和完善
AI Skill Hub 为第三方内容聚合平台,本页面信息基于公开数据整理,不对工具功能和质量作任何法律背书。
建议在沙箱或测试环境中充分验证后,再部署至生产环境,并做好必要的安全评估。
✅ Apache 2.0 — 宽松开源协议,可商用,需保留版权声明和 NOTICE 文件,含专利授权条款。
经综合评估,开源AI工作流 在Agent工作流赛道中表现稳健,质量良好。如果你已有明确的使用需求,可以直接上手体验;如果还在评估阶段,建议对比同类工具后再做决策。
| 原始名称 | statewave |
| 原始描述 | 开源AI工作流:Open-source memory runtime for AI agents — reproducible, provenance-tagged conte。⭐205 · Python |
| Topics | workflowagent-memoryai-agentsllmmemorypgvectorpython |
| GitHub | https://github.com/smaramwbc/statewave |
| License | Apache-2.0 |
| 语言 | Python |
收录时间:2026-06-14 · 更新时间:2026-06-16 · License:Apache-2.0 · AI Skill Hub 不对第三方内容的准确性作法律背书。
选择 Agent 类型,复制安装指令后粘贴到对应客户端