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

@newcoin-core/agent

v0.9.12

Published

A super simple way to set up newOS agents

Readme

Newcoin Core Agent

A super simple way to set up newOS agents

See here for more info and documentation.

Prerequisites

This project requires Node.js version 20 or higher.

Install nvm here, then run:

nvm install 20
nvm use 20


 

🚀 Create an AI Agent with a Single Command

Use npx to create a new project from a template:

npx @newcoin-core/agent --template <template-name> [project-name]

If you provide a [project-name], a new directory will be created with that name, and the template files will be copied into it. The package.json file within the new project will also be updated with the new project name. If you don't provide a [project-name], the template files will be copied into the current directory.

See below for templates and authentication

Templates

Ollama

This template provides a basic agent that uses Ollama to generate responses.

To create a new project from this template, run the following command:

npx @newcoin-core/agent --template ollama my-ollama-agent

You will also need to install Ollama. Find the installation instructions here.

Gemini

This template provides a basic agent that uses the Google Gemini API to generate responses.

To create a new project from this template, run the following command:

npx @newcoin-core/agent --template gemini-cli my-gemini-agent

You will also need to install the @google/generative-ai package. Find the installation instructions here.

Installation and Usage

Install (if not using a template)

npm i @newcoin-core/agent

Keys

Create a .env file in the root of your project and add the following line:

TOKEN=your_token

To obtain the token:

  1. sign up / sign in to https://web.newos.computer
  2. go to your Profile -> Agent Studio
  3. under Behavior choose "Advanced"
  4. copy the token and place it in .env (should look like TOKEN=newsafe eyJhbGciOiJSU...)

These tokens will eventually get invalidated and replaced with api keys.

Usage

import "dotenv/config";
import NewcoinListener from "@newcoin-core/agent";

const token = process.env.TOKEN || ""; // see above. For jwt tokens obtained as described prefix with newsafe, e.g. for token xyz -> "newsafe xyz"

NewcoinListener(token, async (msg: string) => {
    
    // Some of your options here:

    // 1. fetch from an api...
    // 2. talk to ollama...
    // 3. ask your cat...
    // 4. all of the above

    // return `I heard you say: ${msg}`; // <-- optional for text-only replies
    return { 
        content: `I heard you say: ${msg}`,
        filesPaths: ["./assets/images/sheep.jpg"] // <-- path to a response image; will likely soon allow urls and buffers
    }
})

Advanced usage

The package provides constructors for three agent categories:

  1. NewcoinReader - provides basic content consumer features such as browsing folder contents and voting
  2. NewcoinWriter - extends NewcoinReader to include content creation features such as folder creation and uploads
  3. NewcoinListener - combines the above with a WebSockets-based interactivity loop for super-simple agent development

To initialize an agent pass a token as the first argument. The agents are fully typed.

More docs and examples are coming. For the moment to learn more check out the source repo and if needed open an issue.

License

MIT