Skip to content
Back to search

evolve-marketplace

Evolve plugins for Claude Code - continuous improvement through auto-generated guidelines

Safety scan

A static text scan, not a guarantee. Select the badge to see what was scanned and every finding.

Checked today

Check it deeper on your machine

It has changed since its scan on 11 Nov 2026.

As a Claude Code plugin, install it and then ask Claude Code:

/plugin marketplace add keithmackay/mackayi/plugin install scanskillsafety@mackayiDo a deep scan of https://github.com/AgentToolkit/altk-evolve with scanskillsafety

Or from a terminal, clone it and run it:

git clone https://github.com/keithmackay/scanskillsafety-skill ~/.claude/skills/scanskillsafetynode ~/.claude/skills/scanskillsafety/cli.cjs --deep 'https://github.com/AgentToolkit/altk-evolve'

It checks the exact commit: every file, its packages against OSV (api.osv.dev), how it compares with this page's scan (findsafeskills.com receives the repository's address), and, if you agree, Claude reading every file with your own Claude subscription. It never runs the code.

Badge for your README
findsafeskills safety rating

Markdown

[![findsafeskills safety rating](/api/listings/agenttoolkit--altk-evolve/badge.svg)](/listings/agenttoolkit--altk-evolve)

HTML

<a href="/listings/agenttoolkit--altk-evolve"><img src="/api/listings/agenttoolkit--altk-evolve/badge.svg" alt="findsafeskills safety rating" /></a>

Install

i

Install instructions from the README

As written by the repo's author. findsafeskills has not verified these steps.

Installation

Prerequisites: - Python 3.12 or higher - `uv` (recommended) or `pip`

From Source

# Clone the repository and install dependencies
git clone https://github.com/agenttoolkit/altk-evolve.git
cd altk-evolve
uv venv --python=3.12 && source .venv/bin/activate
uv sync --package altk-evolve
# Build the UI
cd frontend/ui
npm ci && npm run build
cd ../..

From PyPI

pip install altk-evolve

**Choose your installation:**

- `altk-evolve` bundles `altk-evolve-core[server,cli,fastembed,tracing]` at the same version. - `altk-evolve-core` contains the Python implementation without server/CLI dependencies, an embedding runtime, or a Phoenix server. Libraries should depend on core and select the extras they need. - Add `[server]` for the HTTP/MCP server and its telemetry exporters, or `[cli]` for the command-line interface. `[telemetry]` provides the SDK and OTLP exporter independently; both `[server]` and `[tracing]` include it. Core retains the OpenTelemetry API so host applications can supply their own telemetry providers. - All extras belong to core. Existing `altk-evolve[pgvector]`, `[pii-semantic]`, and other extras forward to core while retaining the convenience defaults. - Install `altk-evolve-core[phoenix]` (or `altk-evolve[phoenix]`) only to run the local Phoenix server. Remote tracing uses the separate `arize-phoenix-otel` package.

Both packages use the same `altk_evolve` imports and `evolve` / `evolve-mcp` commands; only core owns those files. Core-only filesystem storage works without an embedding runtime. Features that embed text require `[fastembed]` or `[sentence-transformers]`.

**Embedding migration:** FastEmbed is now the default provider. To retain the previous runtime, install `altk-evolve-core[sentence-transformers]` and set `EVOLVE_EMBEDDING_PROVIDER=sentence_transformers`. Validate retrieval quality before switching an existing vector store to another runtime; changing models requires re-embedding stored vectors. The specialized `sbert_large` CodeRank metric requires an exported CodeRank ONNX artifact with FastEmbed, or the Sentence Transformers provider. `[fastembed-export]` includes both runtimes for that export.

**Source development and releases:** The root project is core. Use `uv sync --package altk-evolve` for the convenience bundle, or select root extras explicitly. After changing the version or extras, run `uv run --no-project python scripts/sync_convenience.py` and `uv lock`. `uv build --all-packages` builds both distributions. Releases publish core first, then the exactly matching convenience package through the same trusted publisher.

**Optional Backend Dependencies:**

The default filesystem backend uses simple text matching and requires no additional dependencies. For semantic vector similarity search, install one of these backends:

For PostgreSQL with pgvector support (recommended for production):

uv sync --extra pgvector

For Milvus support (optimized for large-scale vector search):

