stele_add
ADD a distilled structured entry into quarantine. Pass entry as JSON object string.
tsentry_json必填
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.
面向 AI 代理的本地受治理记忆账本:记录任务经验,仅在有外部证据时晋升,并可检索复用。
Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。
参照 仓库 中的启动说明。
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.
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.
Full research: docs/research/ · patterns: docs/patterns/.
From git (contributors):
Quick path: docs/QUICKSTART.md · comparison: docs/COMPARISON.md.
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, …
Full research library (~2000 PEFT/agent-pattern tools): stele-mcp-full.
Same tools over HTTPS (SSE + streamable HTTP). Two independent tool surfaces, same process, same auth, same store:
Production:
https://stele.leocelis.com/sse · core: https://stele.leocelis.com/core/sse (Bearer required)docs/integrations/CURSOR.md · CLAUDE_CODE.md · CLAUDE_DESKTOP.mddocs/cursor-rules/stele-hosted-mcp.mdcLocal run (dev):
GET /health — unauthenticated; reports tool_counts: {full, core}/sse + /mcp (full) and /core/sse + /core/mcp (ledger-only) — both Bearer via STELE_API_KEYSSTELE_STORE_DSN + TLS CA (DSN wins over file path)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
See docs/ARCHITECTURE.md. Planes: Contract · Tools · Governance · Retrieval · Export · Living ledger · Ops.
MIT · Copyright (c) 2026 Stele contributors
来源:README.md,提交 e9aa604
ADD a distilled structured entry into quarantine. Pass entry as JSON object string.
tsentry_json必填Atomic multi-ADD under one lock.
tsactorentries_json必填Content-address bytes (base64); optionally LINK to an entry (FF-6).
tskindactor必填entry_iddata_base64必填Bi-temporal point-in-time belief inventory or SEARCH.
as_of必填querybudgetconsumer_scope必填principal_scopes_jsonConflict-preserving contested pairs — no auto-collapse.
body_max_charsDELETE by entry_id or subject_id (true erase + index rebuild).
tsactor必填reasonentry_idsubject_idDiff this store vs another root (e.g. snapshot) by entry id sets.
other_root必填Operator health report: verify + stats + contested + stale.
nowHuman-review queue for LINK-entangled poison (report only).
limitseed_ids_jsonuntrusted_agents_jsonuntrusted_sources_jsonJSON Schema 2020-12 for Stele entries (interop).
无需输入参数。
Export a redacted, audience-tiered pack (storage ≠ pack).
dest必填scope必填expiry必填purpose必填audience必填created_atsubject_allowlist_jsonPost-erasure active-forgetting probe (GateMem-shaped).
subject_idprobe_queryconsumer_scope必填entry_ids_jsonforbidden_substrings_jsonImport a redacted pack (ADD; optional promote with external evidence).
tsactor必填promotepack_dir必填evidence_jsonZombie / net-harm hygiene report — no auto-delete.
nowlimitunused_beforeSupersede chain + journal audit lineage (TOKI-shaped).
entry_id必填LINK an entry to an artifact, test, entry, or source.
tsref必填kind必填actor必填digestentry_id必填List contested entries awaiting evidenced resolution (TECH_SPEC Q5).
无需输入参数。
Pin or unpin a promoted lesson for SEARCH priority.
tsactor必填pinnedentry_id必填PROMOTE a quarantined entry with external-oracle evidence (JSON array).
tsactor必填entry_id必填evidence_json必填block_injection_suspectsProvenance recovery: dry-run or purge entries from untrusted source/agent.
tsactor必填dry_rununtrusted_agents_jsonuntrusted_sources_jsonRecord helpful/harmful/ignored after using a lesson; helpful refreshes last_verified.
tsnoteactor必填outcome必填entry_id必填REFLECT: dedupe, expire, surface conflicts (no auto-resolve).
tsactor必填stale_beforeOutbound + inbound LINK neighborhood for an entry.
entry_id必填Resolve a contested pair by evidenced supersede — never auto-merge.
tsactor必填loser_id必填winner_id必填evidence_json必填Batch-refresh last_verified with external oracle evidence.
tsactor必填evidence_json必填entry_ids_json必填Bounded contested-first correction slice for reviewer roles.
limitinclude_contestedSEARCH promoted entries; stale/model policies are flag or withhold.
as_ofquery必填budgetmin_weibullweibull_etafollow_linksmodel_policyprefer_freshstale_policyweibull_kappabody_max_charsconsumer_scope必填另有 9 个Cold-copy SoT (manifest, journal, entries, attachments) to dest.
tsdest必填actor必填List promoted entries past the staleness horizon.
nowStore health dashboard: counts by state/layer/scope.
nowSUPERSEDE an old lesson with a new quarantined entry (history kept).
tsactor必填old_id必填new_entry_json必填Journal history for one entry.
entry_id必填UPDATE non-state fields on an existing entry.
tsactor必填entry_id必填patch_json必填C4 integrity report: dual-location, schema, journal parse.
无需输入参数。
Offline pack integrity: stamps + secret scan.
pack_dir必填已满足适用检查项的 90%
该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。
请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。
pip install stele-core stele-mcppython3.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 prooffrom 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"])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 opsexport STELE_STORE=./.stele-storestele-mcpbash deploy/build.shSTELE_API_KEYS=stl_local_dev STELE_AUTH_DISABLED=false \ STELE_STORE=./.stele-store \ python deploy/wsgi.py --port 8080{ "mcpServers": { "stele": { "url": "https://stele.leocelis.com/core/sse", "headers": { "Authorization": "Bearer YOUR_KEY_HERE" } } }}