Table of Contents

Cheshire Cat AI

Cheshire Cat AI is an open-source framework for building custom AI agents as microservices1). It provides a ready-made architecture with plugin system, long-term memory (episodic, declarative, procedural), built-in RAG, multi-LLM support, and an API-first design – all running in a single Docker container.

ai_agent framework microservice plugin rag memory docker open_source

Repository https://github.com/cheshire-cat-ai/core
Website https://cheshirecat.ai
Language Python
License GPL-3.0
Creator Piero Savastano (pieroit)
Port 1865 (default)

Overview

Cheshire Cat AI lets developers build custom AI agents in minutes rather than months. Instead of wiring together LLMs, vector databases, memory systems, and APIs from scratch, the framework provides all of these as a cohesive microservice2). Developers extend functionality through a simple plugin system using hooks, tools, and forms – no complex OOP required. The framework is 100% Dockerized, API-first, and language-model agnostic.

Key Features

Architecture

graph TD A[Client Application] --> B{API Layer} B --> C[REST Endpoints] B --> D[WebSocket Chat] C --> E[Cheshire Cat Core] D --> E E --> F[Agent System] F --> G{Memory System} G --> H[Episodic Memory] G --> I[Declarative Memory] G --> J[Procedural Memory] G --> K[Working Memory] H --> L[Qdrant Vector DB] I --> L J --> L F --> M{LLM Provider} M --> N[OpenAI] M --> O[Anthropic] M --> P[Ollama / vLLM] M --> Q[Cohere / HuggingFace] F --> R[Plugin System] R --> S[Hooks] R --> T[Tools] R --> U[Forms] E --> V[RAG Pipeline] V --> W[Document Ingestion] W --> X[PDF / TXT / MD / URL] V --> L E --> Y[Admin Panel :1865/admin]

Plugin System

Plugins are simple Python folders placed in cat/plugins/. A minimal plugin requires:

# Example: Custom hook to filter responses
from cat.mad_hatter.decorators import hook
 
@hook
def agent_fast_reply(fast_reply, cat):
    if len(cat.working_memory.declarative_memories) == 0:
        fast_reply["output"] = "Sorry, I don't know the answer."
    return fast_reply
# Example: Custom tool
from cat.mad_hatter.decorators import tool
 
@tool
def get_weather(location: str, cat) -> str:
    """Get the current weather for a location."""
    return f"Weather in {location}: Sunny, 22C"

Memory System

Memory Type Purpose Storage
Episodic Chat history and conversation context Qdrant vectors
Declarative Uploaded documents and external knowledge Qdrant vectors
Procedural Tools, plugins, and learned procedures Qdrant vectors
Working Temporary session data, state machines In-memory (per session)

All long-term memories support export/import for backup and migration.

Installation

# Quick start with Docker
docker run --rm -it -p 1865:80 ghcr.io/cheshire-cat-ai/core:latest
 
# Access points:
# Admin Panel: http://localhost:1865/admin
# API Docs: http://localhost:1865/docs
# WebSocket: ws://localhost:1865/ws

Integration

Cheshire Cat integrates with the broader infrastructure as a microservice:4)

See Also

References

4)
Cheshire Cat AI. Official Website. cheshirecat.ai