Skip to main content

personagent: illustrated conversations

A character for your group chats that knows when to stay quiet, and learns from being corrected.

PyPI CI Python 3.10–3.14 License: MIT

English · 简体中文

personagent is a character for your group chats: pick one or write your own, and run it on any OpenAI-compatible model. It connects to QQ, WeChat, Telegram and Discord itself, and to KOOK, Feishu, DingTalk, Slack, WeCom, Mattermost and Misskey from the same page.

Start in a local browser chat: add one model key and say hello. When you want the character in a group, connect an app with a phone scan or one or two values.

The Connect apps screen of the local page, with every platform it can join

Connect apps, in the same local page as setup and the character chat. Screenshot from a throwaway setup with a local test model.

Start here

Install it from PyPI and open it:

python -m pip install personagent
personagent

With uv, uvx personagent runs it without a separate install step.

The browser opens on a local page with three views: Chat, Connect apps and Character & settings. Paste your model API key and click Verify & start chatting; one small request checks it. There are 10 model service presets plus any other OpenAI-compatible one, and name and personality presets for the character. The Persona box holds persona.txt; saving it restarts the agent and keeps what it learned. More features turns on web search, image understanding and speaking first. Running personagent again reuses a page that is already open.

Want QQ? Open Connect apps, pick QQ and scan the code with mobile QQ: it creates a bot or picks one you already made, and personagent connects to QQ itself. Pasting the AppID and AppSecret is the fallback. Until the bot is certified, QQ lets it join only groups you own, and which group messages it receives is set in QQ.

On Windows you can also download the source ZIP and double-click start.bat; from a clone, run python quickstart.py. Python 3.10–3.14. See the short getting-started guide; terminal commands and connectors are in the full guide.

Why personagent

It knows when to stay quiet.
It answers when called. Otherwise a model judges whether a person would chime in: no dice roll.
A burst of messages gets one reply, not one each.
It learns from corrections that hold up.
A change needs two agreeing reactions from the same chat, one of them strong.
A troll or a bystander cannot retrain it.
Every change is on record, and any of them can be rolled back.
It is easy to start, and lives where your group is.
Browser setup and chat in English or Chinese, with 11 model services and optional advanced settings.
It joins QQ, WeChat, Telegram and Discord by itself and a dozen more apps from the same page; a local dashboard shows what it did.
  • Each chat has its own memory.
  • Editing the character keeps what it learned.
  • It is measured: personagent eval scores when it speaks, whether it stays in character, and whether corrections stick (results).

Put it in your group

Use Connect apps in the local page. Credentials are checked before they are saved.

  • Connected by personagent itself: QQ official bots (scan with mobile QQ), personal WeChat (scan with your phone; one-to-one chats only, since WeChat gives such bots no group messages), Telegram (a BotFather token) and Discord (a bot token, with Message Content Intent on).
  • One or two values: KOOK, Feishu/Lark (long connection), DingTalk (Stream mode), Slack (Socket Mode; the guide link pre-fills the app), WeCom AI bot (long connection), Mattermost and Misskey.
  • Advanced (needs a public address or other software): WeCom app, WeChat Official Account, QQ webhook, OneBot v11 and Satori.

The second and third groups run through an AstrBot that personagent downloads, with its own Python 3.12, and runs in the background: no dashboard, no second login.

Whatever the page or personagent up starts stops with it, however it ends, and anything a crashed run left behind is stopped at the next start. Everything you connected starts again the next time you open it.

From the terminal: personagent up runs the agent, the direct connections and the managed AstrBot together; init --terminal is the terminal setup; chat talks to the character in the terminal; demo shows it without a key; run starts the server alone; doctor checks the setup; learned reviews what it learned; eval measures it.

Third-party platforms

personagent also works with bridges you may already run. None of them is needed for QQ, WeChat, Telegram or Discord.

  • AstrBot: for an AstrBot you already run, personagent connect astrbot installs the astrbot_plugin_personagent plugin, which hands AstrBot's messages to personagent. You can also install it from AstrBot's WebUI by that address and set its connector_token to personagent's CONNECTOR_TOKEN.
  • NapCat, or another OneBot v11 implementation, under Advanced in Connect apps.
  • Koishi, through the Satori connector.
  • Matrix, and through mautrix bridges WhatsApp, Signal and more.

Setup for each is in the user guide and the deployment guide; the Chinese step-by-step guide covers QQ from zero.

How it compares

personagent AstrBot (built in) MaiBot Koishi ChatLuna character ElizaOS
Joining in unasked A model judges whether a person would chime in Optional "active reply" at random (10%; off by default) A planner model, paced by a frequency setting Rule triggers: interval, activity, idle A model picks respond, ignore or stop
Learns from reactions to its own replies Yes: corrections, rejections, accepted retries Not built in Learns expressions and slang from the chat; from reactions, not documented Not documented Not documented
Corroboration before a change Two agreeing reactions from one chat, one strong Not built in Optional human check of learned expressions Not documented Not documented
Audit trail and rollback Append-only ledgers; rollback from the terminal or dashboard Not built in Not documented Not documented Not documented
Published behavioural eval Speak, persona and learning suites (below) Not documented Not documented Not documented Not documented
Setup and admin Browser setup and chat; local dashboard WebUI, desktop launcher WebUI, one-click launcher Koishi console CLI, web client
Where it runs Python service; QQ, WeChat, Telegram and Discord directly, the rest through a managed AstrBot, or behind Koishi (Satori) or Matrix Python app, 18+ platforms Python app, QQ via NapCat Koishi plugin TypeScript (Bun); Discord, Telegram, Slack and more
Licence MIT AGPL-3.0 GPL-3.0 AGPL-3.0 MIT