uv sync --extra milvus

See the [Backend Configuration Guide](docs/guides/backend-configuration.md) for detailed comparison and setup instructions.

Configuration

For direct OpenAI usage:

export OPENAI_API_KEY=sk-...

For LiteLLM proxy usage and model selection (including global fallback via `EVOLVE_MODEL_NAME`), see [the configuration guide](docs/guides/configuration.md).

Running Services

Start the Web UI and MCP server

uv run evolve-mcp

The Web UI can be accessed from: `http://127.0.0.1:8000/ui/`

Over stdio, `evolve-mcp` serves the Web UI and REST API on `127.0.0.1:8000` alongside MCP and logs the address at startup. The API has no authentication, so any local process can read and change memories through it. Pass `--no-dashboard` or set `EVOLVE_DASHBOARD=false` to run MCP alone.

Starting the Web UI and MCP Server

What was scanned

The files the safety scan read, as written by the repository's author and shown as plain text. Lines with a finding are marked.

.claude-plugin/marketplace.json · Manifest · 20 lines

View this file on GitHub (read at the repository's current version: the scan did not record which commit it read)

This file has changed since it was scanned, so this is not exactly the text that was scanned, and no line is marked. The findings are listed with the safety scan above.

  1. {
  2. "$schema": "https://anthropic.com/claude-code/marketplace.schema.json",
  3. "name": "evolve-marketplace",
  4. "description": "Evolve plugins for Claude Code - continuous improvement through auto-generated guidelines",
  5. "owner": {
  6. "name": "Vinod Muthusamy"
  7. },
  8. "plugins": [
  9. {
  10. "name": "evolve-lite",
  11. "description": "Recall, save, and share reusable Evolve entities.",
  12. "version": "1.1.0",
  13. "author": {
  14. "name": "AgentToolkit"
  15. },
  16. "source": "./platform-integrations/claude/plugins/evolve-lite",
  17. "category": "productivity"
  18. }
  19. ]
  20. }
README.md · README · 355 lines

View this file on GitHub (read at the repository's current version: the scan did not record which commit it read)

This file has changed since it was scanned, so this is not exactly the text that was scanned, and no line is marked. The findings are listed with the safety scan above.

  1. <div align="center">
  2. # Evolve: On‑the‑job learning for AI agents
  3. [![Python](https://img.shields.io/badge/python-3.12%2B-blue)](https://www.python.org/)
  4. ![Status](https://img.shields.io/badge/status-active-brightgreen)
  5. [![Documentation](https://shields.io/badge/Official%20Webpage-Documentation-blue)](https://agenttoolkit.github.io/altk-evolve)
  6. [![arXiv](https://img.shields.io/badge/arXiv-2603.10600-b31b1b)](https://arxiv.org/pdf/2603.10600)
  7. [![arXiv](https://img.shields.io/badge/arXiv-2609.32091-b31b1b)](https://arxiv.org/abs/2609.32091)
  8. [![License](https://img.shields.io/github/license/AgentToolkit/altk-evolve)](https://www.apache.org/licenses/LICENSE-2.0)
  9. ![Stars](https://img.shields.io/github/stars/AgentToolkit/altk-evolve?style=social)
  10. </div>
  11. Evolve helps AI agents learn from experience. It turns past trajectories into reusable guidelines that help agents complete future tasks, without changing model weights.
  12. The Lite version is designed to effortlessly slot into existing agent assistants like Claude Code and Codex. The full service uses a combination of an MCP server for tool integration, vector storage for memory, and LLM-based conflict resolution to refine its knowledge base. It also supports guideline consolidation, clustering related guidelines and merging equivalent advice while preserving support counts and source provenance.
  13. On AppWorld's held-out test split, a GPT-4.1 ReAct agent with Evolve increased scenario completion from **50.0% to 64.3% (+14.3 percentage points)**. [See the evaluation protocol and results](https://agenttoolkit.github.io/altk-evolve/results/#generalization-to-unseen-tasks).
  14. ## Research highlights
  15. | Finding | Reported result |
  16. |---|---|
  17. | [More repeatable success](https://agenttoolkit.github.io/altk-evolve/results/#repeat-run-consistency) | AppWorld tasks passing all five attempts increased from **53% to 66%**, using sibling-task guidelines with GPT-4.1. |
  18. | [Efficient learning](https://agenttoolkit.github.io/altk-evolve/results/#model-coverage-and-efficiency) | With gpt-oss-120b, AppWorld task completion increased from **39.9% to 56.0%** using curated retrieval. |
  19. | [Lifts frontier and non-frontier models](https://agenttoolkit.github.io/altk-evolve/results/#customer-service-tasks) | On τ²-bench, Evolve lifts both frontier and non-frontier models (held-out Pass^4: GPT-5.5 **55% → 70%**; GPT-4.1 **57.5% → 67.5%**). |
  20. These are separate benchmark experiments with different metrics, models, and memory configurations. Follow each link for its evaluation protocol and sources.
  21. > [!IMPORTANT]
  22. > ⭐ **Star the repo**: it helps others discover it.
  23. ## Latest from Evolve
  24. Research, releases, and practical findings from the Evolve team.
  25. <!-- BEGIN LATEST-UPDATES (generated; edit includes/latest-updates.md then run scripts/sync_latest_updates.py) -->
  26. - **2026-10-20** · Article — **[ALTK-Evolve: How learned memory tops the τ²-bench leaderboard on customer service tasks without a frontier model](https://huggingface.co/blog/ibm-research/altk-evolve-bc)**
  27. Learned guidelines raise GPT-4.1's held-out retail Pass^4 from 57.5% to 67.5%; the article also compares pending custom submissions with an October 12 leaderboard snapshot.
  28. - **2026-09-25** · Paper — **[Memory as Middleware for Self-Improving AI Agents](https://arxiv.org/abs/2609.32091)**
  29. The case for agent memory as a pluggable middleware layer, with Evolve as the reference implementation (to appear at [Middleware 2026](https://middleware-conf.github.io/2026)).
  30. - **2026-09-15** · Article — **[Your Agent Aced the Task. Will It Do It Again?](https://huggingface.co/blog/ibm-research/altk-evolve-consistency)**
  31. Diagnosing where an agent's decisions wobble and stabilizing them so success repeats.
  32. - **2026-09-08** · Paper — **[Closing the Consistency Gap: Self-Evolving Agents That Learn to Stay on Course](https://arxiv.org/abs/2609.08832)**
  33. Turning unstable trajectory steps into episodic memory to keep agents consistent across repeated runs.
  34. - **2026-08-18** · Article — **[How Much Memory Does Your Agent Actually Need?](https://huggingface.co/blog/ibm-research/altk-evolve-hmm)**
  35. Why agent memory should be calibrated to the model instead of simply increased.
  36. - **2026-08-11** · Article — **[Thinking of ACE? We Can Do It with Fewer Tokens](https://huggingface.co/blog/ibm-research/altk-evolve-sldd)**
  37. Comparing Evolve's targeted guideline retrieval with ACE's playbook approach and token usage.
  38. - **2026-04-08** · Article — **[ALTK‑Evolve: On‑the‑Job Learning for AI Agents](https://huggingface.co/blog/ibm-research/altk-evolve)**
  39. An introduction to learning reusable guidance from agent trajectories.
  40. - **2026-04-07** · Announcement — **[IBM introduces ALTK Evolve](https://www.ibm.com/new/announcements/altk-evolve-on-the-job-learning-for-ai-agents)**
  41. Evolve is opened to builders creating agents that learn from experience.
  42. - **2026-03-11** · Paper — **[Trajectory-Informed Memory Generation for Self-Improving Agent Systems](https://arxiv.org/abs/2603.10600)**
  43. The research framework and evaluation underlying Evolve.
  44. <!-- END LATEST-UPDATES -->
  45. ## Quick Start (Lite)
  46. [IBM Bob →](https://agenttoolkit.github.io/altk-evolve/examples/hello_world/bob/)
  47. [Claude Code →](https://agenttoolkit.github.io/altk-evolve/examples/hello_world/claude)
  48. [Codex →](https://agenttoolkit.github.io/altk-evolve/examples/hello_world/codex/)
  49. [Hermes →](https://agenttoolkit.github.io/altk-evolve/integrations/hermes/)
  50. ## Quick Start (Evolve MCP Server)
  51. ### Installation
  52. Prerequisites:
  53. - Python 3.12 or higher
  54. - `uv` (recommended) or `pip`
  55. From Source
  56. ```bash
  57. # Clone the repository and install dependencies
  58. git clone https://github.com/agenttoolkit/altk-evolve.git
  59. cd altk-evolve
  60. uv venv --python=3.12 && source .venv/bin/activate
  61. uv sync --package altk-evolve
  62. # Build the UI
  63. cd frontend/ui
  64. npm ci && npm run build
  65. cd ../..
  66. ```
  67. From PyPI
  68. ```bash
  69. pip install altk-evolve
  70. ```
  71. **Choose your installation:**
  72. - `altk-evolve` bundles `altk-evolve-core[server,cli,fastembed,tracing]` at the same version.
  73. - `altk-evolve-core` contains the Python implementation without server/CLI dependencies,
  74. an embedding runtime, or a Phoenix server. Libraries should depend on core and select the extras they need.
  75. - Add `[server]` for the HTTP/MCP server and its telemetry exporters, or `[cli]`
  76. for the command-line interface. `[telemetry]` provides the SDK and OTLP exporter
  77. independently; both `[server]` and `[tracing]` include it. Core retains the OpenTelemetry API so host applications
  78. can supply their own telemetry providers.
  79. - All extras belong to core. Existing `altk-evolve[pgvector]`, `[pii-semantic]`, and
  80. other extras forward to core while retaining the convenience defaults.
  81. - Install `altk-evolve-core[phoenix]` (or `altk-evolve[phoenix]`) only to run the
  82. local Phoenix server. Remote tracing uses the separate `arize-phoenix-otel` package.
  83. Both packages use the same `altk_evolve` imports and `evolve` / `evolve-mcp` commands;
  84. only core owns those files. Core-only filesystem storage works without an embedding
  85. runtime. Features that embed text require `[fastembed]` or `[sentence-transformers]`.
  86. **Embedding migration:** FastEmbed is now the default provider. To retain the
  87. previous runtime, install `altk-evolve-core[sentence-transformers]` and set
  88. `EVOLVE_EMBEDDING_PROVIDER=sentence_transformers`. Validate retrieval quality before
  89. switching an existing vector store to another runtime; changing models requires
  90. re-embedding stored vectors.
  91. **Source development and releases:** The root project is core. Use
  92. `uv sync --package altk-evolve` for the convenience bundle, or select root extras
  93. explicitly. After changing the version or extras, run
  94. `uv run --no-project python scripts/sync_convenience.py` and `uv lock`.
  95. `uv build --all-packages` builds both distributions. Releases publish core first,
  96. then the exactly matching convenience package through the same trusted publisher.
  97. **Optional Backend Dependencies:**
  98. The default filesystem backend uses simple text matching and requires no additional dependencies. For semantic vector similarity search, install one of these backends:
  99. For PostgreSQL with pgvector support (recommended for production):
  100. ```bash
  101. uv sync --extra pgvector
  102. ```
  103. For Milvus support (optimized for large-scale vector search):
  104. ```bash
  105. uv sync --extra milvus
  106. ```
  107. See the [Backend Configuration Guide](docs/guides/backend-configuration.md) for detailed comparison and setup instructions.
  108. ### Configuration
  109. For direct OpenAI usage:
  110. ```bash
  111. export OPENAI_API_KEY=sk-...
  112. ```
  113. For LiteLLM proxy usage and model selection (including global fallback via `EVOLVE_MODEL_NAME`), see [the configuration guide](docs/guides/configuration.md).
  114. ### Running Services
  115. Start the Web UI and MCP server
  116. ```bash
  117. uv run evolve-mcp
  118. ```
  119. The Web UI can be accessed from: `http://127.0.0.1:8000/ui/`
  120. Over stdio, `evolve-mcp` serves the Web UI and REST API on `127.0.0.1:8000` alongside MCP and logs the address at startup. The API has no authentication, so any local process can read and change memories through it. Pass `--no-dashboard` or set `EVOLVE_DASHBOARD=false` to run MCP alone.
  121. ### Starting the Web UI and MCP Server
  122. If you only want to access the Web UI and API (without the MCP server stdio blocking the terminal), you can run the FastAPI application directly using `uvicorn`:
  123. ```bash
  124. uv run uvicorn altk_evolve.frontend.mcp.mcp_server:app --host 127.0.0.1 --port 8000
  125. ```
  126. Then navigate to `http://127.0.0.1:8000/ui/`.
  127. ### Starting only the MCP Server
  128. If you're attaching Evolve to an MCP client that requires a direct command (like Claude Desktop):
  129. ```bash
  130. uv run evolve-mcp --no-dashboard
  131. ```
  132. Or for SSE transport:
  133. ```bash
  134. uv run evolve-mcp --transport sse --port 8201
  135. ```
  136. Verify it's running:
  137. ```bash
  138. npx @modelcontextprotocol/inspector@latest http://127.0.0.1:8201/sse --cli --method tools/list
  139. ```
  140. **Available tools:**
  141. - `get_entities(task: str, entity_type: str = "guideline", include_public: bool = False)`: Get relevant entities for a specific task. Set `include_public=True` to merge in public entities from all other namespaces; those results are annotated with `[public: {owner_id}]`.
  142. - `get_guidelines(task: str)`: Get relevant guidelines for a specific task (backward compatibility alias for `get_entities`).
  143. - `get_guidelines_with_attribution(task: str)`: Return formatted guidelines with the entity IDs used to build the prompt.
  144. - `get_relevant_guidelines(task: str, top_k: int | None, core_support: int | None)`: Retrieve the always-on guideline core plus a task-relevant dosage.
  145. - `list_entities(...)`: Return structured, filtered, cursor-paginated entity inventory for user and administrative UIs.
  146. - `get_entity(entity_id: str, user_id: str | None, record_access: bool = True)`: Return one structured entity, enforcing ownership when a caller ID is supplied.
  147. - `patch_entity_metadata(entity_id: str, metadata_patch: str, user_id: str | None)`: Merge JSON metadata through the memory hook seam.
  148. - `record_access(entity_ids: list[str], accessed_at: str | None)`: Explicitly stamp the retention engine's `last_accessed` signal.
  149. - `validate_retention_policy(policy: str)`: Validate and normalize a JSON retention policy without scanning data.
  150. - `put_retention_policy(policy_id: str, name: str, policy: str, ...)`: Create or replace an Evolve-owned retention policy.
  151. - `get_retention_policy(policy_id: str)` / `list_retention_policies()`: Read the namespace's policy catalog for operators and management UIs.
  152. - `run_retention(policy_id: str, dry_run: bool = True, ...)`: Dry-run or apply a stored policy and persist a structured, entity-linked report.
  153. - `list_retention_runs(...)`: Read namespace-scoped retention run history, optionally filtered by agent or policy.
  154. - `get_compliance_status()`: Report backend health, retention availability, hook coverage, and configured plugin health.
  155. - `save_trajectory(trajectory_data: str, task_id: str | None, owner_id: str | None)`: Save a conversation trajectory and generate new guidelines.
  156. - `create_entity(content: str, entity_type: str, metadata: str | None, enable_conflict_resolution: bool, owner_id: str | None, visibility: str = "private")`: Create a single entity. Pass `visibility="public"` and `owner_id` to make it immediately discoverable by other namespaces.
  157. - `publish_entity(entity_id: str, user_id: str | None)`: Make an entity publicly visible to all namespaces. Records the caller as owner and stamps `published_at`.
  158. - `unpublish_entity(entity_id: str, user_id: str | None = None)`: Revert an entity to private visibility. Ownership is enforced server-side: if the entity has an `owner_id`, `user_id` must match it.
  159. - `delete_entity(entity_id: str)`: Delete a specific entity by its ID.
  160. ### Filter Migration Note
  161. Entity search filters reserve bare keys for top-level schema columns only: `id`, `type`, `content`, and `created_at`.
  162. If you need to filter on JSON metadata, use the `metadata.<key>` form. For example, use `filters={"type": "trajectory", "metadata.task_id": "123"}` instead of `filters={"type": "trajectory", "task_id": "123"}`.
  163. Existing integrations that stored custom fields in entity metadata should update filter writers to add the `metadata.` prefix for those keys.
  164. ## Features
  165. - **Proactive**: Learns how to recognize problems and their solutions, and generates guidelines that get automatically applied to new tasks.
  166. - **Conflict Resolution**: Update existing guidelines when new information contradicts them.
  167. - **On Command**: An array of tools to manage guidelines whether in the agent or through a CLI
  168. - **Sharing**: Publish individual entities so other agents can discover and retrieve them across namespaces.
  169. ## Architecture
  170. Evolve is built on a modular architecture which forms a feedback loop, taking conversation traces (trajectories) from an agent, extracting key insights into a database, feeding it back into the agent.
  171. _Lite Mode omits the Interaction layer. All activity is performed in-agent_
  172. <picture>
  173. <source media="(prefers-color-scheme: dark)" srcset="docs/assets/architecture-wide-dark.svg">
  174. <img src="docs/assets/architecture-wide-light.svg" alt="Architecture" width="480">
  175. </picture>
  176. ## Entity Sharing
  177. Evolve supports sharing entities across namespaces using a simple public/private visibility model.
  178. **Visibility** is stored in each entity's metadata and is private by default. Existing entities without a `visibility` field are unaffected.
  179. | Metadata field | Description |
  180. |---|---|
  181. | `owner_id` | User ID who created or last published the entity |
  182. | `visibility` | `"private"` (default) or `"public"` |
  183. | `published_at` | ISO-8601 timestamp of the most recent publish |
  184. ### MCP Tools
  185. **Personal facts on a shared Evolve service:**
  186. ```python
  187. store_user_facts(namespace_id="service-instance-1", user_id="alice", message="I prefer concise answers")
  188. retrieve_user_facts(namespace_id="service-instance-1", user_id="alice", query="answer preferences")
  189. ```
  190. Pass the service instance ID as `namespace_id` and the individual user's ID as
  191. `user_id` on both calls. Explicitly scoped retrieval filters by that exact pair,
  192. including query fallback, and never falls back to another user's facts. Empty
  193. explicit namespaces or user IDs are rejected. Calls omitting `namespace_id`
  194. retain the configured default namespace and legacy default-user fallback.
  195. Integrating clients must supply the scope; upgrading Evolve alone cannot infer
  196. which service instance an unscoped request belongs to.
  197. **Publishing an entity:**
  198. ```python
  199. publish_entity(entity_id="42", user_id="alice")
  200. ```
  201. Sets `visibility=public` and records the owner and publish timestamp.
  202. **Unpublishing:**
  203. ```python
  204. unpublish_entity(entity_id="42", user_id="alice")
  205. ```
  206. Reverts the entity to private. The entity stays in its namespace — only its visibility changes.
  207. **Retrieving public entities from all namespaces:**
  208. ```python
  209. get_entities(task="write safer code", include_public=True)
  210. ```
  211. Merges results from the caller's namespace with public entities from all other namespaces. Public results are annotated with `[public: {owner_id}]`.
  212. **Creating an entity with visibility:**
  213. ```python
  214. create_entity(content="...", entity_type="guideline", visibility="public", owner_id="alice")
  215. ```
  216. ### What's deferred (Phase 1C)
  217. REST API endpoints (`GET /api/entities/public`, publish/unpublish routes) and UI controls are not yet implemented.
  218. ## Guideline Provenance
  219. Evolve automatically tracks the origin of every guideline it generates or stores. Every guideline entity contains `metadata` identifying its source:
  220. - `creation_mode`: Identifies how the guideline was created (`auto-phoenix` via trace observability, `auto-mcp` via trajectory saving tools, or `manual`).
  221. - `source_task_id`: The ID of the original trace or task that inspired the guideline, providing full auditability.
  222. See the [Low-Code Tracing Guide](docs/guides/low-code-tracing.md#6-understanding-guideline-provenance-metadata) for more details.
  223. ## Contributing, Community, and Feedback
  224. Evolve is an active project, and real‑world usage helps guide its direction.
  225. If you’re experimenting with Evolve or exploring on‑the‑job learning for agents, feel free to open an issue or discussion to share use cases, ideas, or feedback.
  226. See the [Contributing Guide](CONTRIBUTING.md) to understand our development process, or how to submit changes, report bugs, or propose features.
  227. ### Embedded memory API and scheduling
  228. Hosts can mount the [scoped REST router](docs/guides/embedded-memory-api.md) with their own client and authentication dependencies. Evolve owns [retention schedules and worker execution](docs/guides/retention-scheduling.md), using Kubernetes-compatible cron, timezone, concurrency, deadline, and suspension fields. Use `evolve retention schedules` to manage schedules and `start`/`stop` to enable or suspend them. The Evolve service owns background execution.
  229. The [public retention service](docs/guides/retention-api.md) is available as `client.retention(namespace_id, agent_id=...)`; CLI, REST, MCP, and scheduling share its operations and scope checks.
  230. ### OpenTelemetry service instrumentation
  231. Evolve's Python operations use the OpenTelemetry API and inherit the host's
  232. provider. Constructing `EvolveClient` never installs or replaces a provider.
  233. Standalone MCP services export telemetry by default. Compatible SDK and exporter
  234. versions are included in the `[server]` and `[tracing]` extras (both included by
  235. the convenience package). To configure a destination:
  236. ```bash
  237. uv pip install altk-evolve
  238. export OTEL_SERVICE_NAME=evolve
  239. export OTEL_EXPORTER_OTLP_ENDPOINT=http://otel-collector:4318
  240. export OTEL_EXPORTER_OTLP_PROTOCOL=http/protobuf
  241. python -m altk_evolve.frontend.mcp --transport sse
  242. ```
  243. Without an endpoint setting, the OTLP exporter uses localhost:4318. Export runs
  244. in the background with bounded queues; an absent collector does not block memory
  245. operations. Unsent telemetry may be dropped. Requests default to a one-second
  246. export timeout, overridable through standard OTEL timeout settings. Set
  247. `EVOLVE_OTEL_ENABLED=false` to disable Evolve-owned export. If exporter packages
  248. cannot be imported, Evolve logs a warning and continues without an exporter.
  249. Invalid exporter configuration also logs a warning and leaves service startup
  250. unaffected; correct the settings and retry initialization to enable export.
  251. Use an actual reachable collector address. OpenLIT and other OTLP backends are
  252. supported without their SDKs. This exporter uses HTTP/protobuf; the signal-specific
  253. `OTEL_EXPORTER_OTLP_TRACES_ENDPOINT` and `OTEL_EXPORTER_OTLP_METRICS_ENDPOINT`
  254. include `/v1/traces` and `/v1/metrics`, respectively. Standard resource, sampling,
  255. batch-size, export-timeout and metric-interval environment settings apply.
  256. `OTEL_TRACES_EXPORTER=none` and `OTEL_METRICS_EXPORTER=none` disable each exporter;
  257. `OTEL_SDK_DISABLED=true` prevents Evolve's service initialization. An existing
  258. host tracer provider is left untouched, including ownership of its shutdown.
  259. Custom service hosts can explicitly call `configure_service_telemetry()` from
  260. `altk_evolve.telemetry` at startup. The SDK installs process-exit shutdown hooks;
  261. the MCP lifespan does not synchronously flush or wait for a collector.
  262. Spans cover memory search, query embeddings and PostgreSQL retrieval, write
  263. preparation/commit, fact extraction and conflict resolution, model calls,
  264. processing stages/processors, active hooks, and retention marking/sweeping/jobs.
  265. FastMCP propagates MCP trace metadata; the scoped REST router accepts W3C trace
  266. headers. Independent scheduled attempts start separate traces with job references.
  267. Duration histograms and outcome counters have bounded operation/result labels,
  268. never namespace, user, conversation or entity IDs. Namespace attribution belongs
  269. on spans. Evolve's instrumentation excludes contents, prompts, SQL values and
  270. exception messages. Evolve-owned export forwards Evolve's instrumentation and
  271. sanitized FastMCP transport spans that retain timing, IDs, kind and status code
  272. to preserve the trace tree. Transport names are fixed; attributes, exception
  273. events, links and status descriptions are omitted. Metrics only forward the
  274. `altk_evolve` scope. A host-owned provider controls
  275. its own exporters and third-party capture settings.
  276. Traces are diagnostic and may be sampled; durable retention receipts remain the
  277. authoritative audit record.
  278. MCP clients must send `notifications/cancelled` to cancel server work; stopping a
  279. local wait alone does not cancel the request. Evolve checks cooperative
  280. cancellation around model calls and before committing prepared memory writes.
  281. An in-flight provider call may still finish, and earlier committed writes remain.
  282. These checkpoints do not provide rollback or interrupt arbitrary synchronous work.

Ratings and comments

Sign in to rate this skill.

Sign in

Free to use. If it’s helped, pass it on.