npcpy
by NPC-Worldwide
npcpy is a python library for the NPC Toolkit and the home of the core command-line programs that make up the NPC Shell (`npcsh`). It is an agent-based framework designed to easily integrate AI models into one's daily workflow.
Last updated: N/A
What is npcpy?
npcpy is an agent-based framework and Python library designed to integrate AI models into daily workflows. It provides various interfaces to use, test, and explore the capabilities of AI models, agents, and agent systems, including command-line tools like npcsh
, guac
, npc
, alicanto
, pti
, spool
, yap
, and wander
.
How to use npcpy?
To use npcpy, install it via pip (pip install npcpy
). You can then use the command-line tools like npcsh
and guac
directly from your terminal. The npcsh
tool will generate a .npcshrc
file in your home directory for configuration. You can also use the Python library to create and manage AI agents and teams, as shown in the examples in the README. Refer to the documentation for detailed usage instructions and examples.
Key features of npcpy
Agent-based framework
LiteLLM integration for multiple LLM providers (Ollama, OpenAI, Anthropic, Gemini, Deepseek)
Command-line tools (npcsh, guac, npc, alicanto, pti, spool, yap, wander)
Support for local and enterprise LLMs
Team management for AI agents
Ability to include images, PDFs, and CSVs in LLM responses
Tools for building and updating knowledge graphs
Agentic interfaces for specialized workflows
Voice control loop
Use cases of npcpy
Automating tasks with AI agents
Integrating AI into daily workflows
Experimenting with different LLMs and agent configurations
Developing NLP-based applications
Creating custom agentic interfaces
Deep research with focused agent flows
Interactive coding with AI assistance
Voice-controlled agent interactions
Thinking outside the box with AI
FAQ from npcpy
What is NPC Shell?
What is NPC Shell?
The NPC shell is a suite of executable command-line programs that allow users to easily interact with NPCs and LLMs through a command line shell.
What is guac
?
What is guac
?
guac
is a replacement shell for interpreters like python/r/node/julia with an avocado input marker π₯ that brings a pomodoro-like approach to interactive coding.
What providers does npcpy support?
What providers does npcpy support?
npcpy works with local and enterprise LLM providers through its LiteLLM integration, allowing users to run inference from Ollama, LMStudio, OpenAI, Anthropic, Gemini, and Deepseek.
How do I install npcpy?
How do I install npcpy?
npcpy is available on PyPI and can be installed using pip (pip install npcpy
). Make sure you have the necessary dependencies installed on your system.
How do I configure API keys?
How do I configure API keys?
To use tools that require API keys, create an .env
file in the folder where you are working or place relevant API keys as env variables in your ~/.npcshrc. If you already have these API keys set in a ~/.bashrc or a ~/.zshrc or similar files, you need not additionally add them to ~/.npcshrc or to an .env
file.