Skip to main content

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. 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:

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.

Metadata

Release files for agent-smithers 1.3.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for agent-smithers 1.3.0
File Size Uploaded
agent_smithers-1.3.0.tar.gz 98.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for agent-smithers 1.3.0
File Interpreter ABI Platform
agent_smithers-1.3.0-py3-none-any.whl Python 3 none any Details

Total release size: 185.3 kB

Release files / agent_smithers-1.3.0.tar.gz

Download URL agent_smithers-1.3.0.tar.gz
Size 98.8 kB
Tags Source
SHA-256 checksum
How to use checksums
cef95a2dd30d058f160de7973a865a5ac906105fa177ef8b64aee5dac8cce27b
BLAKE2b-256 checksum
How to use checksums
3e70d1ab6afb6d9a61555b94015df9d0599f1a7a64265b47541759827706c0bf
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jun 23, 2026.

Transparency log

Release files / agent_smithers-1.3.0-py3-none-any.whl

Download URL agent_smithers-1.3.0-py3-none-any.whl
Size 86.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e216ba012957e575d2c1a1bf20549120ae9beb5276c2ca82e27ac7e4f61b3c1b
BLAKE2b-256 checksum
How to use checksums
af8cd572066ab6cb7cb3e4d349a914bdca92f80c4ab605768ce2bded822e5615
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jun 23, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

1.3.0 This release

2 release files

1.2.0

2 release files

1.1.0

2 release files

1.0.1

2 release files

1.0.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page