Stele

io.github.leocelis由 GitHub 帳號 leocelis 發布v18.16.2更新於 Nov 6, 2026

Governed agent memory: lessons stay out of search until another actor promotes them with evidence.

已驗證STDIO僅桌面知識與記憶AI 與機器學習

概覽

AI 產生的概覽

給 AI 代理使用的本機受治理記憶帳本:記錄任務經驗,僅在具外部證據時晉升,之後可檢索重用。

可以做什麼
  • 新增、批次新增、更新與刪除帳本條目,新條目先進入隔離區等待晉升
  • 依外部證據晉升、取代、置頂條目並記錄使用成效
  • 檢索已晉升條目、查詢特定時點的信念,並檢視連結、關聯條目、時間軸與血緣
  • 審查爭議條目、過期條目、衛生候選與受汙染嫌疑,並以有證據的取代方式解決衝突
  • 執行完整性與健康檢查,匯出或匯入去識別化套件,快照與比對儲存,並依來源清除
適用情境
適合希望代理跨工作階段、跨代理累積可稽核經驗,且要求未經核實的自我反思不進入檢索結果的情境。也適合需要對既有經驗做過期追蹤、衝突複核、抹除與來源查核的團隊。
執行需求
以本機 stdio 程序執行,從 PyPI 安裝 stele-mcp(搭配 stele-core),需要 Python 與 Model Context Protocol Python SDK 1.x。儲存位置由環境變數 STELE_STORE 指定,預設為 ./.stele-store。本機服務未宣告驗證機制。
安裝前請注意
這些工具會寫入、晉升、取代並永久刪除條目,清除與快照操作作用於整個儲存,建議將 STELE_STORE 指向專用目錄。匯出與套件雖標示為去識別化,仍應確認外送內容。README 另述需 Bearer 金鑰的託管 HTTP 版本,請勿將此類金鑰或 DSN 寫入共用檔案。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 Stele,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。

其他 MCP 客戶端

參照 儲存庫 中的啟動說明。

README

Stele
The governed experiential-memory ledger for AI agents — log what worked and what failed, promote only oracle-verified lessons, and let any agent build solid context from real experience.


What is Stele?

A stele is a stone raised to record what happened — deeds, laws, warnings — for those who come after. Stele is the same idea for AI agents: a centralized ledger of task experience. Agents automatically log what worked and what failed on each task; a governance gate promotes only lessons backed by external evidence; and any agent — today's or a future one — retrieves the distilled experience through one protocol before its next task.

Status: v18.16.1. Design locked in stele_system_intent.yaml. Packages: stele-core (zero runtime deps; optional [mysql]) + stele-mcp (stdio + hosted HTTP) + stele CLI.

Why Stele (research-backed)

ProblemEvidenceStele answer
Recall wins ≠ better actionsMemoryArena (arXiv:2602.16313)Task-outcome harnesses, not recall@k marketing
Self-reflection poisons storesSurvey (arXiv:2603.07670)Quarantine + external oracle only
Every framework is a silomemorywire (arXiv:2606.01138)JSON Schema + projection helpers
Stale lessons misleadLongMemEval (arXiv:2410.10813)Bi-temporal supersede + stale_policy

Full research: docs/research/ · patterns: docs/patterns/.

Install

bash
pip install stele-core stele-mcp

From git (contributors):

bash
python3.11 -m venv .venvsource .venv/bin/activatepip install -r requirements-dev.txtpip install -e packages/stele-core -e packages/stele-mcpmake check   # ruff + mypy + pytestmake proof   # end-to-end PASS/FAIL proof

Quick path: docs/QUICKSTART.md · comparison: docs/COMPARISON.md.

Quick start (library)

