← 返回
未分类

Agent Experience Graph

Use when an agent should learn from prior task-solving traces, recommend tools or skills for a new decomposed task, record reusable execution experience, or...
用于在代理应从先前任务解决痕迹中学习、向新分解任务推荐工具或技能、记录可重用执行经验等场景。
yao23 yao23 来源
未分类 clawhub v0.1.1 1 版本 100000 Key: 无需
★ 0
Stars
📥 284
下载
💾 0
安装
1
版本
#agent-learning#latest#skills#tools

概述

Agent Experience Graph

This is a portable agent capability, not a runtime-specific plugin. It should work in any agent environment that can read markdown instructions and run Python 3 scripts. Runtime-specific metadata lives outside this file:

  • capability.json: neutral capability manifest for launchers, registries, and importers
  • agents/openai.yaml: Codex UI metadata
  • adapters/README.md: install notes for Codex, Claude Code, OpenClaw, Hermes, and generic agents

Use this skill to turn prior agent runs into reusable guidance for new tasks. The core loop is:

  1. Describe the current task and likely subtasks.
  2. Retrieve similar solved traces.
  3. Recommend skills, tools, workflow patterns, and warnings.
  4. Apply only the recommendations that fit the current constraints.
  5. After the task, record a sanitized trace so future agents can learn from it.

Quick Workflow

Create a query with a task and optional subtasks:

{
  "task": "Build an ingestion pipeline for markdown API docs",
  "subtasks": [
    {"description": "Parse markdown into structured sections"},
    {"description": "Chunk content for coding-agent retrieval"},
    {"description": "Evaluate extracted endpoint metadata"}
  ]
}

Run the bundled recommender against a trace file:

python3 scripts/recommend_traces.py \
  --traces assets/example_traces.json \
  --query query.json

Use the output as evidence, not as an order. Prefer recommendations with:

  • successful or partially successful outcomes
  • matched subtasks, not only matched task titles
  • clear lessons or failure notes
  • skills/tools that are available in the current environment

Recording A Trace

After finishing a task, create a compact trace with no secrets, credentials, private user data, or proprietary snippets. Keep enough detail to support future retrieval:

{
  "id": "trace-2026-05-18-doc-ingestion",
  "task": "Build a structured ingestion demo for API documentation",
  "outcome": "success",
  "subtasks": [
    {
      "description": "Normalize markdown into sections",
      "skills": ["structured-ingestion"],
      "tools": ["python"],
      "outcome": "success",
      "lessons": ["Preserve headings and code blocks before chunking."]
    }
  ],
  "skills": ["structured-ingestion"],
  "tools": ["python", "ripgrep"],
  "lessons": ["Chunk metadata improves downstream retrieval."]
}

Append it to an existing trace library:

python3 scripts/recommend_traces.py \
  --traces traces.json \
  --append-trace new_trace.json

Interpretation Rules

  • Similarity is a hint. Always check whether the prior environment, constraints, and outcome match the current task.
  • A tool appearing in a trace does not prove it caused success. Prefer tools attached to matched successful subtasks.
  • Preserve negative evidence. Failed traces are useful when their lessons explain what to avoid.
  • When traces disagree, choose the recommendation with the closest subtask match and the best outcome evidence.
  • Do not expose raw traces from private workspaces. Share redacted summaries or derived recommendations.

Trace Schema

For field definitions and an example trace library, read references/trace_schema.md when creating new datasets, validators, or import/export adapters.

版本历史

共 1 个版本

  • v0.1.1 当前
    2026-05-21 14:40 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

ai-agent

self-improving agent

pskoett
捕获经验教训、错误及修正内容,以实现持续改进。适用于以下场景:(1)命令或操作意外失败;(2)用户纠正Claude(如“不,那不对……”“实际上……”);(3)用户请求的功能不存在;(4)外部API或工具出现故障;(5)Claude发现自身
★ 4,086 📥 813,941
ai-agent

Skill Vetter

spclaudehome
AI智能体技能安全预审工具。安装ClawdHub、GitHub等来源技能前,检查风险信号、权限范围及可疑模式。
★ 1,232 📥 268,188
ai-agent

Self-Improving + Proactive Agent

ivangdavila
自我反思+自我批评+自我学习+自组织记忆。智能体评估自身工作、发现错误并持续改进。
★ 1,385 📥 320,895