npcpy  by NPC-Worldwide

AI toolkit for agent-based workflows, model integration, and rapid NLP development

created 10 months ago
838 stars

Top 43.4% on sourcepulse

GitHubView on GitHub
Project Summary

This Python library and shell provide an agent-based framework for integrating AI models into workflows. It targets developers and researchers seeking to easily use, test, and explore AI models, agents, and agent systems through various interfaces like a Python library, a bash-like shell (npcsh), and an interactive coding environment (guac). The primary benefit is accelerated development and simplified testing of NLP and agent-based applications.

How It Works

The framework leverages LiteLLM for broad LLM provider integration (Ollama, OpenAI, Anthropic, Gemini, etc.). npcsh acts as a natural language and bash-compatible shell, intelligently routing commands to AI agents or executing bash code. guac offers a Pomodoro-inspired REPL for interactive coding, allowing code generation, execution, and variable inspection. Agents can be defined with directives and models, enabling complex agentic behaviors and tool use.

Quick Start & Requirements

  • Installation: pip install npcpy (or npcpy[lite], npcpy[local], npcpy[yap], npcpy[all] for extended features).
  • Prerequisites: Python 3.x, espeak, portaudio19-dev, alsa-base, alsa-utils, libcairo2-dev, libgirepository1.0-dev, ffmpeg, inotify-tools (Linux); portaudio, ffmpeg, pygobject3 (macOS); Ollama, FFmpeg (Windows). Ollama and model pulls (e.g., ollama pull llama3.2) are recommended.
  • Setup: Requires installing system dependencies and potentially Ollama. Configuration involves an .npcshrc file and optional .env for API keys.
  • Docs: npcpy.readthedocs.io

Highlighted Details

  • Supports local and enterprise LLM providers via LiteLLM integration.
  • npcsh allows switching between agentic, conversational, and direct bash execution modes.
  • guac provides a unique interactive coding REPL with a Pomodoro-like session structure.
  • Pioneering methods for knowledge graph construction and mixture-of-agent scenarios.

Maintenance & Community

  • Active development with recent significant structural changes noted (v0.3.35, v0.3.33).
  • Contributions welcome via GitHub issues and pull requests.
  • Newsletter signup available for updates.

Licensing & Compatibility

  • MIT License.
  • Compatible with commercial use and closed-source linking.

Limitations & Caveats

The project has undergone significant structural changes, with some components like NPCCompiler being phased out. Fedora installation is noted as "under construction." Some functionalities like /ots and /whisper are specifically mentioned as working well on Windows, implying potential platform-specific nuances.

Health Check
Last commit

3 days ago

Responsiveness

Inactive

Pull Requests (30d)
2
Issues (30d)
0
Star History
271 stars in the last 90 days

Explore Similar Projects

Feedback? Help us improve.