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

ursa-copilot

v0.1.1

Published

Ursa Health's AI Copilot

Readme

Ursa Copilot

Ursa Copilot is a tool to help data engineers make sense of healthcare claims data packages. It sets up a three-way conversation between the data engineer, the LLM, and the procedural code of Ursa Copilot.

Ursa Copilot drives the conversation based on a series of questions in an editable prompts file. It poses the questions to the LLM, which has the option of running a SQL query, asking the data engineer for clarification, or attempting to answer the question with an assertion that can be accepted or rejected from the data engineer.

graph TD;
    style User fill:#71bf00,stroke:#333,stroke-width:2px;
    style Ursa_Copilot fill:#71bf00,stroke:#333,stroke-width:2px;
    style Database fill:#999,stroke:#333,stroke-width:2px;
    style LLM fill:#71bf00,stroke:#333,stroke-width:2px;
    User([Data Engineer]) --> |Reviews Work<br>Answers Clarifications<br>Accepts/Rejects Assertions| Ursa_Copilot([Ursa Copilot]);
    Ursa_Copilot --> |Forwards Clarifications<br>Forwards Assertions| User;
    Ursa_Copilot --> |Executes SQL| Database[(Database)];
    Ursa_Copilot --> |Structures Conversation<br>Forwards SQL Results | LLM([LLM]);
    Database --> |Returns SQL Results| Ursa_Copilot;
    LLM --> |Writes SQL<br>Asks Clarifications<br>Makes Assertions | Ursa_Copilot;

How to use

There are three ways to use Ursa Copilot.

Run Ursa Copilot locally

The git repo of Ursa Copilot ships with a sample implementation in Next.js, which can be run locally on your workstation, as follows:

 $ (cd engine && npm install)
 $ cd nextjs-app
 $ npm install
 $ npm run dev

You will want to set DATABASE_TYPE and TARGET_DATABASE_URL in /nextjs-app/.env.local. You can edit the prompts in the prompts directory to fit your workflow.

Integrate Ursa Copilot into your application

The npm package of Ursa Copilot contains just the engine, without the Next.js sample implementation, and it can be incorporated into an existing application.

 $ npm install ursa-copilot

You can look at the nextjs-app directory as a reference implementation, but usage will look something like:

const options = {
    log: (contents) => {
        sendLogToUser(contents);
    },
    prompts: {
        "investigate-pharmacy": "Override prompt text"
    },
    promptUser: async (message) => {
        const userResponse = await waitForSocketResponse();
        return userResponse;
    },
    query: async (sql, params) => {
        const result = await executeDatabaseQuery(sql, params);
        return result;
    },
    sendMessage: (message: string, type: string) => {
        sendMessageToUser(type || "message", { text: message });
    }
}
await investigate("pharmacy", tableName, existingDocumentation, options);

Use Ursa Studio

If you're looking to use Ursa Copilot in the context of a battle-tested enterprise SaaS platform which covers the full breadth of healthcare data needs, contact [email protected] and ask about Ursa Studio, which has Ursa Copilot as one of its features.

HIPAA concerns

Yes, PHI is absolutely going to be flowing through this system. What makes Ursa Copilot HIPAA-compliant is that it uses AWS Bedrock and leverages your existing AWS account. You'll need to have an AWS account, with the BAA paperwork and all the other compliance steps in place.