技能版本 1.0.0
Agent Memory
为AI智能体提供持久记忆,用于跨会话存储事实、从行动中学习、回忆信息及追踪实体。
价格
免费
- 安装:免费
在组织开通时一次性收取;再次读取清单或下载不重复收费。
以上为公开标价。你的组织可能有协议价,以控制台显示的价格为准。
如何使用
为组织安装
开通即安装:组织固定使用开通时的版本(当前为 1.0.0)。升级到新版本需要取消后重新开通。
创建凭证
客户端使用组织凭证读取;绑定到数字人后,数字人使用绑定凭证按需加载。请求中携带:
Authorization: Bearer $ZGI_MARKET_KEY读取清单与安装包
清单列出版本、文件和校验值;安装包是一个 zip 文件。
读取清单 curl "https://market-api.zgi.im/v1/market/skills/agent-memory/manifest" \ -H "Authorization: Bearer $ZGI_MARKET_KEY"下载安装包 curl "https://market-api.zgi.im/v1/market/skills/agent-memory/package" \ -H "Authorization: Bearer $ZGI_MARKET_KEY" \ -o agent-memory.zip读取清单和下载安装包不计入用量。下载后请用响应头中的 SHA-256 校验文件。
技能说明
会运行代码Python
技能包内含脚本文件,加载技能的运行时可能会执行它们,安装前请先阅读。
SKILL.md 节选
# AgentMemory Skill
Persistent memory system for AI agents. Remember facts, learn from experience, and track entities across sessions.
## Installation
```bash
clawdhub install agent-memory
```
## Usage
```python
from src.memory import AgentMemory
mem = AgentMemory()
# Remember facts
mem.remember("Important information", tags=["category"])
# Learn from experience
mem.learn(
action="What was done",
context="situation",
outcome="positive", # or "negative"
insight="What was learned"
)
# Recall memories
facts = mem.recall("search query")
lessons = mem.get_lessons(context="topic")
# Track entities
mem.track_entity("Name", "person", {"role": "engineer"})
```
## When to Use
- **Starting a session**: Load relevant context from memory
- **After conversations**: Store important facts
- **After failures**: Record lessons learned
- **Meeting new people/projects**: Track as entities
## Integration with Clawdbot
Add to your AGENTS.md or HEARTBEAT.md:
```markdown
## Memory Protocol
On session start:
1. Load recent lessons: `mem.get_lessons(limit=5)`
2. Check entity context for current task
3. Recall relevant facts
On session end:
1. Extract durable facts from conversation
2. Record any lessons learned
3. Update entity information
```
## Database Location
Default: `~/.agent-memory/memory.db`
Custom: `AgentMemory(db_path="/path/to/memory.db")`技能包内容
共 11 个文件,合计 46.0 KiB
- README.md5.5 KiB
- SKILL.md1.4 KiB
- _meta.json131 B
- cli/entity.py3.5 KiB
- cli/fact.py3.4 KiB
- cli/learn.py2.3 KiB
- examples/basic_usage.py2.8 KiB
- requirements.txt48 B
- src/__init__.py212 B
- src/memory.py21.6 KiB
- tests/test_memory.py5.1 KiB
来源与审核
- 审核状态
- 尚未审核,内容来自上游来源
- 许可证
- 未说明
审核状态是平台对上架信息的记录,不构成对上游服务质量或可用性的担保。