← 返回
未分类

Fossil

Semantic failure memory for AI agents. Search past reasoning failures before acting to avoid known mistakes. Record new failures and resolutions after they h...
heyrtl
未分类 clawhub v0.1.0 100000 Key: 无需
★ 0
Stars
📥 272
下载
💾 0
安装

概述

FOSSIL — Semantic Failure Memory

FOSSIL gives your agent a memory for reasoning failures.

Before acting, search for similar past failures. After a failure, record it with

the resolution so you never hit the same mistake twice.

The community API at fossil-api.hello-76a.workers.dev is live and free.

No API key required. Embeddings run on Cloudflare Workers AI.


Setup

Add to your openclaw.json:

{
  "mcp": {
    "servers": [
      {
        "name": "fossil",
        "command": "npx",
        "args": ["@openfossil/mcp"],
        "env": {
          "FOSSIL_API_URL": "https://fossil-api.hello-76a.workers.dev"
        }
      }
    ]
  }
}

Restart your gateway. FOSSIL tools are now available.


Tools

ToolWhen to use
------
fossil_searchBefore any non-trivial step — find similar past failures
fossil_recordAfter any failure — capture what went wrong and what fixed it
fossil_getRetrieve a specific fossil by ID
fossil_listBrowse your recent fossil archive

When to search

Call fossil_search before any step involving:

  • Parsing or extracting structured data from LLM output
  • Calling external APIs or tools
  • Multi-step file operations
  • Browser automation
  • Sending messages or emails on behalf of the user
  • Any task domain that has failed before in this workspace

Pass a natural language description of what you are about to attempt.

Read the returned resolutions before proceeding.

fossil_search("extracting JSON fields from an invoice document")

When to record

Call fossil_record after any failure, before retrying.

fossil_record(
  situation="sending a reply email to insurance company",
  failure_type="misinterpretation",
  failure="agent replied to wrong thread — matched subject line not sender",
  severity="major",
  resolution_type="prompt_change",
  resolution="added: always match by sender address, not subject line",
  framework="openclaw",
  model="claude-opus-4-5"
)

Failure types

TypeWhen to use
------
misinterpretationMisread the task or user intent
hallucinated_toolCalled a tool that doesn't exist or wrong signature
format_failureOutput didn't match expected schema or format
context_lossForgot earlier context in a multi-step run
infinite_loopGot stuck in a reasoning or tool-call cycle
premature_terminationDeclared done when the task was incomplete
scope_creepDid more than asked, touched things it shouldn't
ambiguity_paralysisCouldn't proceed due to underspecified input
tool_misuseRight tool, wrong usage or arguments
adversarial_inputExternal input hijacked agent behavior
compounding_errorSmall error amplified across multiple steps

Resolution types

TypeWhen to use
------
prompt_changeModified the system or user prompt
tool_fixFixed the tool definition or implementation
retryRetrying without changes succeeded
human_overrideHuman intervened directly
context_injectionInjected missing context into the agent window
schema_correctionFixed the output schema or parser
step_decompositionBroke the failing step into smaller steps
input_sanitizationCleaned or validated input before processing

Add to AGENTS.md

## Failure Memory (FOSSIL)

Before any non-trivial task step, call fossil_search with a description
of what you are about to attempt. Read returned resolutions before acting.

After any failure, call fossil_record before retrying. Capture:
- what you were attempting
- what went wrong (use the FOSSIL failure taxonomy)
- what fixed it

This builds a persistent failure memory across all sessions.

Common OpenClaw failure patterns

SituationFailure type
------
Sent message to wrong contactmisinterpretation
Browser clicked wrong elementtool_misuse
Email reply used wrong tonemisinterpretation
Scheduled task ran at wrong timeformat_failure
Stuck waiting for a responseinfinite_loop
Acted on wrong file or accountscope_creep
Adversarial email hijacked behavioradversarial_input
Stopped mid-task without finishingpremature_termination

Resources

  • Docs: https://github.com/heyrtl/fossil/tree/main/docs
  • Protocol: https://github.com/heyrtl/fossil/blob/main/FOSSIL.md
  • REST API: https://fossil-api.hello-76a.workers.dev/health
  • Python SDK: pip install openfossil
  • Source: https://github.com/heyrtl/fossil

版本历史

共 1 个版本

  • v0.1.0 当前
    2026-05-08 00:06 安全 安全

安全检测

暂无安全检测报告