python
from pathlib import Pathfrom stele_core import Stele
s = Stele.open(Path(".stele-store"), store_id="demo", now="2026-08-20T12:00:00Z")added = s.add({    "layer": "failure_lesson",    "title": "Pin cache keys to calendar buckets",    "body": "Day-scoped keys prevent stale cross-day reads.",    "scope": "project:demo",    "temporal": {"valid_from": "2026-08-20T12:00:00Z", "last_verified": "2026-08-20T12:00:00Z"},    "provenance": {        "agent": "agent-a", "task": "cache-fix", "environment": "local",        "subject_id": "subj-1", "source": "session:abc",        "written_at": "2026-08-20T12:00:00Z",    },})# → {"id": "se_…", "state": "quarantined"}  — not searchable yet
s.promote(added["id"], [{    "type": "test_result", "issuer": "ci", "ref": "tests/test_cache.py",    "observed_at": "2026-08-20T12:00:00Z", "verdict": "supports",    "command": "pytest -q", "exit_status": 0,}], actor="ci", ts="2026-08-20T12:00:00Z")
print(s.search("cache buckets", consumer_scope="project:demo"))print(s.doctor(now="2026-08-20T12:00:00Z")["ok"])

CLI

bash
stele init ./.stele-store --store-id demostele doctor ./.stele-store --now 2026-08-20T12:00:00Zstele hygiene ./.stele-store --now 2026-08-20T12:00:00Zstele entangled ./.stele-store --source web_page --now 2026-08-20T12:00:00Zstele forget-check ./.stele-store --scope project:demo --subject-id subj-x --probe-query secret --now 2026-08-20T12:00:00Zstele schema --out docs/schemas/entry.schema.jsonstele snapshot ./.stele-store /tmp/stele-backup --now 2026-08-20T12:00:00Z --actor ops

MCP (stdio)

Requires the Model Context Protocol Python SDK 1.x (mcp>=1.0,<2). mcp 2.x removed mcp.server.fastmcp and will not boot this server.

Default (stele-mcp): 35 governed-ledger tools — add, promote, search, doctor, export, …

bash
export STELE_STORE=./.stele-storestele-mcp

Full research library (~2000 PEFT/agent-pattern tools): stele-mcp-full.

MCP (hosted HTTP)

Same tools over HTTPS (SSE + streamable HTTP). Two independent tool surfaces, same process, same auth, same store:

SurfaceSSEStreamable HTTPTools
Full/sse/mcp2003 (ledger + PEFT/pattern research library)
Core (governed ledger only)/core/sse/core/mcp35 — see list below

Production:

Local run (dev):

bash
bash deploy/build.shSTELE_API_KEYS=stl_local_dev STELE_AUTH_DISABLED=false \  STELE_STORE=./.stele-store \  python deploy/wsgi.py --port 8080
  • GET /health — unauthenticated; reports tool_counts: {full, core}
  • /sse + /mcp (full) and /core/sse + /core/mcp (ledger-only) — both Bearer via STELE_API_KEYS
  • Hosted durable SoT: STELE_STORE_DSN + TLS CA (DSN wins over file path)
  • Never commit API keys, DSNs, or PEMs
json
{  "mcpServers": {    "stele": {      "url": "https://stele.leocelis.com/core/sse",      "headers": { "Authorization": "Bearer YOUR_KEY_HERE" }    }  }}

35 governed-ledger tools (TECH_SPEC §7.1-7.9 — everything create_core_app() exposes): add · update · promote · supersede · delete · search · reflect · link · list_contested · resolve_contested · verify · reviewer_corrections · hydrate · export · record_outcome · pin · stale_report · reverify · related · stats · timeline · verify_pack · attach · snapshot · doctor · entry_schema · purge_by_provenance · diff_stores · add_batch · entangled_suspects · hygiene_candidates · forget_compliance · lineage · belief_at · conflict_surface

Architecture

See docs/ARCHITECTURE.md. Planes: Contract · Tools · Governance · Retrieval · Export · Living ledger · Ops.

DocLink
OSS guide (start here)docs/OSS_GUIDE.md
Quickstartdocs/QUICKSTART.md
PRDdocs/PRD.md
TECH_SPEC v1.1docs/TECH_SPEC.md
Entry JSON Schemadocs/schemas/entry.schema.json
Intent (C1–C8)stele_system_intent.yaml

License

MIT · Copyright (c) 2026 Stele contributors

來源:README.md,提交 e9aa604

工具

35

stele_add

ADD a distilled structured entry into quarantine. Pass entry as JSON object string.

輸入參數tsentry_json必填

stele_add_batch

Atomic multi-ADD under one lock.

輸入參數tsactorentries_json必填

stele_attach

