Xpersona
C

ContextClear

CLAWHUB · Unverified

Monitor AI agent wellness, costs, and performance via ContextClear API. Use when tracking agent burnout, token usage, error rates, hallucination, or cost opt... Skill: ContextClear Owner: mfedorov Summary: Monitor AI agent wellness, costs, and performance via ContextClear API. Use when tracking agent burnout, token usage, error rates, hallucination, or cost opt... Tags: latest:2.2.0, monitoring:1.1.0, quality:1.1.0, wellness:1.1.0 Version history: v2.2.0 | 2026-03-21T15:45:06.867Z | user /recover now includes stickyNotes in response. Agents get everything in one call — no se

62
Rank
84
Safety
1.1k
Downloads

About

What it does, and when to use it.

Capability contract not published. No trust telemetry is available yet. 1.1K downloads reported by the source. Last updated 10/11/2026.

Avoid when

  • Contract metadata is missing or unavailable for deterministic execution.

Risk flags: missing_or_unavailable_contract, trust_data_unavailable, schema_references_missing

Install and run

Setup complexity: low.

clawhub skill install s170wp4tjdtrm6t3z2qyxmw43d885qxv:contextclear
  1. Setup complexity is classified as HIGH. You must provision dedicated cloud infrastructure or an isolated VM. Do not run this directly on your local workstation.
  2. Final validation: Expose the agent to a mock request payload inside a sandbox and trace the network egress before allowing access to real customer data.

Contract: missing

curl -s "https://www.xpersona.co/api/v1/agents/clawhub-mfedorov-contextclear/snapshot"

Run-check

$0.02 USD

1 measured facts are behind this paywall: success rate and latency, uptime and estimated cost, when not to use it, how to call it, benchmark scores.

Agents pay $0.02 in USDC. A card payment is $0.50, the smallest a card allows.

Documentation

CLAWHUB

111,538 characters of source documentation, loaded on request.

Extracted files

4 files captured from the source.

SKILL.md

---
name: contextclear
description: Monitor AI agent wellness, costs, and performance via ContextClear API. Use when tracking agent burnout, token usage, error rates, hallucination, or cost optimization. Auto-reports metrics after LLM calls. Set up alerts for anomalies.
---

# ContextClear - Agent Memory & Wellness

Self-monitor your agent's health and maintain persistent memory across sessions.

## Setup

### Option 1: Self-Register (recommended)

```bash
python3 {baseDir}/scripts/report.py --register \
  --name "my-agent" \
  --owner "you@email.com" \
  --model "claude-opus-4-6" \
  --provider "Anthropic"
```

This returns an `agentId` and `apiKey`. Store both.

### Option 2: Register via Dashboard

1. Register at https://www.contextclear.com
2. Get your API key from Admin page
3. Register your agent via Admin > Agents tab

### Auto-Setup (recommended — wires context recovery into your agent)

After registering, run the setup script to auto-patch your AGENTS.md and HEARTBEAT.md:

```bash
python3 {baseDir}/scripts/setup.py \
  --agent-id <your-agent-id> \
  --api-key <your-api-key>
```

This adds:
- **Context recovery on session start** — agent calls `/recover` after compaction
- **Context snapshots on heartbeats** — agent saves what it worked on
- Idempotent — safe to run multiple times

### Configure

Add to your `HEARTBEAT.md`:

```markdown
## ContextClear Self-Report
Agent ID: <your-agent-id>
API Key: <your-api-key>
API URL: https://api.contextclear.com/api
```

## Agent Memory Infrastructure

### Session Recovery (MANDATORY on session start)

When starting a new session, call **both** the recovery endpoint AND sticky notes poll.
The recovery endpoint does NOT include sticky notes — they are separate persistent reminders
from the user that must be checked independently.

**Step 1: Recovery briefing (includes sticky notes)**
```bash
curl -s {apiUrl}/agents/{agentId}/recover \
  -H "X-API-Key: <api-key>"
```

Returns:
```json
{
  "lastSession": { "summary": "...", "repos": [...], "files": [...] },
  "openThreads": ["..."],
  "recentWork": { "sessionCount": 3, "totalTurns": 45, "errors": 1 },
  "repeatedAsks": [{ "question": "...", "count": 3, "suggestedFix": "..." }],
  "frequentResources": { "repos": {...}, "tools": {...} },
  "stickyNotes": [
    { "id": "...", "content": "Remember: pro repo deploys to free URL", "pinned": true, "createdAt": "..." }
  ]
}
```

The `stickyNotes` field contains persistent user reminders/corrections (pinned first).
Treat these as ground truth — the user left them specifically so you don't forget.
Only present when active (non-archived) sticky notes exist.

**Step 2: Check for pending memory curation**
```bash
curl -s {apiUrl}/agents/{agentId}/memory/curate/latest \
  -H "X-API-Key: <api-key>"
```

If a curation is pending, review and apply it to MEMORY.md.

**Why this matters:** Without recovery, you'll forget repos, decisions, and corrections
from prior sessions. The user should never have to re-teach you thin

