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 🙏

© 2025 – Pkg Stats / Ryan Hefner

secretagent.sh

v1.1.1

Published

**Pay-as-you-go LLM keys and secret management tools for AI agents - powered by [secretagent.sh](https://secretagent.sh)**

Downloads

3

Readme

SecretAgent.sh 🔐🕶️🤖

Pay-as-you-go LLM keys and secret management tools for AI agents - powered by secretagent.sh

  • Centralized secret management with integrated access logs
  • Secrets inserted by proxy so agent never has direct access
  • Agent auth and payments powered by crypto wallets
  • Support managing a fleet of agents with shared config/secrets
  • Central project wallet enables agent self-funding workflows
  • Instant config changes without code changes or redeploying
  • No changes needed to existing API calls/sdk integrations!
  • Agent fleet monitoring and management

Drop-in integration

  • Login/signup on secretagent.sh
  • Create new project and send some funds to the project wallet
  • pnpm install secretagent.sh in agent repo (or npm/yarn/bun/etc)
  • Integrate SecretAgent sdk (see below)
  • Boot up agent
  • Approve your agent in dashboard
import SecretAgent from 'secretagent.sh';
import OpenAI from 'openai';

// create your wallet / walletProvider however you normally would
// your wallet is used to authenticate with the SecretAgent api
// so secrets needed are still be owned by the agent / hosting platform
const wallet = new ethers.Wallet(process.env.WALLET_PRIVATE_KEY);

// Initialize SecretAgent (global singleton)
await SecretAgent.init({
  projectId: '0x123abc...', // project ID from dashboard - also the central project wallet address
  agentLabel: 'chatbot assistant v2', // will be visible in dashboard
  agentId: wallet.address,
  signMessage: (msg) => wallet.signMessage(msg),
});

const client = new OpenAI({ apiKey: SecretAgent.config.LLM_API_KEY });

[!NOTE] HTTP calls are automatically proxied and API keys are inserted appropriately


This tool supports 3 kinds of config keys:

Pay-as-you-go LLM API keys

Instead of using your own OpenAI/etc API keys, you can use our keys and pay-as-you-go.

  • Agents can self-fund their own LLM calls by sending funds to project wallet
  • Dynamically swap model, provider, and other LLM settings at the proxy, enabling instant changes
  • Human operated kill switch to disable rogue agents

Bring-your-own API keys

Use your own api keys (for any apis, not just LLMs) but insert them by proxy

  • Per item configuration for matching domain rules, only matching requests rerouted to proxy
  • Keys inserted by proxy, so agent never has direct access
  • Enables instant key rotation / revocation
  • Usage-based pricing, paid by central project-wallet

Static config (not proxied)

Also supports static config, fetchable by agent, rather than inserted by proxy.

  • Useful for non-sensitive config that affects agent behaviour
  • Or sensitive keys that must be used for additional computation within agent code

Using project config items

Using pay-as-you-go LLM keys

Use SecretAgent.config to get your LLM key placeholder (for example SecretAgent.config.LLM_API_KEY) LLM requests will automatically be proxied, and the key will be inserted. Connect to OpenAI as you normally would.

LangChain example

import { ChatOpenAI } from '@langchain/openai';
const llm = new ChatOpenAI({ apiKey: SecretAgent.config.LLM_API_KEY });

OpenAI SDK example

import OpenAI from 'openai';
const client = new OpenAI({ apiKey: SecretAgent.config.LLM_API_KEY });

[!TIP] You can access these keys before calling SecretAgent.init(), because a static placeholder key is used.

[!NOTE] Our shared llm type keys automatically proxy any calls to api.openai.com, but allow you to switch providers and modify other settings like temperature and model on the fly without redeploying your agents

Using bring-your-own API keys

Create config items in the dashboard and set the domain matching rules appropriately. Use SecretAgent.config to get placeholder key, and use your SDKs as you normally would.

Generic example

Create user keys called COOL_API_KEY_ID and COOL_API_KEY_SECRET, set the domain rules for each to api.supercool.com

import { CoolApi } from 'cool-api-sdk'
const coolApiClient = new CoolApi({
  apiKeyId: SecretAgent.config.COOL_API_KEY_ID,
  apiKeySecret: SecretAgent.config.COOL_API_KEY_SECRET,
})

Langsmith example

Create a new user key called LANGSMITH_API_KEY, set the domain rules to api.smith.langchain.com

// LangChain sdks detect this key being present in env and enables tracing
process.env.LANGSMITH_API_KEY = SecretAgent.config.LANGSMITH_API_KEY;

Using static config

For static items, the SecretAgent.config helper will return the actual value rather than a placeholder.

if (SecretAgent.config.FEATURE_FLAG_1 === '1') {
  // do something...
}

[!WARNING] Static items must be used after SecretAgent.init(). After init completes, the library will throw an error if any static items were already accessed.