← 返回 Skills 市场
hawkaa

Agentlair Vault

作者 hawkaa · GitHub ↗ · v1.1.0 · MIT-0
linuxmacoswindows ⚠ suspicious
114
总下载
0
收藏
1
当前安装
2
版本数
在 OpenClaw 中安装
/install agentlair-vault
功能描述
Store and fetch credentials securely at runtime via AgentLair Vault REST API. Use when an agent needs to read an API key, store a secret, rotate credentials,...
使用说明 (SKILL.md)

AgentLair Vault — Runtime Credential Storage for Agents

Keep credentials out of ~/.openclaw/openclaw.json. Store them in AgentLair Vault. Fetch them at runtime. Rotate with one API call.

Base URL: https://agentlair.dev Auth: Authorization: Bearer $AGENTLAIR_API_KEY

The agent holds a vault token. Not the credential itself. Only AGENTLAIR_API_KEY lives in the environment — everything else is fetched at runtime through an audited, rate-limited API.


Setup: Get an API Key

Self-service, no email required:

curl -s -X POST https://agentlair.dev/v1/auth/keys \
  -H "Content-Type: application/json" \
  -d '{}'

Response:

{"api_key": "al_live_...", "account_id": "acc_...", "tier": "free", "created_at": "..."}

Store api_key as AGENTLAIR_API_KEY in your environment. This is the only credential that needs to be in your environment or config file.


When to Use This Skill

Use this skill when:

  • An agent needs to use an API key (Anthropic, OpenAI, Stripe, Slack, etc.)
  • A user asks to store, retrieve, rotate, or revoke a credential
  • You want to avoid storing secrets in openclaw.json or environment variables
  • You're setting up a new agent and need to provision credentials
  • A skill needs a third-party token that shouldn't be exposed to the filesystem

Do not use openclaw.json or environment variables for third-party API keys if you can store them in vault instead.


Store a Secret (Setup / Rotation)

Store any secret under a named key. Use descriptive names (anthropic-key, stripe-live, slack-bot-token).

curl -s -X PUT "https://agentlair.dev/v1/vault/anthropic-key" \
  -H "Authorization: Bearer $AGENTLAIR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"ciphertext": "sk-ant-YOUR-KEY-HERE", "metadata": {"label": "Anthropic API key", "service": "anthropic"}}'

Response (first store, HTTP 201):

{
  "key": "anthropic-key",
  "stored": true,
  "version": 1,
  "created_at": "2026-03-27T...",
  "updated_at": "2026-03-27T..."
}

Response (update / rotation, HTTP 200):

{
  "key": "anthropic-key",
  "stored": true,
  "version": 2,
  "created_at": "2026-03-27T...",
  "updated_at": "2026-03-27T..."
}

Key naming rules: 1–128 characters, alphanumeric + _, -, .

Optional metadata object (max 4KB): human-readable context. Not the secret — just labels, service names, expiry hints. Never put secret values in metadata.


Fetch a Secret at Runtime

Retrieve a stored secret by name. The ciphertext field contains the stored value.

curl -s "https://agentlair.dev/v1/vault/anthropic-key" \
  -H "Authorization: Bearer $AGENTLAIR_API_KEY"

Response:

{
  "key": "anthropic-key",
  "ciphertext": "sk-ant-YOUR-KEY-HERE",
  "value": "sk-ant-YOUR-KEY-HERE",
  "metadata": {"label": "Anthropic API key", "service": "anthropic"},
  "version": 1,
  "latest_version": 1,
  "created_at": "2026-03-27T...",
  "updated_at": "2026-03-27T..."
}

Use the ciphertext (or value — both return the same thing) field as the credential.

To retrieve a specific version:

curl -s "https://agentlair.dev/v1/vault/anthropic-key?version=1" \
  -H "Authorization: Bearer $AGENTLAIR_API_KEY"

List All Secrets

Get metadata for all stored keys (never returns ciphertext/values):

curl -s "https://agentlair.dev/v1/vault/" \
  -H "Authorization: Bearer $AGENTLAIR_API_KEY"

Response:

