# npcpy

A Python library of primitives for building multimodal LLM agents, including personas, tool-using agents and knowledge graphs, that works with local backends such as Ollama and llama.cpp as well as cloud providers.

npcpy is a Python library for research and development with multimodal language models, agentic AI, and knowledge graphs. It provides an `NPC` class for defining a persona with a name, a primary directive and a chosen model and provider, a direct `get_llm_response` function for one-off calls, and an `Agent` class that ships with default tools such as shell, Python, file editing and web search.

Its Context-Agent-Tool data layer is meant to enforce compliance in software rather than relying on prompt instructions, and it supports building teams of multiple agents. It works with local providers, including Ollama, llama.cpp and LM Studio, and with cloud providers, and installs with `pip install npcpy`.

Website: https://github.com/NPC-Worldwide/npcpy
