npcpy  by NPC-Worldwide

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

Created 1 year ago
1,208 stars

Top 32.1% 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
29 stars in the last 30 days

Explore Similar Projects

Starred by Eric Zhu Eric Zhu(Coauthor of AutoGen; Research Scientist at Microsoft Research), Elvis Saravia Elvis Saravia(Founder of DAIR.AI), and
2 more.

deepagents by langchain-ai

2.0%
10k
Framework for building advanced LLM agents
Created 7 months ago
Updated 1 day ago
Starred by Eric Zhu Eric Zhu(Coauthor of AutoGen; Research Scientist at Microsoft Research), Elie Bursztein Elie Bursztein(Cybersecurity Lead at Google DeepMind), and
27 more.

goose by block

1.6%
31k
Open-source AI agent for automating complex engineering tasks
Created 1 year ago
Updated 20 hours ago
Feedback? Help us improve.