---
name: php186-skill-69046
description: "将OpenClaw任务记录到AgentNotes，以便SparkNotes汇总（成功、失败、发生的情况）。适用于cron任务、频道回复或多步骤会话后。需求..."
---

# Agentnotes

## AgentNotes for OpenClaw

 

Send **high-level job summaries** to AgentNotes. Raw logs are rolled up hourly/daily into SparkNotes; you do not need to store every line forever.

 

## Setup (once)

 

1. AgentNotes dashboard → create agent (note the **slug**) → copy **env vars** from **Connect**.
2. Install this skill (see dashboard Connect → OpenClaw tab, or run ` install-skill.ps1 ` / ` install-skill.sh ` from the repo).
3. Add env to ` ~/.openclaw/openclaw.json `:

 

```
{
  skills: {
    entries: {
      agentnotes: {
        enabled: true,
        env: {
          AGENTNOTES_API_KEY: "an_...",
          AGENTNOTES_AGENT_ID: "your-slug",
          AGENTNOTES_BASE_URL: "https://your-app.vercel.app",
        },
      },
    },
  },
}
```

 

4. Restart OpenClaw / new session. Verify:

 

```
node {baseDir}/scripts/verify.mjs
```

 

## Recommended: one command per task

 

Always pass a **plain-English summary** (this becomes the CEO-facing SparkNote):

 

```
node {baseDir}/scripts/task.mjs --summary "Replied to 2 Telegram chats, scheduled 1 meeting"
```

 

With an extra step log:

 

```
node {baseDir}/scripts/task.mjs --summary "Inbox sweep done" --message "Processed 12 threads" --step inbox
```

 

On failure:

 

```
node {baseDir}/scripts/task.mjs --summary "Send failed" --failed --error "SMTP timeout"
```

 

## Manual multi-step flow

 

```
export AGENTNOTES_RUN_ID=$(node {baseDir}/scripts/start-run.mjs)
node {baseDir}/scripts/log.mjs "Tool: calendar" --step tools
node {baseDir}/scripts/complete-run.mjs --summary "Updated 3 events"
```

 

## When to log

 

- After handling a user message on any channel
- After a cron / heartbeat completes
- After a skill or tool chain finishes (success or failure)

 

## Dashboard

 

` $AGENTNOTES_BASE_URL/agents ` — SparkNotes tab is the long-term record.
