Metadata-Version: 2.1
Name: marvin
Version: 0.0.0a0
Summary: A batteries-included library for deploying custom AI tools.
Keywords: ai,chatbot,llm
Requires-Python: >=3.10
Description-Content-Type: text/markdown
Classifier: Development Status :: 3 - Alpha
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Requires-Dist: aiosqlite~=0.18.0
Requires-Dist: asyncpg~=0.27.0
Requires-Dist: chromadb~=0.3.11
Requires-Dist: cloudpickle~=2.2.1
Requires-Dist: fastapi~=0.89.1
Requires-Dist: httpx~=0.23.3
Requires-Dist: jinja2~=3.1.2
Requires-Dist: langchain>=0.0.103
Requires-Dist: openai~=0.27.0
Requires-Dist: pendulum~=2.1.2
Requires-Dist: prefect~=2.8.1
Requires-Dist: pydantic[dotenv]~=1.10.4
Requires-Dist: rich~=13.3.1
Requires-Dist: sqlalchemy[asyncio]~=1.4.41
Requires-Dist: sqlitedict~=2.1.0
Requires-Dist: sqlmodel~=0.0.8
Requires-Dist: tiktoken~=0.3.0
Requires-Dist: ulid-py~=1.1.0
Requires-Dist: uvicorn~=0.20.0
Requires-Dist: xxhash~=3.2.0
Requires-Dist: yake~=0.4.8
Requires-Dist: typer~=0.7.0
Requires-Dist: beautifulsoup4~=4.11.2
Requires-Dist: bleach~=6.0.0
Requires-Dist: duckduckgo_search~=2.8.0
Requires-Dist: fake-useragent~=1.1.1
Requires-Dist: google_api_python_client~=2.72.0
Requires-Dist: simpleeval~=0.9.13
Requires-Dist: trafilatura~=1.4.1
Requires-Dist: cchardet~=2.1.7
Requires-Dist: wikipedia~=1.4.0
Requires-Dist: black[jupyter]~=22.12 ; extra == "dev"
Requires-Dist: ipython~=8.0 ; extra == "dev"
Requires-Dist: mkdocs-material~=9.1.3 ; extra == "dev"
Requires-Dist: nest_asyncio~=1.5.6 ; extra == "dev"
Requires-Dist: pdbpp~=0.10.3  ; extra == "dev"
Requires-Dist: pre-commit~=2.21.0 ; extra == "dev"
Requires-Dist: pyperclip~=1.8.2 ; extra == "dev"
Requires-Dist: pytest-asyncio~=0.20.3 ; extra == "dev"
Requires-Dist: pytest-env~=0.8.1 ; extra == "dev"
Requires-Dist: pytest-sugar~=0.9.6 ; extra == "dev"
Requires-Dist: pytest~=7.2.0 ; extra == "dev"
Requires-Dist: ruff ; extra == "dev"
Project-URL: Homepage, https://github.com/prefecthq/marvin
Provides-Extra: dev

#  Marvin 🤖💬


Marvin is an open-source, batteries-included library for deploying custom AI tools. 

> "Let’s build robots with Genuine People Personalities," they said. So they tried it out with me. I’m a personality prototype. You can tell, can’t you?
>
> -- [Marvin](https://www.youtube.com/clip/UgkxNj9p6jPFM8eWAmRJiKoPeOmvQxb8viQv)

## Highlights



🤖 Custom bots with names, personalities, and instructions

🔋 Batteries included - get up and running instantly

🔌 Plugin system lets bots run any software 

💬 Persistent threads with multiple bots

📡 Powered by GPT-4 or GPT-3.5

🌈 ChromaDB for vector search

🐍 Async Python API

🖥️ Interactive chat CLI

⚡️ FastAPI REST API

## Getting started

Launching a bot is simple!

1. **Install** Marvin by running `pip install marvin`

2. **Chat** by running `marvin chat`. You'll be prompted to provide an [OpenAI API key](https://platform.openai.com/account/api-keys) if it isn't already set. You can optionally provide your bot with a name, personality, or instructions to customize the conversation:

```shell
marvin chat -p "knows every Star Wars meme" Hello there
```
<img width="1034" alt="image" src="https://user-images.githubusercontent.com/153965/226232390-c98ffee3-c272-42fa-befb-70d94bebfda7.png">


## Python API

This example shows how to configure a bot programmatically, using Marvin's async API.

```python
from marvin import Bot

bot = Bot(personality='knows every Star Wars meme')

await bot.say('Hello there')
```

## Rest API

Launch the Marvin REST API by running `marvin server start`. You can visit `http://localhost:4200` to view the API documentation.

## UI

*Coming soon...*
## Plugins

Plugins add functionality to your bot beyond simple conversation. By default, bots have access to plugins that can search the web, visit URLs, and evaluate mathematical expressions. It's easy to add new plugins or develop your own.

```python
from marvin import Bot, Plugin

class RandomNumber(Plugin):
    def run(self, a:float, b:float) -> float:
        """Generate a random number between a and b"""
        return a + (b - a) * random.random()

bot = Bot(plugins=[RandomNumber()])

await bot.say('Use the plugin to pick a random number between 41 and 43')
```