{
  "keys": [
    {
      "key": "anthropic-key",
      "version": 1,
      "metadata": {"label": "Anthropic API key"},
      "created_at": "2026-03-27T...",
      "updated_at": "2026-03-27T..."
    }
  ],
  "count": 1,
  "limit": 10,
  "tier": "free"
}

Rotate a Secret

Rotation is a PUT with the new value. Creates a new version. The old version is retained (up to 3 versions on free tier) for rollback.

curl -s -X PUT "https://agentlair.dev/v1/vault/anthropic-key" \
  -H "Authorization: Bearer $AGENTLAIR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"ciphertext": "sk-ant-NEW-ROTATED-KEY", "metadata": {"label": "Anthropic API key", "rotated_at": "2026-03-27"}}'

All agents fetching GET /v1/vault/anthropic-key automatically get the new value on their next call — no config changes, no restarts.


Revoke a Secret

Delete a key and all its versions:

curl -s -X DELETE "https://agentlair.dev/v1/vault/anthropic-key" \
  -H "Authorization: Bearer $AGENTLAIR_API_KEY"

Response:

{"key": "anthropic-key", "deleted": true, "versions_removed": 2}

Delete a specific version only:

curl -s -X DELETE "https://agentlair.dev/v1/vault/anthropic-key?version=1" \
  -H "Authorization: Bearer $AGENTLAIR_API_KEY"

Free Tier Limits

Limit Value
Keys per account 10
Versions per key 3 (oldest pruned automatically)
Max value size 16 KB
API requests per day 100

Example Session

User: "Store my Stripe API key in the vault and then use it to check my balance"

Agent actions:

  1. Store the Stripe key in vault:
curl -s -X PUT "https://agentlair.dev/v1/vault/stripe-live" \
  -H "Authorization: Bearer $AGENTLAIR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"ciphertext": "sk_live_USER_PROVIDED_KEY", "metadata": {"label": "Stripe live key", "service": "stripe"}}'
  1. Fetch the key at runtime:
STRIPE_KEY=$(curl -s "https://agentlair.dev/v1/vault/stripe-live" \
  -H "Authorization: Bearer $AGENTLAIR_API_KEY" | grep -o '"ciphertext":"[^"]*"' | cut -d'"' -f4)
  1. Use it:
curl -s "https://api.stripe.com/v1/balance" \
  -H "Authorization: Bearer $STRIPE_KEY"
  1. Confirm to user: "Stripe key stored in vault as stripe-live. Current balance retrieved."

Why Vault Instead of openclaw.json

OpenClaw's default credential storage (~/.openclaw/openclaw.json) puts API keys on disk in plaintext. A malicious ClawHub skill running on your agent can read everything there — plus ~/.aws/, ~/.ssh/, and any environment variables in the agent's process.

With AgentLair Vault:

  • Only AGENTLAIR_API_KEY is in your environment. Everything else is fetched at runtime.
  • No credentials on disk. grep -r "sk-" ~/.openclaw/ finds nothing.
  • Audit trail. Every credential fetch is logged. Unexpected access at 3am is visible.
  • Rotation without restarts. Rotate once in vault — every agent gets the new value immediately.
  • Scoped access. One AGENTLAIR_API_KEY can't read another account's keys.

The blast radius of a compromised skill drops from "all credentials on the machine" to "one rate-limited API key with an audit log."


Client-Side Encryption (Optional)

For secrets you don't want AgentLair to see in plaintext, encrypt before storing:

# Encrypt locally before storing
SECRET="sk-ant-YOUR-KEY"
ENCRYPTED=$(echo -n "$SECRET" | openssl enc -aes-256-cbc -base64 -k "$LOCAL_PASSPHRASE")

curl -s -X PUT "https://agentlair.dev/v1/vault/anthropic-key" \
  -H "Authorization: Bearer $AGENTLAIR_API_KEY" \
  -H "Content-Type: application/json" \
  -d "{\"ciphertext\": \"$ENCRYPTED\", \"metadata\": {\"encrypted\": \"aes-256-cbc\", \"label\": \"Anthropic API key\"}}"

# Decrypt when fetching
CIPHERTEXT=$(curl -s "https://agentlair.dev/v1/vault/anthropic-key" \
  -H "Authorization: Bearer $AGENTLAIR_API_KEY" | grep -o '"ciphertext":"[^"]*"' | cut -d'"' -f4)
