Skip to content
/ otto Public

minimalistic library for building intelligent AI Agents straight from Python Objects

License

Notifications You must be signed in to change notification settings

mindsdb/otto

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

description

Otto: The minimalistic Framework to build AI Assistants

Welcome to Otto, the most minimalistic library for building intelligent AI Assistants, adept for also handling multitenancy and secure authentication.

pip install ottoai

Example

Turn the Github SDK into an agent that can answer questions from Github live data using pandas to calculate results.

import os
import openai
import logger
logging.basicConfig(level=logging.DEBUG)
import json

# create an assistant
eve = Assistant(name="eve", personality="Like Scarlett Johansson with John Oliver's wits", llm_engine=openai, model="gpt-4-1106-preview")

# Make your agent capable of answering questions and do all things Github, by simply passing the sdk module
# Remember. Just pass objects as skills, and Otto will figure out the rest. 
eve.add_pip_skill(pip_module='PyGithub')

# Start a conversation and add user specific context (variable names must be interpretable, Otto will take care of the rest)
# In this case the assistant will need access token to github, this is so you can pass context dynamically (solving for multitenancy)
eve.set_user_context_variables({"github_api_token":os.getenv("GITHUB_TOKEN")}) 

# ask a question
response = eve.question("Who were the last 5 people to star the mindsdb/otto repo?")
print(json.dumps(response, indent=4))

As simple as that, no need to build tools or chaining, just pass objects as skills, otto figures out the rest.

About

minimalistic library for building intelligent AI Agents straight from Python Objects

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages