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.
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.
$ npx @bitslabsec/agentshield setup~/.agentshield/binPlatform-specific signing service and local data directory.
use-agentshield/SKILL.mdInstalled for Codex, Claude Code and compatible Agent runtimes.
http://127.0.0.1:9400Wallet setup, authorization, approvals, activity and settings.
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.
Install only the Skill
The default installs all supported targets. Use --target when you only want one Agent environment.
$ 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| Target | Installed 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.
Give the Agent two things
The installed Skill
It teaches the Agent the local URL, API schemas, exact amount rules, approval states and security boundaries.
One Agent authorization token
Create it in the AgentShield console with the minimum scopes, limits, expiry and approval behavior required for the task.
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.
Command reference
| Command | Purpose |
|---|---|
agentshield setup | Install service + Skill, start the service and open the UI. |
agentshield install | Install service + Skill without starting the service. |
agentshield skill install | Install or refresh only the Agent Skill. |
agentshield start | Start the installed local service. |
agentshield status | Check service health. |
agentshield ui | Open the local wallet setup flow. |
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.
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",
});Operations available to Agents
Discover the authorized account, networks, assets and balances.
Sign messages and structured EVM transaction payloads.
Transfer native assets or exact ERC-20 tokens.
Quote and execute LI.FI-backed routes under policy.
Review and approve same-wallet pending operations.
Create child grants that cannot exceed the parent policy.
Built-in EVM mainnets
Public RPC failover is available by default. Custom HTTPS endpoints can be supplied through AGENTSHIELD_RPCS.
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.
Read and sign with narrow limits and human approval.
Operational scopes with bounded direct execution.
Broader automation for trusted local Agents; still revocable and wallet-bound.
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.
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.
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.
