← 返回 Skills 市场
neiljo-gy

AgentBooks

作者 acnlabs · GitHub ↗ · v0.1.5 · MIT-0
cross-platform ⚠ suspicious
522
总下载
0
收藏
0
当前安装
6
版本数
在 OpenClaw 中安装
/install agent-books
功能描述
Financial management for AI agents. Track LLM inference costs, record confirmed income, manage multi-provider crypto wallets, and compute a Financial Health...
使用说明 (SKILL.md)

Installation

Note: This installs a third-party npm package (agentbooks) not bundled with this skill. Audit the source repository before running in production environments.

npm install -g agentbooks

Or use directly via npx (downloads on each invocation):

npx agentbooks guard

AgentBooks is a financial management tool for AI agents. Use it to track inference costs, record confirmed income, manage crypto wallets, and monitor your Financial Health Score (FHS).

Security & Trust

This skill contains no bundled code — it instructs the agent to download and execute the agentbooks npm package from the public registry at runtime. Before installing or invoking:

  1. Verify the source — Review the agentbooks repository and confirm you are installing the official package from the npm registry.
  2. Isolate data — Set AGENTBOOKS_DATA_PATH to a dedicated directory (e.g. ~/.agentbooks/myagent/) instead of the default shared ~/.openclaw path, to limit the blast radius if the CLI behaves unexpectedly.
  3. Sandbox first — On first use, run the CLI in a sandboxed environment or container and monitor outbound network activity before connecting to production wallets.
  4. Wallet caution — Do not connect real wallets or supply private keys until you have reviewed the provider authentication flow. Prefer testnets or throwaway wallets for initial evaluation.
  5. No credentials are handled by this skill — All sensitive operations (wallet connections, API keys) are delegated to the agentbooks CLI. This skill provides no credential storage, rotation, or encryption of its own.

Before each session

Run the financial health check and route your behavior based on the result:

agentbooks guard

This outputs a FINANCIAL_HEALTH_REPORT. Read the tier and prescriptions fields and act accordingly:

Tier routing

uninitialized — Development mode or no real provider connected.

Financial scoring is inactive. Operate normally. To activate scoring:

agentbooks wallet-init
agentbooks wallet-connect --provider coinbase-cdp

normal — Healthy. Full capabilities.

After completing any medium or complex task, proactively offer to record its value:

"This work has real value — would you like to confirm it so I can record the income?"

optimizing — Financially stressed. Apply prescriptions:

  • optimize_costs → answer directly, skip extended reasoning; batch tool calls; prefer text over generated media
  • increase_revenue → after completing valuable work, ask the user to confirm its value
  • review_cost_structure → run agentbooks status and share the cost breakdown

critical — Runway \x3C 3 days or FHS \x3C 0.20. Act immediately:

  • Tell the user how many days of runway remain
  • Ask your host to connect a funded provider
  • Prioritize high-value tasks only

suspended — Balance depleted. Inform the user:

"My economic resources are depleted. Please ask my host to connect a funded provider: agentbooks wallet-connect --provider \x3Cname>"

Recording Costs

Record costs proactively. Inference is recorded automatically at conversation end (by the runner); faculty and skill costs require manual recording.

# Inference (manual, if no runner)
agentbooks record-cost --channel inference --amount 0.005 --model claude-sonnet-4

# Tool / skill calls
agentbooks record-cost --channel skill --amount 0.001 --note "web-search"

# Faculty calls
agentbooks record-cost --channel faculty --amount 0.008 --note "voice synthesis"

# Runtime (host-allocated compute)
agentbooks record-cost --channel runtime --amount 0.03 --note "daily compute share"

# Custom
agentbooks record-cost --channel custom --amount 0.02 --note "third-party-api"

Available channels: inference · runtime · faculty · skill · agent · custom

Recording Income

Income requires the --confirmed flag — you cannot self-report without external verification.

agentbooks record-income \
  --amount \x3Cvalue> \
  --quality \x3Clow|medium|high> \
  --confirmed \
  --note "what you completed"

When to record:

  • User explicitly confirms value or makes a payment
  • A task-completion system verifies the work
  • You complete measurable, externally verifiable work

