npcpy  by NPC-Worldwide

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

Created 11 months ago
924 stars

Top 39.5% 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

1 day ago

Responsiveness

1 day

Pull Requests (30d)
1
Issues (30d)
2
Star History
61 stars in the last 30 days

Explore Similar Projects

Starred by Luis Capelo Luis Capelo(Cofounder of Lightning AI), Addy Osmani Addy Osmani(Head of Chrome Developer Experience at Google), and
23 more.

goose by block

0.8%
20k
Open-source AI agent for automating complex engineering tasks
Created 1 year ago
Updated 21 hours ago
Starred by Elvis Saravia Elvis Saravia(Founder of DAIR.AI), Chip Huyen Chip Huyen(Author of "AI Engineering", "Designing Machine Learning Systems"), and
4 more.

activepieces by activepieces

0.9%
18k
Open-source Zapier alternative for AI workflow automation
Created 2 years ago
Updated 22 hours ago
Feedback? Help us improve.