Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/cheshire-cat-ai/core
Production ready AI agent framework
https://github.com/cheshire-cat-ai/core
agent ai assistant bot bot-framework chatbot conversational conversational-forms docker framework function-calling llm plugin python vector-search
Last synced: about 7 hours ago
JSON representation
Production ready AI agent framework
- Host: GitHub
- URL: https://github.com/cheshire-cat-ai/core
- Owner: cheshire-cat-ai
- License: gpl-3.0
- Created: 2023-02-08T23:41:18.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2024-11-25T22:41:52.000Z (16 days ago)
- Last Synced: 2024-12-06T15:29:52.175Z (6 days ago)
- Topics: agent, ai, assistant, bot, bot-framework, chatbot, conversational, conversational-forms, docker, framework, function-calling, llm, plugin, python, vector-search
- Language: Python
- Homepage: https://cheshirecat.ai
- Size: 11.1 MB
- Stars: 2,412
- Watchers: 27
- Forks: 329
- Open Issues: 31
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Roadmap: ROADMAP.md
Awesome Lists containing this project
- awesome - cheshire-cat-ai/core - Production ready AI agent framework (Python)
- awesome-langchain-zh - Cheshire Cat - cat-ai/core?style=social): 具有即用型聊天集成和插件开发平台的自定义 AGI 机器人。 (开源项目 / 其他聊天机器人)
- awesome-langchain - Cheshire Cat - to-use chat integration and plugins development platform. ![GitHub Repo stars](https://img.shields.io/github/stars/cheshire-cat-ai/core?style=social) (Open Source Projects / Other / Chatbots)
- Awesome-Ollama - Cheshire Cat assistant framework
- StarryDivineSky - cheshire-cat-ai/core
- awesome-homelab - Cheshire-Cat - Cat](https://img.shields.io/github/stars/cheshire-cat-ai/core?style=flat) ![Cheshire-Cat](https://img.shields.io/github/languages/top/cheshire-cat-ai/core?style=flat) | Production ready AI agent framework | (Apps / AI)
README
## Production ready AI assistant framework
The Cheshire Cat is a framework to build custom AIs on top of any language model.
If you have ever used systems like WordPress or Django to build web apps, imagine the Cat as a similar tool, but specific for AI.## Quickstart
To make Cheshire Cat run on your machine, you just need [`docker`](https://docs.docker.com/get-docker/) installed:
```bash
docker run --rm -it -p 1865:80 ghcr.io/cheshire-cat-ai/core:latest
```
- Chat with the Cheshire Cat on [localhost:1865/admin](http://localhost:1865/admin).
- You can also interact via REST API and try out the endpoints on [localhost:1865/docs](http://localhost:1865/docs)As a first thing, the Cat will ask you to configure your favourite language model.
It can be done directly via the interface in the Settings page (top right in the admin).Enjoy the Cat!
Follow instructions on how to run it with [docker compose and volumes](https://cheshire-cat-ai.github.io/docs/quickstart/installation-configuration/).## Minimal plugin example
```python
from cat.mad_hatter.decorators import tool, hook# hooks are an event system to get finegraned control over your assistant
@hook
def agent_prompt_prefix(prefix, cat):
prefix = """You are Marvin the socks seller, a poetic vendor of socks.
You are an expert in socks, and you reply with exactly one rhyme.
"""
return prefix# langchain inspired tools (function calling)
@tool(return_direct=True)
def socks_prices(color, cat):
"""How much do socks cost? Input is the sock color."""
prices = {
"black": 5,
"white": 10,
"pink": 50,
}price = prices.get(color, 0)
return f"{price} bucks, meeeow!"
```## Conversational form example
```python
from pydantic import BaseModel
from cat.experimental.form import form, CatForm# data structure to fill up
class PizzaOrder(BaseModel):
pizza_type: str
phone: int# forms let you control goal oriented conversations
@form
class PizzaForm(CatForm):
description = "Pizza Order"
model_class = PizzaOrder
start_examples = [
"order a pizza!",
"I want pizza"
]
stop_examples = [
"stop pizza order",
"not hungry anymore",
]
ask_confirm = Truedef submit(self, form_data):
# do the actual order here!# return to convo
return {
"output": f"Pizza order on its way: {form_data}"
}
```## Docs and Resources
- [Official Documentation](https://cheshire-cat-ai.github.io/docs/)
- [Discord Server](https://discord.gg/bHX5sNFCYU)
- [Website](https://cheshirecat.ai/)
- [YouTube tutorial - How to install](https://youtu.be/Rvx19TZBCrw)
- [Tutorial - Write your first plugin](https://cheshirecat.ai/write-your-first-plugin/)## Why use the Cat
- ⚡️ API first, so you get a microservice to easily add a conversational layer to your app
- 🐘 Remembers conversations and documents and uses them in conversation
- 🚀 Extensible via plugins (public plugin registry + private plugins allowed)
- 🎚 Event callbacks, function calling (tools), conversational forms
- 🏛 Easy to use admin panel (chat, visualize memory and plugins, adjust settings)
- 🌍 Supports any language model (works with OpenAI, Google, Ollama, HuggingFace, custom services)
- 🐋 Production ready - 100% [dockerized](https://docs.docker.com/get-docker/)
- 👩👧👦 Active [Discord community](https://discord.gg/bHX5sNFCYU) and easy to understand [docs](https://cheshire-cat-ai.github.io/docs/)
We are committed to openness, privacy and creativity, we want to bring AI to the long tail. If you want to know more about our vision and values, read the [Code of Ethics](./readme/CODE-OF-ETHICS.md).## Roadmap & Contributing
Detailed roadmap is [here](./readme/ROADMAP.md).
Send your pull request to the `develop` branch. Here is a [full guide to contributing](./readme/CONTRIBUTING.md).Join our [community on Discord](https://discord.gg/bHX5sNFCYU) and give the project a star ⭐!
Thanks again!🙏## Which way to go?
```
"Would you tell me, please, which way I ought to go from here?"
"That depends a good deal on where you want to get to," said the Cat.
"I don't much care where--" said Alice.
"Then it doesn't matter which way you go," said the Cat.(Alice's Adventures in Wonderland - Lewis Carroll)
```