Catalog npm
Back to packageRELEASE DETAILS

0.0.16

npm

@0xgasless/agentkit

0xGasless Agentkit - Gasless transactions and account abstraction toolkit

Published28 Aug 2025
Direct dependencies18
Transitive dependenciesNot calculated

README

Current package documentation

0xGasless AgentKit

Give your AI agent a wallet and hands. Custodied funds, gasless stablecoin payments, and the ability to pay for real work on the internet — as tools your LLM can call.

npm version npm downloads license

What it is

AgentKit turns the 0xGasless platform into a set of agent tools. An agent gets a KMS-custodied wallet (no private key in your process), a server-enforced spending policy, and actions to:

  • Pay — send stablecoins (USDC/XSGD) and pay any x402 API on the internet, gaslessly, under spend caps.
  • Do — search and run tools from the 0xGasless Tool Gateway (backed by Apify's actor marketplace): browse the web, scrape pages, run search — paid per call from the agent's wallet.
  • Be trusted — mint an ERC-8004 on-chain identity, check another agent's reputation before paying it, and leave feedback.

The agent needs zero native gas token — the 0xGasless facilitator pays the gas. It only spends the stablecoin.

Two modes

ModeWalletUse when
Platform (recommended)KMS-custodied by 0xGasless; policy-enforced; no key in your codeYou want payments, tools, identity, spend limits, audit
Self-custodyA local private key / mnemonic via an ERC-4337 smart accountYou hold the key and want classic gasless DeFi actions

Install

npm install @0xgasless/agentkit

Quick start (platform mode)

import { Agentkit, AgentkitToolkit } from "@0xgasless/agentkit";
import { ChatOpenAI } from "@langchain/openai";
import { createReactAgent } from "@langchain/langgraph/prebuilt";

// 1. Configure — the API key (from your dashboard project) authenticates every
//    action; the wallet lives in 0xGasless KMS.
const agentkit = await Agentkit.configureWithPlatform({
  apiKey: process.env.OXGAS_API_KEY!,   // Dashboard → Project → Auth → API Key
  agentId: "my-first-agent",            // create with client.agents.create first
  chain: "avalanche-fuji",              // Avalanche is the primary network
});

// 2. Turn it into LangChain tools and hand them to your agent.
const tools = new AgentkitToolkit(agentkit).getTools();
const app = createReactAgent({ llm: new ChatOpenAI({ model: "gpt-4o" }), tools });

// 3. Let it work — it can now pay for what it needs.
await app.invoke({
  messages: [{ role: "user", content:
    "Find a tool that can read a web page, then read https://example.com and summarize it." }],
});

Behind that one prompt: the agent calls search_tools (free), picks the web reader, calls browse_web → which pays ~$0.05 in USDC from its custodied wallet via x402, settled on Avalanche by the 0xGasless facilitator → and gets the page back. All under the spending policy you set in the dashboard.

The actions

Money (platform mode)

  • x402_pay — pay a recipient in USDC/XSGD, gasless, settled by the facilitator
  • pay_api — fetch any URL and auto-pay if it responds 402 (with a mandatory maxValue cap)
  • smart_transfer — transfer USDC/XSGD to an address
  • get_spend_status — read the agent's caps + remaining daily budget
  • get_agent_wallet — address, chain, balances

Internet hands (Tool Gateway)

  • search_tools — discover a tool for a task (free)
  • call_tool — run any gateway tool, paying per call under a cap
  • browse_web — read/search the web (via the gateway's browser tool)
  • http_request — a guarded plain HTTP call (https-only, SSRF-protected) for free/public APIs

Trust (ERC-8004)

  • register_identity — mint the agent's on-chain identity (gas sponsored)
  • check_agent_reputation — score + confidence + basis, before you pay another agent
  • give_agent_feedback — record +/- feedback after an interaction

DeFi (both modes) — balances, token details, swaps & bridges (deBridge), disperse, market data (DexScreener), and more. Call getAllAgentkitActions() to enumerate the full set at runtime.

Self-custody mode

const agentkit = await Agentkit.configureWithWallet({
  apiKey: process.env.API_KEY!,
  privateKey: process.env.PRIVATE_KEY as `0x${string}`,  // you hold this key
  chainID: 43113,
});

Same toolkit; actions that require the platform (payments, tools, identity) will say so. run_terminal_command is disabled unless you explicitly pass unsafeTerminalAccess: true (only in a sandbox you control).

Supported networks

Avalanche C-Chain (43114) and Avalanche Fuji (43113) are the primary, fully supported networks. Base (8453), Sonic (146), and BSC (56) are available for self-custody DeFi actions.

Migrating from 0.0.x

Platform mode and the money/tool/trust actions are new in 1.0. Your existing configureWithWallet code keeps working. See MIGRATION.md.

Documentation

License

Apache-2.0

Downloads & popularity

Awaiting observations

No metric observations yet

Download counts and popularity will appear here as the collector receives them.

Declared dependencies 18

Native requirements
18 direct targetsNot calculated transitive count
Package / targetRequirementRelationship
zod
Environment
{
  "local_name": "zod",
  "alias": false,
  "peer_metadata": null
}
^3.23.8runtime
viem
Environment
{
  "local_name": "viem",
  "alias": false,
  "peer_metadata": null
}
2runtime
axios
Environment
{
  "local_name": "axios",
  "alias": false,
  "peer_metadata": null
}
^1.7.9runtime
sqlite3
Environment
{
  "local_name": "sqlite3",
  "alias": false,
  "peer_metadata": null
}
^5.1.7runtime
merkletreejs
Environment
{
  "local_name": "merkletreejs",
  "alias": false,
  "peer_metadata": null
}
^0.4.1runtime
@langchain/core
Environment
{
  "local_name": "@langchain/core",
  "alias": false,
  "peer_metadata": null
}
^0.3.40runtime
@0xgasless/smart-account
Environment
{
  "local_name": "@0xgasless/smart-account",
  "alias": false,
  "peer_metadata": null
}
latestruntime
tsd
Environment
{
  "local_name": "tsd",
  "alias": false,
  "peer_metadata": null
}
^0.31.2development
jest
Environment
{
  "local_name": "jest",
  "alias": false,
  "peer_metadata": null
}
^29.7.0development
mock-fs
Environment
{
  "local_name": "mock-fs",
  "alias": false,
  "peer_metadata": null
}
^5.2.0development
ts-jest
Environment
{
  "local_name": "ts-jest",
  "alias": false,
  "peer_metadata": null
}
^29.2.5development
tsc-alias
Environment
{
  "local_name": "tsc-alias",
  "alias": false,
  "peer_metadata": null
}
^1.8.10development
typescript
Environment
{
  "local_name": "typescript",
  "alias": false,
  "peer_metadata": null
}
^5.7.2development
@types/jest
Environment
{
  "local_name": "@types/jest",
  "alias": false,
  "peer_metadata": null
}
^29.5.14development
concurrently
Environment
{
  "local_name": "concurrently",
  "alias": false,
  "peer_metadata": null
}
^8.2.2development
@biomejs/biome
Environment
{
  "local_name": "@biomejs/biome",
  "alias": false,
  "peer_metadata": null
}
1.9.4development
@types/sqlite3
Environment
{
  "local_name": "@types/sqlite3",
  "alias": false,
  "peer_metadata": null
}
^3.1.11development
@types/secp256k1
Environment
{
  "local_name": "@types/secp256k1",
  "alias": false,
  "peer_metadata": null
}
^4.0.6development

Distribution files

1 collected
Distribution 1

Source distribution

Source file
Checksums from source
{
  "shasum": "9eea454917b5f05970521b04beb8856eb84d49a4",
  "tarball": "https://registry.npmjs.org/@0xgasless/agentkit/-/agentkit-0.0.16.tgz",
  "fileCount": 76,
  "integrity": "sha512-z4VZorB+JZ3Vc1AIItPeSsbtVj3kP9tZQsZqEW1NoX3LQbY3NgqVGYFcKZD9iH1SUE1PSNXnCL+FKtOFuElAZQ==",
  "signatures": [
    {
      "sig": "MEUCIQC4jyhOA6h9mS76v8ZxYGmAGCeIaDkP5gu7UuDaVB88WAIgBSit3OhZeFtGu80dg+DKorxNhRdv7Ew27n7BuUSL04s=",
      "keyid": "SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"
    }
  ],
  "unpackedSize": 285251
}

Repository

PENDING
0xgasless/agentkit

Shared repository data · GitHub

License detected in repository
Not collected

Metadata history

Meaningful changes
Current collected state Current

Observed since 21 Oct, 08:55 UTC

No superseded metadata states collected. Unchanged observations do not create new revisions.

Record identity

package_version:c70c658c94d89d8bdec260a81256e963074228fe7aed2fa82e563be280b0a350

Other collected versions

1.0.111 Aug1.0.010 Aug0.0.178 Aug0.0.1527 Aug0.0.1411 Jun0.0.1311 JunView all collected versions →