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

@moxxy/agent

v0.24.0

Published

Batteries-included entry to moxxy: one install + one call to run an agent. Bundles @moxxy/core, the default loop, and the OpenAI + Anthropic providers behind drop-in presets — `setupAgent(openaiPreset({ apiKey }))`.

Downloads

1,408

Readme

@moxxy/agent

The fastest way to run a moxxy agent — one install, one call. Batteries included: it bundles the runtime (@moxxy/core), the default loop, and the OpenAI + Anthropic providers behind drop-in presets.

npm i @moxxy/agent

Hello, agent

import { setupAgent, openaiPreset } from '@moxxy/agent';

const { ask } = setupAgent(openaiPreset({ apiKey: process.env.OPENAI_API_KEY }));

console.log(await ask('Write a haiku about TypeScript.'));

Stream the events instead:

const { stream } = setupAgent(openaiPreset({ apiKey: process.env.OPENAI_API_KEY }));

for await (const event of stream('Explain async generators.')) {
  if (event.type === 'assistant_chunk') process.stdout.write(event.delta);
}

Claude, or both

import { setupAgent, openaiPreset, anthropicPreset } from '@moxxy/agent';

// Just Claude:
const claude = setupAgent(anthropicPreset({ apiKey: process.env.ANTHROPIC_API_KEY }));

// Or register both and switch per turn (the first preset is active):
const agent = setupAgent([
  openaiPreset({ apiKey: process.env.OPENAI_API_KEY }),
  anthropicPreset({ apiKey: process.env.ANTHROPIC_API_KEY }),
]);
await agent.ask('Hi from OpenAI');
agent.setProvider('anthropic');
await agent.ask('Now from Claude');

Add tools, swap blocks live

import { setupAgent, openaiPreset } from '@moxxy/agent';
import { defineTool } from '@moxxy/sdk';
import { z } from 'zod';

const agent = setupAgent(openaiPreset({ apiKey: process.env.OPENAI_API_KEY }));

agent.addTool(
  defineTool({
    name: 'get_weather',
    description: 'Current weather for a city.',
    inputSchema: z.object({ city: z.string() }),
    handler: async ({ city }) => `Sunny in ${city}.`,
  }),
);

console.log(await agent.ask("What's the weather in Paris?"));

agent.session is the live moxxy Session — full control for anything the sugar doesn't cover.

Presets

| preset | options | |---|---| | openaiPreset(opts?) | apiKey (→ OPENAI_API_KEY), model, baseURL (OpenAI-compatible vendors: z.ai/xAI/Google/Ollama) | | anthropicPreset(opts?) | apiKey (→ ANTHROPIC_API_KEY), model |

Need more control or a different provider/mode? Drop down to @moxxy/core's setupAgent({ plugins, provider, tools, … }) and register any blocks you like — @moxxy/agent re-exports setupAgent and all its types.

License

MIT