Report Abuse

Basic Information

NPi is an open-source platform and SDK that provides tool-use APIs to enable AI agents to take actions and interact with external software and applications. It presents a Natural-language Programming Interface that lets developers expose functions as callable tools for language models. The README highlights a quick start showing how to define a FunctionTool, annotate tool methods with a decorator, and integrate with an OpenAI client to pass tool schemas to the model and execute tool calls. The project is installable via pip as npiai, offers examples and documentation, a web playground, and a community Discord. The project is under active development, APIs may change, and the maintainers recommend using the command line tool or examples to try it out.

Links

Categorization

App Details

Features
NPi exposes a FunctionTool base class and a @function decorator to register Python callables as tools with generated JSON schemas compatible with LLM function-calling formats. It integrates with OpenAI chat completions by supplying a tools package and supports tool_choice and async execution of tool calls. The repo includes a one-minute quick start, example code showing schema and function-call results, installation via pip, links to documentation and examples, an online playground, and a community Discord. The package returns structured tool_call entries and tool results in the model response format so developers can implement programmatic handlers for model-invoked actions.
Use Cases
NPi streamlines building agents that can perform real actions by turning ordinary Python functions into LLM-callable tools and handling the plumbing between the model and executable code. Developers can rapidly prototype action-capable agents, generate function schemas automatically for OpenAI function-calling, receive tool_call objects from model responses, and execute those calls asynchronously to return results. The quick start demonstrates a Fibonacci tool, showing how the model requests a tool and the tool returns the computed value. Documentation, examples, and a playground help users learn patterns for agent tool use, while an active community and planned cloud offerings signal ongoing ecosystem support.

Please fill the required fields*