From each project's documentation, October 2026. "Not documented" means we found no description of it, not that it cannot be done; AstrBot's plugin market has learning plugins, one with a review queue and rollback.

Another project may fit better if you want a one-click desktop app with every setting in a WebUI (MaiBot, AstrBot), a large plugin ecosystem, or slang learning, sticker packs and image memory as headline features (MaiBot, AstrBot's plugins). personagent does not replace AstrBot or Koishi: it can run behind one you already have, so you keep its platforms and plugins and add a character that holds back and learns on the record.

Measured

personagent eval runs the real agent on labelled cases in English and Chinese and writes a report with every case and its verdict:

English Chinese
Model under test deepseek/deepseek-v4.1-flash (OpenRouter) deepseek/deepseek-v4.1-flash (OpenRouter)
Judge openai/gpt-4.1-mini openai/gpt-4.1-mini
Date 2026-10-03 2026-10-03
Speak: accuracy 92% (22/24) 88% (21/24)
Speak: spoke when it should stay quiet 2/11 3/11
Speak: stayed quiet when it should speak 0/13 0/13
Persona: judge picked it over a plain assistant (95% CI) 18/18 (82–100%) 17/18 (74–99%)
Learning: promoted or held as expected (k/n) 10/10 10/10
Learning: next reply changed after promotion 1 of 2 (the other 4 promoted probes already passed) 0 of 2 (the other 4 promoted probes already passed)
Learning: regressions 0 of 6 1 of 6

The reports, with every case, reply and verdict, are in docs/evals/2026-10-03. What "picked over a plain assistant" looks like, from the same run (same model, same message):

Message personagent Plain assistant
"can you help me write a cover letter for a barista job" (DM) nah that's not really my thing, i'd just make you sound like a robot / what's the shop? a good one down your way or just anywhere hiring Happy to help! Here's a solid template you can adapt — just swap out the bracketed parts. [Your Name] ...
"tips for a first date? it's tomorrow" honestly just ask real questions and actually listen, that's most of it / where you taking them? You got this, Taylor! Keep it simple: pick something low-pressure (coffee, walk, casual bite), dress like a slightly sharper version of yourself, ...

One run on one model is a sample, so expect some noise between runs; the persona and learning suites are scored by a judge that is a different model from the one being measured. The user guide explains each suite, the misses and how to run it yourself.

Documentation

Privacy

Everything personagent stores stays on your machine, in one home folder: .env with your keys, persona.txt, runtime/, and platforms/ with the managed AstrBot and the direct connections' credentials. The model provider you choose does see the conversations it answers. Before you connect it to real people, tell them it is a bot and get their consent; the guide lists exactly what goes where.

Status

1.2.0 is on PyPI, released 2026-10-15. QQ is the most exercised platform, through AstrBot in 1.0 and directly since 1.1. The WeChat, Telegram and Discord connections check credentials against the real services before saving and are otherwise tested against stand-ins; the Satori and Matrix connectors are tested against stand-ins. CI runs the tests on Linux with Python 3.10–3.14 and on Windows with Python 3.12, plus jobs that install the package and drive the command and the local page.

License

MIT © 2026 Qiankang (Kant) Wang.

Acknowledgements

Metadata

Release files for personagent 1.2.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 personagent 1.2.0
File Size Uploaded
personagent-1.2.0.tar.gz 701.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for personagent 1.2.0
File Interpreter ABI Platform
personagent-1.2.0-py3-none-any.whl Python 3 none any Details

Total release size: 1.4 MB

Release files / personagent-1.2.0.tar.gz

Download URL personagent-1.2.0.tar.gz
Size 701.3 kB
Tags Source
SHA-256 checksum
How to use checksums
b44e8ba28b71b6c8417ac134bb7b3aa141bda26176383f4bfd2c6185f7e7c402
BLAKE2b-256 checksum
How to use checksums
a47b9d64855ece6a3c1b96f432ff063fa2ca3f2507e26d325c7454b0668ebb4c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Oct 15, 2026.

Transparency log

Release files / personagent-1.2.0-py3-none-any.whl

Download URL personagent-1.2.0-py3-none-any.whl
Size 741.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
60bdd155ad2e0704c1bf30f7fe762ec73ca2a932ee488560e82f3e1736b52858
BLAKE2b-256 checksum
How to use checksums
ef516f7afaf44e2dcabf1b2e62c451e468a2c1fe855705764890e5e27b97bb04
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Oct 15, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

1.2.0 This release

2 release files

1.1.0

2 release files

1.0.2

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