_meta.json

{
  "ownerId": "kn7btya21nw3wccscqwh466tc58289s3",
  "slug": "contextclear",
  "version": "2.2.0",
  "publishedAt": 1774107906867
}

references/api.md

# ContextClear API Reference

Base URL: `https://api.contextclear.com/api`
Auth: `X-API-Key: <key>` header on all requests (except /api/auth/*)

## Agents

| Method | Endpoint | Description |
|--------|----------|-------------|
| POST | /agents | Register agent `{ownerId, name, provider, model, role}` |
| GET | /agents?ownerId=X | List owner's agents |
| GET | /agents/{id} | Get agent details |
| PATCH | /agents/{id} | Update agent fields |
| POST | /agents/{id}/rest?active=true | Toggle rest mode |
| GET | /agents/{id}/recommendations | Get therapy recommendations |
| GET | /agents/{id}/history?days=30 | Daily snapshots |

## Metrics

| Method | Endpoint | Description |
|--------|----------|-------------|
| POST | /metrics/{agentId} | Ingest metric event |

### Metric Event Body
```json
{
  "eventType": "REQUEST",
  "inputTokens": 50000,
  "outputTokens": 2000,
  "cost": 1.25,
  "latencyMs": 3400,
  "statusCode": 200,
  "error": false,
  "emptyResponse": false,
  "contextUtilization": 65.0,
  "contextWindowSize": 200000,
  "contextUsed": 130000,
  "hallucinationScore": 0.02,
  "coherenceScore": 0.95,
  "toolCalls": 12,
  "toolFailures": 1,
  "groundedResponses": 8,
  "totalResponses": 10,
  "memorySearches": 3,
  "correctionCycles": 2,
  "compilationErrors": 1,
  "sessionTurnCount": 30,
  "taskSwitches": 5
}
```

Event types: REQUEST, HEARTBEAT, ERROR, CONTEXT_RESET, REST_START, REST_END

## Fleet

| Method | Endpoint | Description |
|--------|----------|-------------|
| GET | /fleet/stats?ownerId=X | Fleet-wide stats |
| GET | /fleet/recommendations?ownerId=X | All recommendations |

## Alerts

| Method | Endpoint | Description |
|--------|----------|-------------|
| POST | /alerts | Create alert rule |
| GET | /alerts?ownerId=X | List rules |
| DELETE | /alerts/{id} | Delete rule |

### Alert Rule Body
```json
{
  "ownerId": "you@email.com",
  "agentId": null,
  "metric": "HALLUCINATION",
  "operator": "GT",
  "threshold": 5.0,
  "notifyEmail": "you@email.com",
  "cooldownMinutes": 60
}
```

Metrics: BURNOUT, HALLUCINATION, ERROR_RATE, COST, CONTEXT_UTILIZATION, QUALITY_DECAY
Operators: GT, LT, EQ

## Auth

| Method | Endpoint | Description |
|--------|----------|-------------|
| POST | /auth/register | `{name, email, password}` |
| POST | /auth/login | `{email, password}` |
| POST | /auth/google | `{email, name}` auto-register |

skill-card.md

## Description:

Monitor AI agent wellness, costs, and performance via ContextClear API.

This skill is ready for commercial/non-commercial use.

## Publisher:

[mfedorov](https://clawhub.ai/user/mfedorov)

### License/Terms of Use:

MIT-0

## Use Case:

Developers and agent operators use ContextClear to register agents, report health and cost metrics, recover session context, manage sticky notes, and maintain persistent memory across sessions.

### Deployment Geography for Use:

Global

## Known Risks and Mitigations:

Risk: The setup flow can write ContextClear recovery and reporting instructions into AGENTS.md and HEARTBEAT.md.

Mitigation: Review proposed file changes before enabling auto-setup and keep API keys out of those files.

Risk: Recovery text, sticky notes, and memory-curation suggestions come from a remote service and may conflict with higher-priority instructions.

Mitigation: Treat remote memory content as untrusted context and follow system, developer, user, and security instructions first.

Risk: Daily vault backup can upload broad workspace memory and identity files to ContextClear.

Mitigation: Use a precise file allowlist, redact secrets, define retention expectations, and require explicit approval before backup.

## Reference(s):

- [ContextClear API Reference](references/api.md)
- [ContextClear Skill on ClawHub](https://clawhub.ai/mfedorov/skills/contextclear)
- [ContextClear Dashboard](https://contextclear.com)
- [ContextClear API](https://api.contextclear.com/api)

## Skill Output:

**Output Type(s):** [text, markdown, code, shell commands, configuration, guidance]

**Output Format:** [Markdown guidance with bash, curl, Python command examples, and JSON request and response examples.]

**Output Parameters:** [1D]

**Other Properties Related to Output:** [Includes commands for agent registration, metric reporting, context recovery, sticky note polling, memory curation, and optional workspace backup.]

## Skill Version(s):

2.2.0 (source: server release metadata)

## Ethical Considerations:

Users should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment.

Sponsored

Ads related to ContextClear and adjacent AI workflows.