Code Monkey home page Code Monkey logo

npi's Introduction

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!

๐Ÿ› ๏ธTry NPi Online: Try NPi on online Playground

๐Ÿ‘€ 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)

img.png

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

  1. Stop and remove the NPi container:
    docker stop npi
    docker rm npi
  2. Revoke your GitHub access token by revisiting: GitHub Tokens Page.

Python SDK

NPI Python SDK

Multi-app Agent Examples

  1. Calendar Negotiator
  2. Twitter Discord
  3. GitHub Notifier

More: https://www.npi.ai/docs/examples

Roadmap

https://www.npi.ai/docs/roadmap

License

BSL v1.1

npi's People

Contributors

idiotwu avatar unseenmars avatar wenfengwang avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

npi's Issues

Support Slack

Support Slack:

slack.chat("sending message to xxx") 
slack.chat("what @xxx just said")

Event trigger

from npiai.app.github import Github
from npiai.app.google import Calendar

agent1 = Agent(prompt="...")
agent1.use(GitHub(), Gmail())

agent.when("npi-ai/npi has new issues, sending an email to [email protected] with the body of issue")

Multiagents collaboration

from npiai.core import Agent
 
agent1 = Agent(prompt="...")
agent1.use(Gmail(), Calendar())
 
agent2 = Agent(prompt="...")
agent2.use(GitHub())
 
agent3 = Agent.group(agent1, agent2)
agent3.run(task="...")

Feature Request: Integrate OpenAI Assistant API

Description

It would be highly beneficial to integrate the OpenAI Assistant API to enhance user interactions and provide intelligent assistance.

Rationale

  1. Enhanced Interaction: Provides a more dynamic and responsive user experience.
  2. Intelligent Assistance: Offers smart suggestions and help based on user queries.
  3. Future-proofing: Keeps the application updated with the latest AI advancements.

Suggested Approach

  1. Research and evaluate the OpenAI Assistant API capabilities.
  2. Design a plan to integrate it into our current system architecture.
  3. Develop and test the integration thoroughly.

Potential Challenges

  1. API Limitations: Understanding the limitations and constraints of the OpenAI Assistant API.
  2. Integration Complexity: Ensuring the API integrates smoothly with our existing setup.
  3. Cost Management: Assessing and managing the cost of API usage.

Additional Notes

  • Continuous monitoring and improvement post-integration will be essential.
  • Collaborate with OpenAI support for any technical assistance.

Feature Request: Enhanced AI Interactions

I would like to propose a new feature enhancement for the project. It would be beneficial to incorporate more advanced AI interaction capabilities, allowing users to engage in more natural and intuitive conversations. This could involve implementing newer AI models and enhancing the dialogue management system to provide a seamless user experience.

Suggested Features

  • Integration of state-of-the-art AI models.
  • Improvements in dialogue management for better contextual understanding.
  • User-friendly interfaces to interact with the AI.
  • Extensive documentation and examples on how to utilize the new features.

I believe these enhancements will significantly improve the overall functionality and user satisfaction. Looking forward to feedback from the community and maintainers.

Support Whatsapp

  1. interactive with Whatsapp
whatsapp.chat("sending message to xxx") 
whatsapp.chat("what @xxx just said")
  1. HITL with Whatsapp

Human in the loop API

class HITLHandler(ABC):
    @abstractmethod
    def handle(self, req: HITLRequest) -> HITLResponse:
        pass

    @abstractmethod
    def type(self) -> api_pb2.ActionType:
        pass

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.