Skip to content

👥 User System

The Cat provides a basic user management system that allows having separated memories for each user. The user system affects only the working memory and the episodic memory. The other memories are shared among users.

More in details, the websocket client indicates the current user_id by calling the ws://localhost:1865/ws/{user_id} endpoint. The Cat uses such user_id to retrieve the user's working memory and to store the user's conversation (using the user_id as a metadatum).


Please, note that the user management system works only when using a custom client. Its usage is not intended from the admin interface, which, by default, uses user_id = "user".


The Cheshire Cat provides two API clients, written in Python and Typescript, that allow exploiting the user management system.


Setting the user_id from a custom client:

import cheshire_cat_api as ccat

cat_client = ccat.CatClient()

# Send a message specifying the user_id
message = "Hello my friend!!"
cat_client.send(message, user_id="user05")
import { CatClient } from 'ccat-api'

const cat = new CatClient({
    baseUrl: 'localhost'

cat.send('Hello my friend!!', 'user05');

TODO: Add hook example to retrive document only few users.