npi
npi copied to clipboard
Action library for AI Agent
NPI
[!WARNING] NPi is currently under active development and the APIs are subject to change in the future release. It is recommended to use the command line tool to try it out.
NPi is an open-source platform providing Tool-use APIs to empower AI agents with the ability to take action in virtual world!
👀 NPi Example: Highly recommended to check this first - See what you can build with NPi.
🔥 Introducing NPi: Why we build NPi?
📚 NPi Documentation: How to use NPi?
📢 Join our community on Discord: Let's build NPi together 👻 !
Quickstart
Installation
Command Line Tool
Download the binary from the following links.
# For macOS
curl -O https://s.npi.ai/cli/latest/darwin/npi
# For Linux
curl -O https://s.npi.ai/cli/latest/linux/npi
Then move it to /usr/local/bin
or any other directory in your PATH
:
chmod +x npi
sudo mv npi /usr/local/bin
Verify the installation by running npi version
. If you see the output similar to the following, you are all set:
{
"BuildDate": "2024-05-15_16:26:11-0500",
"GitCommit": "8341471",
"Platform": "linux/amd64",
"Version": "v0.0.3"
}
Setting Up NPi Server
[!TIP] If Docker is not yet installed on your system, refer to the Docker Installation Guide for setup instructions.
Replace YOUR_OAI_KEY
with your actual OpenAI API Key, then execute:
docker run -d --name npi --pull always \
-p 9140:9140 \
-e OPENAI_API_KEY=YOUR_OAI_KEY npiai/npi
Confirm server connectivity by running npi connect test
, it may take a few seconds. If you receive a NPi Server is operational!
message, the
setup is
successful. Otherwise, consult the logs with docker logs npi
and report issues
to NPi GitHub Repository.
Try the GitHub App
Authorize NPi to access your GitHub account
Generate a new token via GitHub Tokens Page for NPi, you may need to grant the repo
scope so that NPi can access
repositories on behalf of you. (Read more about scopes)
Then, authorize NPi's access to your GitHub account with the following command:
npi auth github --access-token YOUR_GITHUB_ACCESS_TOKEN
Support the NPi Repository
Easily star and fork the NPi Repository using:
npi app github "what's the first PR of npi-ai/npi, include the access url, and output with json format"
# if you like npi, star us for support
npi app github "star npi-ai/npi"
Clean up
- Stop and remove the NPi container:
docker stop npi docker rm npi
- Revoke your GitHub access token by revisiting: GitHub Tokens Page.
Python SDK
Multi-app Agent Examples
- Calendar Negotiator
- Twitter Discord
- GitHub Notifier
More: https://www.npi.ai/docs/examples
Roadmap
https://www.npi.ai/docs/roadmap
License
BSL v1.1