npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@tychilabs/agent-finance

v1.0.0

Published

Financial home for AI agents — TypeScript SDK for self-custody wallets on the agent's device, policy on every spend, local signing, x402 payments, and ERC-8004 identity.

Readme

npm version Self-Custody x402 Policy ERC-8004

What is it?

TypeScript SDK for Tychi Agent Finance. Connect your app or agent runtime to Tychi — local identity and wallet on the agent's device, policy-controlled spending, local signing when money moves.

Using Cursor / Claude / MCP? Use @tychilabs/agent-finance-mcp instead. This package is for direct code integration.

What it is not

  • Not a generic RPC wallet library.
  • Not a full agent runtime or LLM host.
  • Not an MCP server.

Install

npm install @tychilabs/agent-finance
  • Node.js >= 20
  • ESM (or TS targeting ESM)

Quickstart

import { Policy, onboardNewAgent } from "@tychilabs/agent-finance";

const { session, client } = await onboardNewAgent({
  baseUrl: "https://agents.tychilabs.com",
  agentName: "My Agent",
  vaultPassword: "local-vault-password",
  sessionPassword: "session-password",
  llmApiKey: process.env.OPENAI_API_KEY!,
  provider: "openai",
  chainId: 10143,
  policy: Policy.execute({
    chains: [10143],
    actions: ["get_portfolio", "transfer_native"],
    maxPerTxUsd: 25,
  }),
});

const run = await session.run({
  message: "Check my wallet balance.",
});

console.log(run.text);

// If Tychi returns a pending tx or x402 payment:
// await client.tx.signBroadcastAndResume(pending, run.run_id, provider, vaultPassword);
// await client.x402.signFetchAndResume(pending, run.run_id, provider, vaultPassword);

Returning agent with existing vault? loadOrCreateAgentKeypaircreateTyiClientauth.login() → session — see Architecture.

What you get

| Area | Main APIs | | --- | --- | | Onboard | onboardNewAgent, onboardAgent | | Client | createTyiClient, listCatalog, listTools, listProviders | | Session | startSession, session.unlock, applyPolicy, session.run | | Policy | Policy.readOnly, Policy.execute | | Wallet | wallets.create, wallets.bindLocal — single wallet V1 | | Transactions | tx.signBroadcastAndResume | | x402 | x402.signFetchAndResume, external wallet helpers | | ERC-8004 | registerErc8004, registerErc8004Onboard, profile helpers |

Trust boundary

  • Agent's device: TYI seed + EVM key in local vault (~/.tyi by default). Tx and x402 signatures happen here.
  • Your app inputs: vaultPassword, sessionPassword, llmApiKey, baseUrl — pass as function args (tests may use env vars).
  • Tychi: orchestrates sessions, policy, and prepared actions. Prepares txs/x402 to match policy; does not hold the agent's private key.

Docs

| Doc | Topic | | --- | --- | | architecture.md | Flow, local vs remote | | vault.md | Identity + encrypted wallet | | x402.md | In-session + external buyer flows | | erc8004.md | Agent on-chain identity | | testing.md | Live scenario tests |

Related packages

| Package | Role | | --- | --- | | @tychilabs/agent-finance (this) | TypeScript SDK | | @tychilabs/agent-finance-mcp | MCP for Cursor, Claude, OpenClaw, Hermes | | agent-finance | Monorepo |

Security

See SECURITY.md.

License

Apache-2.0 — see LICENSE.