Rechercher

PythonReactSEOPDF
OpenClaw

Startclaw Optimizer

OpenClaw Optimizer Skill

idanmann100 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 idanmann10/startclaw-optimizer

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

OpenClaw Optimizer Skill

Overview

The OpenClaw Optimizer is a comprehensive performance and cost optimization skill designed to enhance the efficiency of Clawdbot's subagent workflows.

Core Components

1. Task Router
  • Intelligent model selection based on task complexity
  • Automatic routing between Haiku, Sonnet, and Opus models
  • Cost prediction and optimization
2. Scheduler
  • Robust task execution with retry mechanism
  • Configurable preflight and postflight hooks
  • Timeout and exponential backoff handling
3. Browser Governor
  • Browser tab serialization
  • Concurrent tab management
  • Circuit breaker for preventing runaway processes
4. Context Compaction
  • Automatic token tracking
  • Summarization at 50,000 token threshold
  • Preserves critical context
5. Real-time Dashboard
  • Monitor daily budget
  • Track task execution
  • Visualize model distribution
  • Circuit breaker status

Expected Savings

Before Optimization: $90/day After Optimization: $3-5/day Savings: 95%

Installation

npm install @startclaw/openclaw-optimizer

Usage

const { TaskRouter, OptimizerScheduler, BrowserGovernor } = require('@startclaw/openclaw-optimizer');

const router = new TaskRouter();
const scheduler = new OptimizerScheduler();
const browserGovernor = new BrowserGovernor();

// Automatic model and cost optimization
const modelSelection = router.selectModel(taskDescription);
await scheduler.execute(task, modelSelection);

Monitoring

# Real-time dashboard
python3 scripts/dashboard.py watch

License

StartClaw Internal Use License

Informations sur la source

Source
github
Repository
openclaw/skills
Path
skills/idanmann10/startclaw-optimizer
Version
—
Commit
589085f1f61bb7e80e63a8b04ec3c62f9efcd61a
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.

README

OpenClaw Optimizer: Context Compaction for Subagents

Context Compaction Feature

Key Capabilities
  • Automatic token tracking across sessions
  • Auto-summarization at 50,000 token threshold
  • Preserves critical context and task intent
  • Cost-effective summarization using Haiku model
Usage Example
const { SubagentContextCompactor } = require('./context-compaction');

// Initialize compactor
const compactor = new SubagentContextCompactor({
  tokenThreshold: 50000,
  summaryModel: 'claude-3-5-haiku'
});

// Before spawning subagent
const preparedContext = await compactor.prepareForSubagent(fullContext, sessionKey);
sessions_spawn({
  context: preparedContext,
  // other spawn parameters
});
How It Works
  1. Tracks token usage across main and subagent sessions
  2. Detects when context approaches 50,000 tokens
  3. Extracts and preserves critical information
  4. Generates a concise summary using Haiku
  5. Maintains session continuity
Performance Impact
  • Minimal overhead
  • Reduces API costs by 70-90%
  • Prevents runaway context growth

Logging and Telemetry

Compaction events are logged with:

  • Session Key
  • Original Token Count
  • Compacted Token Count
  • Detected Key Themes

Customization

  • Adjust token threshold
  • Modify critical information patterns
  • Configure preservation of recent exchanges

Contenu extrait

SKILL.md
# OpenClaw Optimizer Skill

## Overview

The OpenClaw Optimizer is a comprehensive performance and cost optimization skill designed to enhance the efficiency of Clawdbot's subagent workflows.

## Core Components

### 1. Task Router
- Intelligent model selection based on task complexity
- Automatic routing between Haiku, Sonnet, and Opus models
- Cost prediction and optimization

### 2. Scheduler
- Robust task execution with retry mechanism
- Configurable preflight and postflight hooks
- Timeout and exponential backoff handling

### 3. Browser Governor
- Browser tab serialization
- Concurrent tab management
- Circuit breaker for preventing runaway processes

### 4. Context Compaction
- Automatic token tracking
- Summarization at 50,000 token threshold
- Preserves critical context

### 5. Real-time Dashboard
- Monitor daily budget
- Track task execution
- Visualize model distribution
- Circuit breaker status

## Expected Savings

**Before Optimization:** $90/day
**After Optimization:** $3-5/day
**Savings:** 95%

## Installation

```bash
npm install @startclaw/openclaw-optimizer
```

## Usage

```javascript
const { TaskRouter, OptimizerScheduler, BrowserGovernor } = require('@startclaw/openclaw-optimizer');

const router = new TaskRouter();
const scheduler = new OptimizerScheduler();
const browserGovernor = new BrowserGovernor();

// Automatic model and cost optimization
const modelSelection = router.selectModel(taskDescription);
await scheduler.execute(task, modelSelection);
```

## Monitoring

```bash
# Real-time dashboard
python3 scripts/dashboard.py watch
```

## License

StartClaw Internal Use License
README
# OpenClaw Optimizer: Context Compaction for Subagents

## Context Compaction Feature

### Key Capabilities
- Automatic token tracking across sessions
- Auto-summarization at 50,000 token threshold
- Preserves critical context and task intent
- Cost-effective summarization using Haiku model

### Usage Example

```javascript
const { SubagentContextCompactor } = require('./context-compaction');

// Initialize compactor
const compactor = new SubagentContextCompactor({
  tokenThreshold: 50000,
  summaryModel: 'claude-3-5-haiku'
});

// Before spawning subagent
const preparedContext = await compactor.prepareForSubagent(fullContext, sessionKey);
sessions_spawn({
  context: preparedContext,
  // other spawn parameters
});
```

### How It Works
1. Tracks token usage across main and subagent sessions
2. Detects when context approaches 50,000 tokens
3. Extracts and preserves critical information
4. Generates a concise summary using Haiku
5. Maintains session continuity

### Performance Impact
- Minimal overhead
- Reduces API costs by 70-90%
- Prevents runaway context growth

## Logging and Telemetry
Compaction events are logged with:
- Session Key
- Original Token Count
- Compacted Token Count
- Detected Key Themes

## Customization
- Adjust token threshold
- Modify critical information patterns
- Configure preservation of recent exchanges

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...