Skip to content

Message the Cat

The Cat is an API-first framework, it is intended to be used machine to machine. Anything can be done via endpoints, so you can easily add a web UI or a mobile app on top.

A minimal web UI is included in plugin ui, automatically installed at first launch. Find it at localhost:1865.
The UI also allows you to manage settings and plugins.

The web playground

To use the Cat from another application check out the endpoints:

To message an agent, send a POST request to:

POST /agents/{slug}/message
  • {slug} is the id of the agent you want to talk to. Every fresh install ships a built-in agent with slug default, so use default if you have not written your own agent yet. You can list every registered agent at localhost:1865/agents.
  • Authentication is a single header: Authorization: meow. meow is the default master key for local development. Change it before going to production (see Authentication).
  • The body carries the conversation as a list of messages, composed of one or more ContentBlock.

Here is how to call the endpoint from Python and JavaScript:

import requests
response = requests.post(
"http://localhost:1865/agents/default/message",
headers={"Authorization": "meow"},
json={
"messages": [
{
"role": "user",
"content": [
{
"type": "text",
"text": "what do you know about socks?",
}
],
}
],
"stream": False,
},
)
reply = response.json()["messages"][-1]["text"]
print(reply)

If you activate the stream flag, you will receive a stream of AGUI events.