Agent Smithers Matrix bot (modular)
Project description
Agent Smithers
Agent Smithers is an agentic AI assistant for the Matrix chat protocol using the Responses API format for OpenAI, xAI, or local models through LM Studio. It keeps separate conversation history for each user, lets people choose their own models and personas. It also supports search and code execution tools, remote MCP servers, and image or video features such as Grok Imagine and Sora. It even has GPT-4o available, if you miss that model.
This is a fork of inifinigpt-matrix
Table of Contents
Quick Start
pip install .
cp .env.example .env
# Edit .env — set MATRIX_*, DEFAULT_MODEL, and at least one provider key
agent-smithers --env-file .env
Or without installing the package:
pip install -r requirements.txt
python -m agent_smithers --env-file .env
Documentation
Full documentation lives in the docs/ folder:
- docs/getting-started.md — prerequisites, install, first run
- docs/configuration.md — all environment variables with types and defaults
- docs/commands.md — complete command reference
- docs/tools-and-mcp.md — hosted tools and remote MCP server setup
- docs/lm-studio.md — local model setup via LM Studio
- docs/operations.md — E2E encryption, device verification, store persistence
- docs/docker.md — running in Docker
- docs/architecture.md — internal design
- docs/development.md — contributing and code style
Commands
Send these in any room the bot has joined.
User commands
| Command | What it does |
|---|---|
.ai <message> |
Chat with the bot using your conversation history |
BotName: <message> |
Same as .ai — address by name |
.x <user> <message> |
Send a message into another user's conversation context |
.persona <text> |
Set a personality using the configured prompt wrapper |
.custom <prompt> |
Replace your system prompt with arbitrary text |
.reset |
Clear your history and restore the default persona |
.stock |
Clear your history and run without any system prompt |
.mymodel [name] |
Show your current model, or set a per-user override |
.location [place] |
Show, set, or clear your location (added to system prompt) |
.help |
Show inline help (reads help.md if present) |
Admin commands
Admins are set via MATRIX_ADMINS in .env.
| Command | What it does |
|---|---|
.model [name|reset] |
Show available models, or change the active model globally |
.tools [on|off|toggle|status] |
Enable or disable hosted tools and MCP at runtime |
.clear |
Reset history and defaults for all users |
.verbose [on|off|toggle] |
Control whether the brevity clause is included in new conversations |
Conversation Persistence
Conversation history can be encrypted and saved to disk so it survives restarts. Generate a key and add it to .env:
agent-smithers --generate-key
# Paste the output into .env as HISTORY_ENCRYPTION_KEY
History is stored in store/history.enc alongside the Matrix device state. Without a key, history remains in-memory only (the default).
Configuration
Copy .env.example to .env. Minimum required variables:
MATRIX_SERVER=https://matrix.org
MATRIX_USERNAME=@bot:example.org
MATRIX_PASSWORD=secret
MATRIX_CHANNELS=!roomid:example.org
DEFAULT_MODEL=gpt-4o
OPENAI_API_KEY=sk-...
See docs/configuration.md for all variables, including LM Studio, MCP servers, tool toggles, history size, and E2E encryption settings.
E2E Encryption
The bot supports end-to-end encrypted Matrix rooms via matrix-nio[e2e]. This requires libolm to be available. Persist the store/ directory (or whatever MATRIX_STORE_PATH points to) across restarts to retain device keys. See docs/operations.md for verification and troubleshooting.
Contributing
See CONTRIBUTING.md for the contribution process and code style guide.
License
AGPL-3.0 — see LICENSE for details.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file agent_smithers-1.1.0.tar.gz.
File metadata
- Download URL: agent_smithers-1.1.0.tar.gz
- Upload date:
- Size: 75.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e7f547c6b3894204bc2d5bd4565fa9a82543f4fe5039262157bcbb311c6e8c88
|
|
| MD5 |
a009563b2045207c60f1f8f7e5ede2b2
|
|
| BLAKE2b-256 |
68579c1ef966aff3f383e6f313a14a9e277b34fe6dec88ce6ef879133476c3ec
|
Provenance
The following attestation bundles were made for agent_smithers-1.1.0.tar.gz:
Publisher:
pypi-publish.yml on h1ddenpr0cess20/agent-smithers
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
agent_smithers-1.1.0.tar.gz -
Subject digest:
e7f547c6b3894204bc2d5bd4565fa9a82543f4fe5039262157bcbb311c6e8c88 - Sigstore transparency entry: 1109261633
- Sigstore integration time:
-
Permalink:
h1ddenpr0cess20/agent-smithers@3f97809ceeea143e9027cf6d244eff9f707658bb -
Branch / Tag:
refs/tags/v1.1.0 - Owner: https://github.com/h1ddenpr0cess20
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pypi-publish.yml@3f97809ceeea143e9027cf6d244eff9f707658bb -
Trigger Event:
release
-
Statement type:
File details
Details for the file agent_smithers-1.1.0-py3-none-any.whl.
File metadata
- Download URL: agent_smithers-1.1.0-py3-none-any.whl
- Upload date:
- Size: 63.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a9ff01077e0dbf70b54cabc4a7b5cc317b3a736461dd4a051497f42c959b6cb0
|
|
| MD5 |
c3ee86193b73ff3b0b30deea83499f29
|
|
| BLAKE2b-256 |
0ae6f4368407f1f0dcd39e28da5fb24df75f0823a8e05faf21a61c345d1bae21
|
Provenance
The following attestation bundles were made for agent_smithers-1.1.0-py3-none-any.whl:
Publisher:
pypi-publish.yml on h1ddenpr0cess20/agent-smithers
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
agent_smithers-1.1.0-py3-none-any.whl -
Subject digest:
a9ff01077e0dbf70b54cabc4a7b5cc317b3a736461dd4a051497f42c959b6cb0 - Sigstore transparency entry: 1109261634
- Sigstore integration time:
-
Permalink:
h1ddenpr0cess20/agent-smithers@3f97809ceeea143e9027cf6d244eff9f707658bb -
Branch / Tag:
refs/tags/v1.1.0 - Owner: https://github.com/h1ddenpr0cess20
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pypi-publish.yml@3f97809ceeea143e9027cf6d244eff9f707658bb -
Trigger Event:
release
-
Statement type: