learn_from_attempts
Store a lesson AFTER any non-trivial task (deploy, debug, fix, decision); future sessions recall it. instance_id may be omitted; the configured instance is used — never guess one. If the topic already exists, the write is an UPDATE and REQUIRES grund (one line: WHY the previous version was wrong) — without it the update is rejected. A conflicting outcome triggers a contradiction warning. Example: learn_from_attempts(topic="deploy:api", outcome="success", what_worked="PORT 3095 SERVES WHISPER — nohup docker compose up -d", severity="critical")
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"topic": "<topic>",
"outcome": "<outcome>",
"what_worked": "<what_worked>"
},
"name": "learn_from_attempts"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| tags | No | Topic tags for filtering (e.g. ["bash", "deploy", "env"]) | |
| group | No | Optional sub-team scope, e.g. "backend". Only that group and admins see it. Independent of visibility. | |
| grund | No | One line: WHY the previous version was wrong, like a commit message. REQUIRED when the topic already exists; optional on first write. | |
| topic | Yes | Short slug, e.g. "deploy:web", "debug:redis-tls", "fix:generate-series" | |
| author | No | Who is storing this lesson, e.g. "alice". Enables cross-author reuse tracking. | |
| context | No | The SYMPTOM in the words someone would search for, before they knew the fix ("deploy stuck, rollout not finishing"). Plus error messages and root cause. Optional but high-value: it is what closes the gap between the question and the answer. | |
| ersetzt | No | Topic slug of an OLDER lesson this one refutes. The old one is suppressed in smart_recall and shows a "superseded" banner. | |
| gilt_ab | No | ISO date since when the FACT is true (vs. when written). Omit if unknown. A replacement sets gilt_bis on the old lesson (then shown as history). About the fact, NOT an age decay. | |
| outcome | Yes | Did it work? | |
| service | No | Service or system this lesson concerns, e.g. "prometheus", "auth-service". | |
| commands | No | Commands that worked or failed (e.g. ["rsync -avz ...", "docker compose up -d"]) | |
| severity | No | Impact severity: critical (blocks work/deploy), major (significant slowdown), minor (nice to know). Default: major. | |
| gilt_fuer | No | Version scope of the FACT, package@range, all must hold: ["next@<15", "react@>=18 <19", "go@>=1.22", "python:fastapi@<0.110"]. Recall ranks a lesson that does not fit the project versions last, marked, never hidden; unknown = no change. Omit on update to keep, [] clears. | |
| depends_on | No | Prerequisites, e.g. ["node:>=20", "docker:running"]. A stale one flags dependent lessons for review. | |
| file_paths | No | Files involved in this lesson (e.g. ["infra/deploy.sh", ".env"]) | |
| visibility | No | Who can see it: "team" (default) = all members, "private" = only via exact recall_best_solution, "public" = same as team for now. | |
| instance_id | No | UUID of the cache instance. | |
| what_failed | No | What did NOT work (optional but valuable) | |
| what_worked | Yes | What solved it. LEAD WITH THE DECISIVE FACT (the number, address, command) in the first 100 characters — briefings truncate there. | |
| service_kind | No | "service" (default) for an application, "system" for infrastructure like prometheus or redis. |