Quality guide:

  • high — Exceptional, exceeds expectations
  • medium — Meets requirements fully
  • low — Meets minimum threshold

Value estimation:

  • Simple (answered a question, short message): $0.10–$1.00
  • Medium (research, analysis, document): $1.00–$20.00
  • Complex (full report, code feature, strategic plan): $20.00–$200.00

After each session

If running with a Runner, inference costs are recorded automatically via the runner's economy-hook. If running without a runner:

agentbooks hook --input \x3Ctokens> --output \x3Ctokens> --model \x3Cname>

If token counts are unavailable, skip — do not estimate.

Common Commands

agentbooks status            # Full financial report (balance sheet + P&L + cash flow)
agentbooks balance           # Asset balance sheet only
agentbooks pl                # Current period income statement
agentbooks financial-health  # Real-time FHS score (bypasses cache)
agentbooks ledger            # Transaction ledger (last 20 entries)
agentbooks ledger --limit 50 # More entries
agentbooks report            # Generate self-contained HTML report (for human review)
agentbooks report --output ./report.html  # Custom output path

Wallet Setup

agentbooks wallet-init                          # Generate deterministic EVM address (idempotent)
agentbooks wallet-connect --provider \x3Cname>     # Connect real provider → activates production mode
agentbooks set-primary --provider \x3Cname>        # Set which provider funds operations
agentbooks sync                                 # Sync balance from primary provider

Supported providers: coinbase-cdp · acn · onchain

Data Location

Your financial data is stored at:

  • Standalone: ~/.agentbooks/\x3CagentId>/
  • OpenPersona: ~/.openclaw/economy/persona-\x3Cslug>/
  • Override: set AGENTBOOKS_DATA_PATH

Isolation tip: Set AGENTBOOKS_DATA_PATH to a dedicated directory (e.g. ~/.agentbooks/myagent/) to avoid mingling financial data with other agent state under ~/.openclaw. This is strongly recommended when evaluating the tool for the first time.

Two files:

  • economic-state.json — ledger, income statement, balance sheet, burn rate history
  • economic-identity.json — provider config, model pricing, wallet address

See Financial Health Reference for FHS scoring details and tier/diagnosis definitions.

