Coder Social home page Coder Social logo

bondai's Introduction

Description or Alt text

License: MIT PyPI Docker

Meet BondAI, an open source, AI-powered assistant with a lightweight, versatile API for seamless integration into your own applications.

Checkout the BondAI Homepage (https://bondai.dev) for in depth documentation, examples and API specification.

Getting Started

There are 3 ways to use BondAI:

  1. ๐Ÿ› ๏ธ Command Line Interface (CLI) - This is the easiest way to get up and running fast. Run BondAI on your command line with a pre-configured set of tools.

  2. ๐Ÿ‹ Docker - Running BondAI in a Docker container is recommended if you plan on using tools that run code or directly access your shell.

  3. ๐Ÿ—๏ธ Start Coding with BondAI - Integrate BondAI into your own codebase and start building your own agents.

๐Ÿš€ Installation

Installing BondAI is easy:

pip install bondai

๐Ÿ› ๏ธ Command Line Interface (CLI)

Once you've installed BondAI using pip install bondai the CLI will be available as an executable accessible simply by running bondai in your shell. Learn more about all of the tools and options available through the CLI.

Before running bondai you will need to set the OPENAI_API_KEY environment variable.

export OPENAI_API_KEY=sk-XXXXXXXXXX

Once the environment variable has been set you can run bondai to start the CLI.

% bondai                   
Loading BondAI...
Skipping Gmail tools because gmail-token.pickle file is not present.

Hello! How can I assist you today?

๐Ÿ‹ Docker

BondAI Docker images are available on DockerHub here. If you intend to use tools that run arbitrary code (PythonREPLTool) or access your shell (ShellTool) it is highly recommended that you run BondAI in a Docker container as these tools can damage your machine.

Before running the BondAI Docker container it is recommended that you create a directory named 'agent-volume' and mount it as a volume on the container. This will be used as the Agent's working directory and allows you to easily share files with the Agent.

mkdir agent-volume
docker pull krohling/bondai:latest
docker run -it --rm \
           -v ./agent-volume:/agent-volume \
           -w /agent-volume \
           OPENAI_API_KEY=sk-XXXXXXXXXX \
           bondai:latest bondai

๐Ÿ”ฅ Start Coding with BondAI

BondAI has a straightforward API for creating powerful AI Agents. Check out our examples for ideas on how to get started. Remember to set your OPENAI_API_KEY environment variable before running your BondAI Agent.

from bondai import Agent
from bondai.tools.search import DuckDuckGoSearchTool
from bondai.tools.website import WebsiteQueryTool
from bondai.tools.file import FileWriteTool

task = """I want you to research the usage of Metformin as a drug to treat aging and aging related illness. 
You should only use reputable information sources, ideally peer reviewed scientific studies. 
I want you to summarize your findings in a document named metformin.md and includes links to reference and resources you used to find the information. 
Additionally, the last section of your document you should provide a recommendation for a 43 year old male, in good health and who regularly exercises as to whether he would benefit from taking Metformin. 
You should explain your recommendation and justify it with sources. 
Finally, you should highlight potential risks and tradeoffs from taking the medication."""

Agent(tools=[
  DuckDuckGoSearchTool(),
  WebsiteQueryTool(),
  FileWriteTool()
]).run(task)

BondAI Integrations

BondAI comes out of the box with a powerful set of integrations.

openai logo OpenAI BondAI supports any combination of OpenAI models and services including GPT-4, GPT-3.5, Dalle-E 3, and Embeddings.
azure logo Microsoft Azure BondAI fully supports connectivity to GPT-N, Dalle-E and Embedding APIs through Microsoft's Azure OpenAI services.
google logo Google Search Allows BondAI to search the internet. Requires a Google Search API Key and CSE ID
duckduckgo logo DuckDuckGo Allows BondAI to search the internet. No API keys required.
alpaca markets logo Alpaca Markets Allows BondAI to buy and sell stocks and crypto. Requires an Alpaca Markets account.
postgres logo PostgreSQL BondAI can automatically extract the schema from a Postgres DB and process natural language queries.
bland.ai logo Bland AI Allows BondAI to make phone calls and process/retrieve call transcripts. Requires a Bland.ai account.
gmail logo Gmail Allows BondAI to search and read emails.
langchain logo LangChain Use BondAI's LangChainTool class to import any tool from LangChain into BondAI.

bondai's People

Contributors

krohling avatar daz-williams avatar

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.