Chaz

Chaz is an AI bot for Matrix

Last verified:

Visit Chaz

What is Chaz?

Chaz is an open-source AI bot for the Matrix decentralized chat protocol that connects to multiple Large Language Model (LLM) providers, allowing users to chat with any LLM model directly from their Matrix client. It is compatible with any model using the OpenAI API and can also use AIChat as a provider, giving access to any models available through AIChat.

Key features include command-based interaction with !chaz prefix, support for multiple backends (OpenAI-compatible APIs and AIChat), role/system prompt customization, conversation context retention, room-based chat with encryption support, Docker deployment option, and Nix flake support for easy installation. The bot watches for commands in rooms but responds to every message in DMs, and it automatically accepts room invites for users in an allow_list.

Chaz is designed for Matrix users who want AI assistance in their chat rooms, developers who want to integrate LLMs into their Matrix infrastructure, privacy-conscious users who prefer self-hosted AI solutions, and anyone who wants to use various LLM models (GPT-4o, GPT-4o-mini, and others) through their favorite Matrix client like Element.

Chaz pricing

Pricing model: Freemium

Free and open-source under MIT license. No paid tiers. Users must provide their own API keys to LLM providers (OpenAI, Together.xyz, or other OpenAI-compatible backends) or set up their own local AI. API usage costs are charged directly to your provider accounts (e.g., OpenAI charges your account). The bot itself is completely free to self-host.

Chaz pros

  • Supports multiple LLM providers through OpenAI API compatibility
  • Works with AIChat CLI tool for access to additional models
  • Self-hosted option gives full control over API keys and data
  • Compatible with any Matrix client (Element and others)
  • Supports Matrix encryption for private conversations
  • Role/system prompt customization with !chaz role command
  • Docker image available for easy deployment
  • Nix flake support for Nix/NixOS users
  • Context retention across conversations in rooms
  • Allow list feature controls who can use the bot
  • Message limit and room size limit settings available
  • !chaz clear command to ignore older messages
  • !chaz rename auto-renames room based on chat content
  • !chaz print shows full conversation history
  • MIT license allows free use and modification
  • Written in Rust for performance and safety
  • Public Matrix room #chaz:jackson.dev for community help

Chaz cons

  • Requires your own API keys or local AI setup
  • No official releases yet, run from git HEAD recommended
  • Requires two config files when using Docker (chaz + aichat)
  • Must setup allow_list or bot will not respond
  • Only packaged on crates.io, no other package managers
  • In rooms, only responds to !chaz prefixed messages
  • Does not respond to older messages from before it joined
  • AIChat CLI tool must be installed separately

Frequently asked questions about Chaz

What is Chaz?

Chaz is an AI bot for Matrix that connects to multiple LLM providers to allow chatting with any LLM model. It is compatible with any model using the OpenAI API and can also use AIChat as a provider for additional models.

Do I need my own API keys?

Yes, you need your own API keys or your own local AI already configured. There is no built-in paid service; you bring your own access to LLM providers.

How do I start using Chaz quickly?

If you have your own API keys, you can get started quickly with @chaz:jackson.dev. Simply add that Matrix user to your room, configure it with your own API keys to an OpenAI API compatible backend, and you're good to go.

What commands does Chaz support?

Chaz supports: !chaz help, !chaz print (print conversation), !chaz send <message> (send without context), !chaz model <model> (select model), !chaz backend (add OpenAI-compatible backend), !chaz role (get/set/define roles), !chaz list (list models), !chaz clear (ignore older messages), and !chaz rename (rename room based on chat).

How does Chaz behave in rooms vs DMs?

In a DM, Chaz responds to every message it doesn't recognize as a command. In larger rooms, it only responds to messages prefixed with !chaz. It will also accept room invites for any user in the allow_list.

Which LLM models can I use?

Any model using the OpenAI API (like gpt-4o, gpt-4o-mini) and any model available through AIChat. You can manually add OpenAI-compatible backends with !chaz backend command.

How do I install Chaz?

Install from crates.io or run from git HEAD. For Nix users, use 'nix run github:arcuru/chaz'. Docker image available on Docker Hub (arcuru/chaz:main). Requires installing AIChat separately and creating a config.yaml file.

What is the allow_list?

The allow_list is a regex pattern for allowed Matrix accounts. Chaz will only automatically accept room invites for users matching this pattern. You must setup allow_list or the bot will not respond.

Can I customize Chaz's personality?

Yes, using !chaz role command. You can show current role and list available roles with !chaz role, set an existing role with !chaz role <name>, or create a new role with !chaz role <name> <prompt>.

Is there community support?

Yes, there is a public Matrix room available at #chaz:jackson.dev where you can get help. The project is on GitHub at github.com/arcuru/chaz with 56 stars and is licensed under MIT.

Categories

Use cases

Browse all AI tools on NeedAnAI