Rechercher

PythonReactSEOPDF
OpenClaw

Self Prompt

Self Prompt: Forcing Agent Responses

eliranwong0 installations selon la source☆ 0 Étoiles du dépôt

Installation

Suivez les instructions du dépôt pour votre agent. Consultez les fichiers et dépendances avant l’installation.

SkillHub CLI

skillhub install eliranwong/self-prompt

Examinez la source et la compatibilité, puis suivez les étapes d’installation.

Donnez le lien à votre agent et demandez-lui d’examiner instructions et dépendances avant d’expliquer les étapes.

Voir la source ↗Guides

Instructions

Self-Prompt: Forcing Agent Responses

The Problem

When automated scripts (cron, monitoring) send messages via openclaw message send:

  • Messages appear in chat as "system messages"
  • Agents may treat them as background info, not tasks
  • Agents respond to user messages but ignore automated ones
  • Accountability checks, alerts, and tasks go unanswered

The Solution

Use openclaw agent instead of openclaw message send for messages requiring agent response:

# OLD (agent may ignore):
openclaw message send --target -GROUP_ID --message "TASK: Do something"

# NEW (agent MUST respond):
RESPONSE=$(openclaw agent \
    --agent AGENT_ID \
    --session-id "agent:AGENT_ID:telegram:group:GROUP_ID" \
    --channel telegram \
    --message "TASK: Do something" \
    --timeout 180)

# Send response to chat:
openclaw message send --target -GROUP_ID --message "$RESPONSE"

Why This Works

  • openclaw message send → Creates chat message → Agent sees as "notification"
  • openclaw agent → Triggers actual agent turn → Agent MUST process and respond

Quick Start

For Bash Scripts

Use scripts/send_agent_task.sh:

# Simple usage:
~/.openclaw/skills/self-prompt/scripts/send_agent_task.sh \
    "AGENT_ID" \
    "GROUP_ID" \
    "Your task message here"
For Python Scripts

Use scripts/send_agent_task.py:

from send_agent_task import send_and_deliver

success, response = send_and_deliver(
    agent_id="stock-trading",
    group_id="-5283045656", 
    message="TASK: Analyze current positions",
    timeout=180
)

Pattern: Data + Task Separation

For monitoring scripts, separate data delivery from task requests:

# 1. Send DATA immediately (informational)
openclaw message send --target "$GROUP_ID" --message "📊 Position Data:
$POSITIONS"

# 2. Send TASK via agent (forces response)
RESPONSE=$(openclaw agent \
    --agent "$AGENT_ID" \
    --session-id "agent:$AGENT_ID:telegram:group:$GROUP_ID" \
    --message "Anal...

Informations sur la source

Source
github
Repository
openclaw/skills
Path
skills/eliranwong/self-prompt
Version
—
Commit
168f4f3fdc7b196468f9f7c278292303f089307e
Source de classification
rules
Statut
active
Visibilité
public

Ces informations proviennent de l’analyse indexée et peuvent être anciennes. Vérifiez les fichiers actuels.

Contenu extrait

SKILL.md
# Self-Prompt: Forcing Agent Responses

## The Problem

When automated scripts (cron, monitoring) send messages via `openclaw message send`:
- Messages appear in chat as "system messages"
- Agents may treat them as background info, not tasks
- Agents respond to user messages but ignore automated ones
- Accountability checks, alerts, and tasks go unanswered

## The Solution

Use `openclaw agent` instead of `openclaw message send` for messages requiring agent response:

```bash
# OLD (agent may ignore):
openclaw message send --target -GROUP_ID --message "TASK: Do something"

# NEW (agent MUST respond):
RESPONSE=$(openclaw agent \
    --agent AGENT_ID \
    --session-id "agent:AGENT_ID:telegram:group:GROUP_ID" \
    --channel telegram \
    --message "TASK: Do something" \
    --timeout 180)

# Send response to chat:
openclaw message send --target -GROUP_ID --message "$RESPONSE"
```

## Why This Works

- `openclaw message send` → Creates chat message → Agent sees as "notification"
- `openclaw agent` → Triggers actual agent turn → Agent MUST process and respond

## Quick Start

### For Bash Scripts

Use `scripts/send_agent_task.sh`:

```bash
# Simple usage:
~/.openclaw/skills/self-prompt/scripts/send_agent_task.sh \
    "AGENT_ID" \
    "GROUP_ID" \
    "Your task message here"
```

### For Python Scripts

Use `scripts/send_agent_task.py`:

```python
from send_agent_task import send_and_deliver

success, response = send_and_deliver(
    agent_id="stock-trading",
    group_id="-5283045656", 
    message="TASK: Analyze current positions",
    timeout=180
)
```

## Pattern: Data + Task Separation

For monitoring scripts, separate data delivery from task requests:

```bash
# 1. Send DATA immediately (informational)
openclaw message send --target "$GROUP_ID" --message "📊 Position Data:
$POSITIONS"

# 2. Send TASK via agent (forces response)
RESPONSE=$(openclaw agent \
    --agent "$AGENT_ID" \
    --session-id "agent:$AGENT_ID:telegram:group:$GROUP_ID" \
    --message "Anal...

Skills associés

OpenClaw

xint

0xnyk

X Intelligence CLI — search, monitor, analyze, and engage on X/Twitter. TypeScript + Bun. AI agent skill.

OpenClaw

bambu-studio-ai

heyixuan2

Bambu Lab 3D printer control and automation. Activate when user mentions: printer status, 3D printing, slice, analyze model, generate 3D, AMS filament, print monitor, Bambu Lab, or any 3D printing task. Full pi...

OpenClaw

flightclaw

jackculpan

Track flight prices from Google Flights with this OpenClaw skill. Search routes, monitor prices, and get alerts when prices drop.

OpenClaw

openclaw-trading-assistant

openclaw-trade

openclaw trading assistant| openclaw trading skill | nof1.ai & openclaw [moltbot] collaboration | We get the best practices from alpha arena trading seasons and bring it to clawdbot All top AI agents, realtime...