You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
61 lines
1.5 KiB
61 lines
1.5 KiB
# F3 Picoclaw XMPP
|
|
|
|
An XMPP chatbot bridge that connects an XMPP account to a Nanobot AI backend via WebSocket.
|
|
|
|
## Features
|
|
|
|
- Listens for messages in XMPP chat rooms and direct messages
|
|
- Responds when mentioned (`@botname`) in group chats
|
|
- Replies to all direct messages automatically
|
|
- Streams AI responses from Nanobot WebSocket API
|
|
- Configurable logging levels
|
|
|
|
## Requirements
|
|
|
|
- Python >= 3.10
|
|
- [uv](https://docs.astral.sh/uv/) package manager
|
|
|
|
## Setup
|
|
|
|
```bash
|
|
# Install dependencies
|
|
uv sync
|
|
|
|
# Configure environment
|
|
cp .env.example .env
|
|
# Edit .env with your XMPP credentials and Nanobot endpoint
|
|
```
|
|
|
|
## Environment Variables
|
|
|
|
| Variable | Description |
|
|
|---|---|
|
|
| `XMPP_USERNAME` | Full JID for the XMPP bot account |
|
|
| `XMPP_PASSWORD` | XMPP account password |
|
|
| `XMPP_ROOMS` | Comma-separated list of MUC rooms to join |
|
|
| `NANOBOT_WS_ENDPOINT` | WebSocket URL of the Nanobot AI server |
|
|
| `NANOBOT_WS_TOKEN` | Authentication token for the Nanobot |
|
|
| `DEBUG` | Logging level: `debug`, `info`, `warn`, `error`, `critical` |
|
|
|
|
## Usage
|
|
|
|
```bash
|
|
# Run the XMPP-to-Nanobot bridge
|
|
uv run python -m src.server
|
|
```
|
|
|
|
## Project Structure
|
|
|
|
```
|
|
src/
|
|
├── server.py # Main entry point - bridges XMPP and Nanobot
|
|
├── xmpp.py # XMPP bot client (slixmpp)
|
|
├── nanobot.py # Nanobot WebSocket client
|
|
└── log.py # Logging configuration
|
|
```
|
|
|
|
## Tech Stack
|
|
|
|
- Python 3.14 / asyncio
|
|
- [slixmpp](https://github.com/poezio/slixmpp) for XMPP
|
|
- [websockets](https://github.com/aaugustin/websockets) for WebSocket communication
|
|
|