AGENTSHIELD DOCUMENTATION

From local install to the first agent transaction.

AgentShield is a local EVM payment boundary. It gives an Agent scoped capabilities to sign, send, swap, bridge and approve while wallet secrets stay inside the local signer.

1. Install2. Create a wallet3. Create authorization4. Hand off Skill + token
QUICK START

Install everything in one command

The setup command installs the service binary, the complete Agent Skill, starts the local service and opens the setup flow. It supports Windows, macOS and Linux on x64 and arm64.

terminal
$ npx @bitslabsec/agentshield setup
Local service~/.agentshield/bin

Platform-specific signing service and local data directory.

Agent Skilluse-agentshield/SKILL.md

Installed for Codex, Claude Code and compatible Agent runtimes.

Control consolehttp://127.0.0.1:9400

Wallet setup, authorization, approvals, activity and settings.

Why no automatic postinstall?

A plain npm install downloads the package and its bundled Skill but does not write outside the package directory. Run setup or skill install to explicitly install the Skill into Agent discovery directories.

AGENT SKILL

Install only the Skill

The default installs all supported targets. Use --target when you only want one Agent environment.

terminal
$ npx @bitslabsec/agentshield skill install
$ npx @bitslabsec/agentshield skill install --target codex
$ npx @bitslabsec/agentshield skill install --target claude
$ npx @bitslabsec/agentshield skill install --target agents
TargetInstalled directory
Codex~/.codex/skills/use-agentshield
Claude Code~/.claude/skills/use-agentshield
Compatible Agents~/.agents/skills/use-agentshield

The bundle contains SKILL.md, references/api.md, scripts/agentshield.mjs and Agent metadata. The installer verifies the required files before reporting success.

HAND OFF

Give the Agent two things

01

The installed Skill

It teaches the Agent the local URL, API schemas, exact amount rules, approval states and security boundaries.

02

One Agent authorization token

Create it in the AgentShield console with the minimum scopes, limits, expiry and approval behavior required for the task.

EXAMPLE HANDOFF

Use the installed use-agentshield Skill with this Agent authorization token: cag_…. Verify the connection and show me the authorized account before taking action.

The authorization token is intentionally visible to its assigned local Agent. It replaces private-key access with limited, revocable capabilities. Do not send it to a different Agent or a remote service.

CLI

Command reference

CommandPurpose
agentshield setupInstall service + Skill, start the service and open the UI.
agentshield installInstall service + Skill without starting the service.
agentshield skill installInstall or refresh only the Agent Skill.
agentshield startStart the installed local service.
agentshield statusCheck service health.
agentshield uiOpen the local wallet setup flow.
TYPESCRIPT SDK

Make an authorized request

Use the SDK when integrating AgentShield into an application. Keep the authorization token local and use a stable idempotency key for every operation.

TypeScript
import { AgentShieldClient } from "@bitslabsec/agentshield";

const client = new AgentShieldClient({
  baseUrl: "http://127.0.0.1:9400",
  token: process.env.AGENTSHIELD_GRANT,
});

const operation = await client.send({
  chainId: 8453,
  to: "0x…",
  token: "USDC",
  amount: "10000000",
  idempotencyKey: "invoice-42-send-1",
  reason: "Pay invoice 42",
});
AGENT API

Operations available to Agents

Status & balances

Discover the authorized account, networks, assets and balances.

Sign

Sign messages and structured EVM transaction payloads.

Send

Transfer native assets or exact ERC-20 tokens.

Swap & bridge

Quote and execute LI.FI-backed routes under policy.

Approvals

Review and approve same-wallet pending operations.

Delegate

Create child grants that cannot exceed the parent policy.

NETWORKS

Built-in EVM mainnets

Ethereum 1Optimism 10BNB Chain 56Polygon 137zkSync Era 324Robinhood 4663Base 8453Arbitrum 42161Avalanche 43114

Public RPC failover is available by default. Custom HTTPS endpoints can be supplied through AGENTSHIELD_RPCS.

AUTHORIZATION

Grant capabilities, not custody

Every Agent authorization is bound to one wallet. Configure only the scopes required by the task, then optionally constrain networks, per-operation USD value, daily operation count, recipients, tokens, contracts, expiry and approval behavior.

Low

Read and sign with narrow limits and human approval.

Medium

Operational scopes with bounded direct execution.

High

Broader automation for trusted local Agents; still revocable and wallet-bound.

APPROVALS

What happens when policy needs a human

Requests enter pending_approval when the authorization requires review or when pricing cannot be trusted. Review the decoded operation, amount, recipient, network, contract and policy reason in the AgentShield console before approving or rejecting it.

SECURITY MODEL

The key stays outside the Agent boundary

  • The account key is split with 2-of-3 Shamir Secret Sharing.
  • The complete key is reconstructed only inside the local signer for an authorized signing operation.
  • Temporary key material is cleared immediately after signing; the wallet session can remain unlocked until its timeout.
  • Agents receive revocable authorization tokens—not the mnemonic, private key, PIN or shards.
  • Importing a wallet does not invalidate copies of the original mnemonic or private key.
TROUBLESHOOTING

Common checks

The Agent cannot find the Skill

Run npx @bitslabsec/agentshield skill install. The command prints every installed destination and verifies the required files before reporting success. Restart the Agent runtime if it only discovers Skills at startup.

The service is unavailable

Run npx @bitslabsec/agentshield status, then npx @bitslabsec/agentshield start --detach if needed.

An authorization returns 401 or 403

Create a fresh Agent authorization for the active wallet with only the required scopes. Tokens are shown once and cannot be recovered later.

An operation is pending approval

Open the local console, select and unlock the same wallet, then review the request in Transaction Approvals.