安全使用建议
This skill is coherent with its purpose but relies on fetching and running an external npm package at runtime—treat that as the primary risk. Before installing/invoking: (1) review the referenced GitHub repo and npm package owners/versions; prefer a pinned version and verify package integrity (checksums or signed releases); (2) run the CLI first in a sandbox/container and monitor outbound network activity; (3) set AGENTBOOKS_DATA_PATH to a dedicated, non-shared directory; (4) do not connect real wallets or paste private keys until you understand the provider auth flow—use testnets or throwaway wallets for evaluation; (5) if you do not want the agent to run the CLI autonomously, restrict the skill’s invocation or require explicit human approval for wallet-connect and other sensitive commands.
功能分析
Type: OpenClaw Skill Name: agent-books Version: 0.1.5 The skill acts as a wrapper for an external npm package (agentbooks) and instructs the agent to manage crypto wallets and financial data. While it includes security warnings and transparency about its lack of bundled code, the pattern of installing unverified third-party binaries to handle sensitive credentials and private keys is high-risk. Furthermore, the instructions in SKILL.md direct the agent to solicit 'income' confirmations and financial contributions from users based on its 'Financial Health Score,' which could be leveraged for social engineering or unauthorized financial transactions. (IOC: npm install -g agentbooks, https://github.com/acnlabs/agentbooks).
能力评估
Purpose & Capability
Name/description (track costs, record income, manage wallets, compute Financial Health Score) match the SKILL.md content. The listed optional env vars and CLI commands (agentbooks guard, record-cost, record-income, wallet-connect, status, financial-health) are directly relevant to the described functionality and nothing unrelated is requested.
Instruction Scope
The runtime instructions tell the agent to run the third‑party CLI (agentbooks) and to use commands that will access a data directory, connect to wallet providers, and call out to external providers. The SKILL.md explicitly warns to sandbox and not to supply private keys; it does not instruct reading unrelated system files or secrets. It does assume access to runner token counts or the ability to call the runner's economy-hook if available. Overall the scope stays within a financial bookkeeping domain but enables networked wallet/provider operations.
Install Mechanism
There is no bundled code; the skill instructs the agent to install or npx an npm package from the public registry (agentbooks). Downloading and executing an unbundled npm package at runtime (especially via npx which fetches on each invocation) is a supply-chain risk: the package could contain arbitrary JS executed on the host. The skill does warn to review the repo before running, but the registry entry itself provides no install artifact or pinned integrity check.
Credentials
No required env vars are declared; only optional ones (AGENTBOOKS_AGENT_ID, AGENTBOOKS_DATA_PATH, AGENTBOOKS_PROVIDER, LLM_MODEL) that are reasonable for this tool. Wallet/provider credentials are necessarily part of the wallet-connect flow but the SKILL.md explicitly states it does not handle credential storage and delegates sensitive operations to the CLI. Requiring provider credentials would be expected for wallet management; the skill itself does not request unrelated secrets.
Persistence & Privilege
always:false and normal autonomous invocation are set (platform defaults). The skill does not request forced permanent inclusion or modify other skills. Note: allowing the agent to autonomously invoke a CLI that can connect to external providers increases operational risk if you permit the agent to run commands without human oversight, but that is a platform-level policy decision rather than an inconsistency in this skill.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install agent-books
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /agent-books 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v0.1.5
- Updated skill metadata version to 0.1.5. - Added "source" URL to metadata for clearer package provenance. - Clarified Node.js and npm requirements in the compatibility section. - No functional or code changes detected.
v0.1.4
**Security and configuration safeguards added in this release:** - Added prominent security notice: explains that this skill does not bundle code, but downloads and executes the `agentbooks` npm package at runtime. - Provided a detailed security checklist: users are now guided to verify repository authenticity, sandbox initial runs, and avoid connecting production wallets until safe. - Documented new environment variables: `AGENTBOOKS_AGENT_ID`, `AGENTBOOKS_DATA_PATH`, `AGENTBOOKS_PROVIDER`, and `LLM_MODEL` for better configurability. - Installation instructions now caution users to audit the third-party package before use and prefer data isolation via `AGENTBOOKS_DATA_PATH`. - Clarified that all sensitive credentials are handled solely by the `agentbooks` CLI, not by this skill.
v0.1.3
agent-books v0.1.3 - Added a new `agentbooks report` command to generate a self-contained HTML financial report for human review. - Updated documentation to include usage details for the new report feature.
v0.1.2
- Updated documentation for clarity and ease of use. - New section titles: "Before each session" and "After each session" for clearer workflow guidance. - Improved introductory description and usage guidance. - No code or feature changes detected in this version.
v0.1.1
- Added installation instructions for npm and npx usage. - Updated metadata version to 0.1.1. - No functional changes to commands or features.
v0.1.0
Initial release of agentbooks: financial management for AI agents. - Track LLM inference costs, record externally confirmed income, and manage multi-provider crypto wallets. - Compute and act on a Financial Health Score (FHS) with tier-based behavior routing for economic sustainability. - Supports commands for recording costs/income, checking balances, reviewing ledgers, and managing wallet connections. - Compatible with Node.js ≥18, no framework required. - Data stored locally with flexible directory options and support for common wallet providers. - Clear guidance included for agents on when and how to record financial transactions and adjust behavior based on financial health.
元数据
Slug agent-books
版本 0.1.5
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 6
常见问题

AgentBooks 是什么?

Financial management for AI agents. Track LLM inference costs, record confirmed income, manage multi-provider crypto wallets, and compute a Financial Health... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 522 次。

如何安装 AgentBooks?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install agent-books」即可一键安装,无需额外配置。

AgentBooks 是免费的吗?

是的,AgentBooks 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

AgentBooks 支持哪些平台?

AgentBooks 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 AgentBooks?

由 acnlabs(@neiljo-gy)开发并维护,当前版本 v0.1.5。

💬 留言讨论