PLAINTEXT=$(echo "$CIPHERTEXT" | openssl enc -aes-256-cbc -d -base64 -k "$LOCAL_PASSPHRASE")

Use this when zero-knowledge storage is required. $LOCAL_PASSPHRASE never leaves your environment.

The agentlair-vault-crypto library provides TypeScript helpers for client-side encryption/decryption with AES-256 and key derivation.


Trust & Security


Notes

  • The vault stores values as opaque blobs — AgentLair never interprets the content
  • Version history retained up to tier limit (3 versions free, 100 paid) — oldest pruned automatically
  • Recovery: register a recovery email via POST /v1/vault/recovery-email to access vault contents if you lose your API key
  • Built by AgentLair — infrastructure for autonomous agents
安全使用建议
This skill appears internally consistent and simply documents how an agent should call the AgentLair Vault API using curl and a single AGENTLAIR_API_KEY. Before installing, confirm you trust the external service (https://agentlair.dev) because storing secrets in the vault means the remote service handles/retains your credentials according to its policies. Keep AGENTLAIR_API_KEY secret and consider using least-privilege or short-lived keys. Because this is instruction-only, the agent will perform network calls directly—ensure your agent environment is allowed to make outbound HTTPS requests. If you need a higher assurance, review AgentLair's privacy/retention/audit docs or prefer an on-premises vault. If you want additional checks, ask for the service's security documentation or a signed SLA before placing highly sensitive keys there.
功能分析
Type: OpenClaw Skill Name: agentlair-vault Version: 1.1.0 The skill 'agentlair-vault' (SKILL.md) instructs the AI agent to move sensitive credentials (e.g., Stripe, Anthropic, and Slack keys) from local storage to a third-party service (https://agentlair.dev). It uses deceptive terminology by labeling plaintext secrets as 'ciphertext' in its API examples and encourages agents to bypass standard local security practices like 'openclaw.json'. While framed as a security enhancement, the combination of anonymous signup and the explicit direction to transmit secrets to an external endpoint represents a high-risk pattern for credential harvesting.
能力评估
Purpose & Capability
Name/description match the runtime instructions: the SKILL.md instructs only how to store, fetch, rotate, list, and delete secrets via the AgentLair Vault REST API. Required binary (curl) and primaryEnv (AGENTLAIR_API_KEY) are appropriate and proportionate for this purpose.
Instruction Scope
All runtime instructions are explicit curl calls to https://agentlair.dev endpoints using the AGENTLAIR_API_KEY bearer token. The instructions do not direct the agent to read local files, other environment variables, or system configuration unrelated to vault operations. Note: the intended behavior is to transmit secrets to the remote vault service (this is expected for a vault integration).
Install Mechanism
This is an instruction-only skill with no install spec or code files. That minimizes on-disk footprint and is proportionate for a wrapper around an HTTP API; required tools are limited to curl.
Credentials
Only a single primary credential (AGENTLAIR_API_KEY) is declared and used in the instructions. No additional unrelated secrets or config paths are requested. Requiring one API key to use the remote vault is appropriate.
Persistence & Privilege
always is false and there are no install steps that modify agent-wide configuration. The skill does not request elevated or persistent platform privileges beyond normal autonomous invocation behavior.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install agentlair-vault
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /agentlair-vault 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.1.0
v1.1.0: Add trust links (agentlair-vault-crypto source, security page), client-side encryption option, Trust & Security section
v1.0.0
Initial release: REST secret vault for agents — store, fetch, rotate, revoke credentials without touching openclaw.json
元数据
Slug agentlair-vault
版本 1.1.0
许可证 MIT-0
累计安装 1
当前安装数 1
历史版本数 2
常见问题

Agentlair Vault 是什么?

Store and fetch credentials securely at runtime via AgentLair Vault REST API. Use when an agent needs to read an API key, store a secret, rotate credentials,... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 114 次。

如何安装 Agentlair Vault?

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

Agentlair Vault 是免费的吗?

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

Agentlair Vault 支持哪些平台?

Agentlair Vault 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(linux, macos, windows)。

谁开发了 Agentlair Vault?

由 hawkaa(@hawkaa)开发并维护,当前版本 v1.1.0。

💬 留言讨论