Content-address bytes (base64); optionally LINK to an entry (FF-6).

輸入參數tskindactor必填entry_iddata_base64必填

stele_belief_at

Bi-temporal point-in-time belief inventory or SEARCH.

輸入參數as_of必填querybudgetconsumer_scope必填principal_scopes_json

stele_conflict_surface

Conflict-preserving contested pairs — no auto-collapse.

輸入參數body_max_chars

stele_delete

DELETE by entry_id or subject_id (true erase + index rebuild).

輸入參數tsactor必填reasonentry_idsubject_id

stele_diff_stores

Diff this store vs another root (e.g. snapshot) by entry id sets.

輸入參數other_root必填

stele_doctor

Operator health report: verify + stats + contested + stale.

輸入參數now

stele_entangled_suspects

Human-review queue for LINK-entangled poison (report only).

輸入參數limitseed_ids_jsonuntrusted_agents_jsonuntrusted_sources_json

stele_entry_schema

JSON Schema 2020-12 for Stele entries (interop).

無需輸入參數。

stele_export

Export a redacted, audience-tiered pack (storage ≠ pack).

輸入參數dest必填scope必填expiry必填purpose必填audience必填created_atsubject_allowlist_json

stele_forget_compliance

Post-erasure active-forgetting probe (GateMem-shaped).

輸入參數subject_idprobe_queryconsumer_scope必填entry_ids_jsonforbidden_substrings_json

stele_hydrate

Import a redacted pack (ADD; optional promote with external evidence).

輸入參數tsactor必填promotepack_dir必填evidence_json

stele_hygiene_candidates

Zombie / net-harm hygiene report — no auto-delete.

輸入參數nowlimitunused_before

stele_lineage

Supersede chain + journal audit lineage (TOKI-shaped).

輸入參數entry_id必填

stele_list_contested

List contested entries awaiting evidenced resolution (TECH_SPEC Q5).

無需輸入參數。

stele_pin

Pin or unpin a promoted lesson for SEARCH priority.

輸入參數tsactor必填pinnedentry_id必填

stele_promote

PROMOTE a quarantined entry with external-oracle evidence (JSON array).

輸入參數tsactor必填entry_id必填evidence_json必填block_injection_suspects

stele_purge_by_provenance

Provenance recovery: dry-run or purge entries from untrusted source/agent.

輸入參數tsactor必填dry_rununtrusted_agents_jsonuntrusted_sources_json

stele_record_outcome

Record helpful/harmful/ignored after using a lesson; helpful refreshes last_verified.

輸入參數tsnoteactor必填outcome必填entry_id必填

stele_reflect

REFLECT: dedupe, expire, surface conflicts (no auto-resolve).

輸入參數tsactor必填stale_before

stele_resolve_contested

Resolve a contested pair by evidenced supersede — never auto-merge.

輸入參數tsactor必填loser_id必填winner_id必填evidence_json必填

stele_reverify

Batch-refresh last_verified with external oracle evidence.

輸入參數tsactor必填evidence_json必填entry_ids_json必填

stele_reviewer_corrections

Bounded contested-first correction slice for reviewer roles.

輸入參數limitinclude_contested

stele_snapshot

Cold-copy SoT (manifest, journal, entries, attachments) to dest.

輸入參數tsdest必填actor必填

stele_stale_report

List promoted entries past the staleness horizon.

輸入參數now

stele_stats

Store health dashboard: counts by state/layer/scope.

輸入參數now

stele_supersede

SUPERSEDE an old lesson with a new quarantined entry (history kept).

輸入參數tsactor必填old_id必填new_entry_json必填

stele_timeline

Journal history for one entry.

輸入參數entry_id必填

stele_update

UPDATE non-state fields on an existing entry.

輸入參數tsactor必填entry_id必填patch_json必填

stele_verify

C4 integrity report: dual-location, schema, journal parse.

無需輸入參數。

stele_verify_pack

Offline pack integrity: stamps + secret scan.

輸入參數pack_dir必填

版本歷史

1
  1. v18.16.2最新Nov 6, 2026

評分

已滿足適用檢查項的 90%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通25 分
  • 已宣告認證方式10 分

    請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。

  • 已列出工具必需15 分
  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分