← 返回
未分类 中文

Agent Tollbooth

Web access privileges for your agent. So your agent stops hitting walls.
为代理提供网页访问权限,使其不再碰壁。
highnoonoffice
未分类 clawhub v2.2.0 1 版本 100000 Key: 无需
★ 0
Stars
📥 395
下载
💾 0
安装
1
版本
#latest

概述

Agent Tollbooth

You're mid-task. Your agent fires a Yahoo Finance request. Gets a 429. Stops. You don't know if it's rate limits, a bad endpoint, a missing header, or just bad luck. You try again. Same thing. You start debugging blind.

Tollbooth is the field notes that stop this from happening twice. Observed operating profiles for 16 external services — safe endpoints, sleep intervals, caching patterns, auth requirements — built from real API friction. Your agent checks the profile before calling, follows the safe pattern, and logs what happens. Next time it already knows.

Every external service has a threshold. This skill provides the map so agents learn them once and stop hitting them twice.

Core Pattern

Before calling any external service:

  1. Check references/profiles.md for an existing profile
  2. Follow its safe pattern — endpoint, sleep, cache, auth
  3. If no profile exists, observe behavior and add an entry after

Caching

Always cache prices and API responses locally when TTL allows.

  • Default TTL: 300s (5 minutes) for prices
  • Cache file: $OPENCLAW_WORKSPACE/data/agent-tollbooth/cache/
  • Serve from cache first — only hit the API when stale or forced

Script: scripts/fetch-prices.py implements cache + sequential Yahoo Finance fetching. Use it instead of raw requests. CoinGecko and other services are covered by profiles in references/profiles.md.

How It Learns

Tollbooth grows with your usage. Three scripts form the learning loop:

Before any external call:

python3 scripts/check-profile.py coingecko.com

Returns the safe pattern if a profile exists. If not, logs the miss and returns exit code 1 — your agent can continue, but observation has started.

During any call — log what happens:

from scripts.web_log import log_event
log_event("my-api.com", "429", "hit rate limit at 10 req/min", worked=None)
log_event("my-api.com", "success", "sequential 500ms sleep worked", worked="sequential + 500ms sleep")

After enough observations — promote to a profile:

python3 scripts/promote-profile.py           # dry run, see what's ready
python3 scripts/promote-profile.py --write   # append drafts to profiles.md

Default threshold: 5 events. Auto-drafted profiles include all observed friction and working patterns. Review before trusting — they're drafts, not finished entries.

Events are written to $OPENCLAW_WORKSPACE/data/agent-tollbooth/web-access-log.json — outside the skill bundle, never modifying packaged files. Cache files go to $OPENCLAW_WORKSPACE/data/agent-tollbooth/cache/. Set OPENCLAW_WORKSPACE before running (standard on any OpenClaw install).

Workspace Access

This skill writes event logs and cache files to $OPENCLAW_WORKSPACE/data/agent-tollbooth/. No credentials are accessed. No sensitive data is written. No files outside this directory are touched.

Service Profiles

See references/profiles.md for all current profiles:

  • Yahoo Finance
  • CoinGecko
  • Ghost Admin API
  • ClawHub API
  • Telegram Bot API
  • Replicate
  • OpenAI API
  • Anthropic API
  • GitHub API
  • Brave Search API
  • Serper (Google Search)
  • Notion API
  • Airtable API
  • Stripe API
  • HuggingFace Inference API
  • Firecrawl

版本历史

共 1 个版本

  • v2.2.0 当前
    2026-05-03 09:19 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

Brain Map Visualizer

highnoonoffice
可视化注意力在代理项目间的移动轨迹。每次会话都会留下痕迹,随时间这些痕迹形成地图——并非关于代理被告知的内容。
★ 0 📥 753

Second Brain Visualizer

highnoonoffice
读取你的原始想法流(语音笔记、碎片、半句),在你不知不觉中揭示反复循环的模式。随意丢弃任何内容。寻找 t...
★ 0 📥 536

Token Cost Time

highnoonoffice
使用基于规则的分类和可选的本地配置文件数据,无需外部依赖,估算 LLM 任务的 Token使用量、成本和耗时。
★ 0 📥 331