Initial commit: Matrix Bridge Daemon

Persistent Python daemon connecting Matrix DM room to AiAgent API.

- Config-driven (JSON config file)
- Extensible command system (/new_session, /help)
- Typing indicators while agent processes
- Session auto-naming for identification
- Persistent state across restarts
- Token refresh, retry logic, error handling
- Python stdlib only — no external dependencies
This commit is contained in:
2026-05-15 13:45:24 +02:00
commit 751584c99d
10 changed files with 1024 additions and 0 deletions

21
config.json Normal file
View File

@@ -0,0 +1,21 @@
{
"matrix": {
"server": "matrix.daedalus706.de",
"user_id": "@lucy:matrix.daedalus706.de",
"room_id": "!8zLJacfaL2WYoYVp:matrix.daedalus706.de",
"credentials_file": "/home/admin/auth/matrix-credentials.txt"
},
"agent": {
"base_url": "http://10.0.1.2:8080"
},
"bridge": {
"poll_interval_seconds": 1,
"state_file": "/home/admin/agent-dir/bridge-state.json",
"matrix_poll_timeout": 0,
"agent_timeout_seconds": 30,
"agent_retries": 3,
"max_message_length": 40000,
"processed_ids_limit": 200,
"agent_response_timeout": 300
}
}