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

@hedge-layer/agent-h

v0.6.0

Published

Deprecated: use Agent H Desktop (https://hedgelayer.ai/docs/agent-h-desktop)

Readme

Agent H

[!WARNING] Agent H Terminal is deprecated. Version 0.6.0 is the final release and will receive no further updates. Use Agent H Desktop (Linux and Windows) or the WhatsApp pilot instead. Both use the same Hedge Layer account and token. Hedge Layer's cloud agent is now read-only, so the terminal's local approval and execution commands no longer have anything to approve.

Agent H is the terminal client for the shared Hedge Layer cloud agent. The same Strands agent runs in Amazon Bedrock AgentCore for the terminal, desktop, and future chat integrations. Hedge Layer's authenticated API owns access to it.

The cloud agent discovers Hedge Layer MCP tools, preserves the desktop's research shortlist and human selection checkpoint, and runs its Bayesian/Kelly calculation in deterministic code. File and command tools run in a separate private AgentCore Code Interpreter sandbox. The terminal keeps explicit approvals and signed venue requests local.

Setup

Requires Node.js 22.19 or newer and an interactive terminal. Install from npm; no repository access is required:

npm install -g @hedge-layer/agent-h
export AGENT_H_HEDGE_LAYER_TOKEN=hl_your_personal_api_token
agent-h doctor
agent-h

Create a personal API token in Hedge Layer account settings. One token with read scope authenticates the cloud agent and MCP data access. No OpenAI API key, model-provider account, or model selection is needed. Hedge Layer manages the upstream model and its credentials. Add trade scope if you want to submit or cancel orders after local approval.

The environment variable above keeps your Hedge Layer token out of Agent H’s saved configuration. To save it instead, run agent-h hedge-layer init --token <your-personal-token>. Set AGENT_H_HEDGE_LAYER_MCP_URL, or use hedge-layer init --url, to change the MCP endpoint and use the same origin for the cloud agent. A custom endpoint must provide both /mcp (or your configured MCP path) and /api/agent/v1/turns. HTTPS is required except for local loopback development. Agent H does not use OPENAI_API_KEY, OPENAI_MODEL, or OPENAI_BASE_URL.

Research and execution

Ask questions naturally, for example:

Find open Polymarket markets about interest rates and compare their liquidity.
Retrieve the resolution rules for this market and identify missing evidence.
Submit the Polymarket order I prepared locally.

Tools explicitly marked read-only run automatically unless they are also marked destructive or need private venue input. All other tools display their exact arguments and wait for /approve or /reject. Each approval applies to one call. /stop or Ctrl+C cancels a pending approval and the active turn.

Polymarket execution uses locally signed requests. Prepare a request JSON file with your local venue SDK or signing tool; it contains the exact signed_body and venue auth required by Hedge Layer's advertised tool schema. For order status, the file contains order_id and auth. Wallet private keys and API secrets stay with your local signer. The signed request and short-lived auth are sent only to Hedge Layer and the venue.

When Agent H requests private execution input:

/load /path/to/signed-request.json
/approve

Loading shows the decoded request for review while hiding credentials and signatures. Agent H sends the exact loaded snapshot after approval. Prepare the request shortly before loading it: Hedge Layer requires fresh venue authentication. The file supplies private fields locally; never paste credentials or signed request bodies into the conversation.

Agent H does not sign orders or hold wallet keys. A read-scoped Hedge Layer token cannot execute trades; create a token with trade scope to enable execution. Execution calls are never automatically retried. A submitted or interrupted call may already have reached the venue; inspect order status before submitting again. Local execution records survive failed or interrupted model turns.

Session commands

  • /new, /threads, /resume <id>, /status
  • /sources — link to account-wide financial data settings
  • /follow-up <question>, /stop
  • /load <file>, /approve, /reject
  • /clear, /help, /exit

Type while a response is running to queue a follow-up. The queue holds five messages. Interrupting or failing a turn discards dependent queued follow-ups. The conversation shell requires a terminal; there is no unattended execution mode.

Privacy and local state

The conversation loop, research tools, and model calls run in AWS. Prompts and redacted tool results are sent through the Hedge Layer API. The API passes your personal token to the trusted runtime for MCP authentication; the token never enters model context, conversation storage, logs, or the code sandbox.

Cloud conversation history uses AgentCore managed session storage. It expires after 14 idle days and resets on runtime deployment. The clients keep a local transcript and can restore visible text and validated shortlists into a new cloud session. Workspace files are temporary: the separate sandbox lasts one hour. Download artifacts before it expires. Stopping a command preserves existing files.

Local state stays under $XDG_CONFIG_HOME/agent-h or ~/.config/agent-h on Unix, and %APPDATA%\agent-h on Windows. Set AGENT_H_HOME for an isolated profile. Config and conversation files use user-only permissions where supported.

Configured secrets are redacted before display and persistence. Private venue request files are read only through /load; their credentials are kept out of model tool arguments and transcripts. Tool results remain untrusted data. Exact decimal strings, units, and provider provenance pass through from Hedge Layer.

For the full setup guide, visit hedgelayer.ai/docs/agent-h.

Cloud development

The agent implementation, model harness, and Terraform/GitHub Actions deployment live in the independent private agent-h-runtime repository. See its README for deployment, the channel-neutral API, workspace downloads, test commands, and rollout. Deploy the API before distributing these clients. Existing Pi clients retain their legacy inference endpoint during rollout; the new clients do not fall back to a local agent.

Shared data sources

Use /sources in the terminal to get the Data sources settings link on your configured Hedge Layer site. Sign in with the same account that owns your terminal token. Selections apply across Desktop, terminal and WhatsApp for that account, even when the clients use different tokens. WhatsApp must be linked to a token from that same account. The command is handled locally, never sent to the model, and does not change the active conversation or preferences itself.

Agent H refreshes its tools on the next message, and Hedge Layer enforces saved selections on new tool calls. Past results remain and requests already admitted may finish. Trading scopes and explicit approvals remain separate.