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

@drdoc-com/pi-openai-api-wrapper

v1.0.4

Published

Web Endpoint as PI Package for PI Agent (pi.dev), with Ollama API and OpenAI API compability.

Readme

pi-openai-api-wrapper

Web endpoint package for the Pi Agent (pi.dev), providing full compatibility with the Ollama API and the OpenAI Chat Completions API.

Description

The pi-openai-api-wrapper package acts as a bridge between standard AI interfaces and the PI Agent (pi.dev). By exposing endpoints compatible with the OpenAI Chat Completions API (/v1/chat/completions) and the Ollama API (/api/chat, /api/generate), it enables any modern software supporting these standard protocols (e.g. Dr.DOC DMS/ECM) to seamlessly utilize PI Agent as its AI provider. This setup extends standard language model capabilities by allowing external applications to leverage PI Agents tool execution, custom skills, and package ecosystem for autonomous, multi-step tasks.

Use Cases

  • Enhanced Document Indexing in DMS: Integration into Document Management Systems (e.g. Dr.DOC DMS/ECM) as a custom AI model provider. Incoming documents such as supplier invoices are enriched by retrieving reference data directly from an ERP system via PI Agent packages, enabling automatic validation of prices, quantities, and delivery dates before populating metadata and triggering downstream workflows.
  • Drop-in AI Provider Replacement: Connecting existing tools, CLI utilities, or IDE extensions designed for OpenAI or Ollama to PI Agent without modifying the host application's codebase.
  • Automated Data Reconciliation & Validation: Executing complex, multi-system checks where incoming unstructured request data must be verified against internal databases or APIs before returning structured responses to the caller.
  • Agentic Task Delegation via Standard APIs: Delegating interactive tasks (such as live web browsing, file system manipulations, or custom script executions) from standard chat applications or API clients directly into isolated PI Agent sessions.

Features

  • OpenAI Compatible: Exposes /v1/chat/completions to integrate Pi seamlessly with existing OpenAI tooling.
  • Ollama Compatible: Exposes native Ollama endpoints /api/chat and /api/generate (including basic streaming support via NDJSON).
  • Autonomous Sessions: Each incoming API request spins up an independent Pi agent session using the specified model.

Installation

via npm:

pi install npm:@drdoc-com/pi-openai-api-wrapper

or via git:

pi install git:https://github.com/drdoc-com/pi-openai-api-wrapper

Configuration

Set the listening port via environment variable:

export PI_API_WRAPPER_PORT=8090

Enable Debugging:

export PI_API_WRAPPER_DEBUG=1