| Servicio | URL / Endpoint | Estado | Acciรณn |
|---|---|---|---|
| Cargando... | |||
| Nombre | Tipo | Descripciรณn | Parรกmetros |
|---|---|---|---|
| Cargando... | |||
| ID | Proveedor | Modelo | Max tokens |
|---|
| ID | Base URL | Auth | Endpoints |
|---|
| ID | Transport | Endpoint / Comando |
|---|
Registrar cuenta bot en matrix.org
Crea una cuenta nueva (separada de la tuya personal). Usa un nombre como mi-bot.
O registrar en Synapse propio
register_new_matrix_user -c homeserver.yaml \ -u mi-bot -p TU_PASSWORD --no-admin \ http://localhost:8008
Verificar la cuenta
Inicia sesiรณn en app.element.io con la cuenta bot para confirmar que funciona.
Mรฉtodo recomendado: API REST
curl -XPOST 'https://matrix.org/_matrix/client/v3/login' \
-H 'Content-Type: application/json' \
-d '{
"type": "m.login.password",
"user": "@mi-bot:matrix.org",
"password": "TU_PASSWORD"
}'
Copia el valor de access_token de la respuesta.
Verificar el token
curl 'https://matrix.org/_matrix/client/v3/account/whoami' \ -H 'Authorization: Bearer syt_TU_TOKEN'
Debe responder con tu user_id. Error 401 = token invรกlido.
Alternativa: desde Element
Configuraciรณn โ Seguridad y privacidad โ Tokens de acceso โ Mostrar token
Editar .env en la raรญz del proyecto
MATRIX_HOMESERVER_URL=https://matrix.org MATRIX_ACCESS_TOKEN=syt_tu_token_real MATRIX_USER_ID=@mi-bot:matrix.org ANTHROPIC_API_KEY=sk-ant-xxxxx PORT=9099
Reiniciar el bot
Despuรฉs de editar el entorno, reinicia para que tome los cambios:
# EasyPanel: botรณn Restart (env/config) ยท Rebuild (cambios de cรณdigo) # Docker: docker compose restart bot
O usa el botรณn "Reiniciar bot" del dashboard.
Validar con diagnรณstico
Ve a la secciรณn Diagnรณstico y ejecuta los checks.
Invitar al bot a una sala
En Element, crea una sala o usa una existente. Invita al bot por su User ID. Con autoJoin: true acepta automรกticamente.
Primer comando
!ping
El bot debe responder Pong! ๐ข
Mensajes directos (DM)
Abre un DM con el bot. En DMs no necesitas prefijo โ cualquier mensaje se procesa directamente por el orquestador.
| !ping | Verifica que el bot responde |
| !help | Lista todos los comandos disponibles |
| !ai <texto> | Envรญa al orquestador (usa todos los agentes) |
| !agent <id> <texto> | Fuerza un agente especรญfico (ej: !agent analyst analiza esto) |
| !agents | Lista los agentes configurados |
| !tools | Lista herramientas disponibles (incluye MCP y APIs) |
| @bot <texto> | Menciรณn directa en cualquier sala |
Agregar en config.yaml
apis:
mi-api:
baseUrl: https://api.ejemplo.com/v1
auth:
type: bearer
tokenEnvVar: MI_API_TOKEN # var de entorno con el token
timeout: 10000
endpoints:
- name: listar_items
description: Lista items activos
method: GET
path: /items
queryParams: [status, limit]
- name: crear_item
description: Crea un nuevo item
method: POST
path: /items
Autorizar al agente
Agrega el nombre de la tool al allowedTools del agente en config.yaml:
agents:
- id: collector
allowedTools:
- api_mi-api_listar_items
- api_mi-api_crear_item
Servidor MCP local (stdio)
mcpServers:
filesystem:
transport: stdio
command: npx
args: ["-y", "@modelcontextprotocol/server-filesystem", "/ruta/permitida"]
Servidor MCP remoto (HTTP)
mcpServers:
mi-mcp:
transport: http
url: https://mi-servidor.com/mcp
headers:
Authorization: "Bearer mi-token"
Las tools se descubren automรกticamente
Al arrancar, el bot conecta al servidor MCP y registra todas sus tools como mcp_<id>_<toolname>. Aparecerรกn en la secciรณn Herramientas con el badge mcp.
SYNAPSE_ADMIN_TOKEN en las variables de entorno del bot.Obtรฉn el token con:
curl -X POST http://synapse:8008/_matrix/client/v3/login -d '{"type":"m.login.password","user":"admin","password":"TuPass"}'
mcp_<id>_<tool> que los agentes pueden invocar
api_<id>_<endpoint> โ asรญgnalas luego en Agentes
docs/ARQUITECTURA.md.
Matrix AI Bots necesita conectarse a un homeserver Matrix con una cuenta de bot dedicada. Configura las siguientes variables de entorno antes de arrancar el contenedor.
| Variable | Ejemplo | Descripciรณn |
|---|---|---|
MATRIX_HOMESERVER_URL | https://matrix.miempresa.com | URL base del homeserver |
MATRIX_USER_ID | @bot:miempresa.com | User ID del bot (MXID) |
MATRIX_ACCESS_TOKEN | syt_โฆ | Token de acceso (login o registration) |
MATRIX_DEVICE_ID | MATRIX_BOT | Device ID (opcional, para E2EE) |
- Crea una cuenta de bot en tu homeserver (ej. Element Web)
- En Ajustes โ Ayuda y acerca de โ Acceso avanzado โ Ver token de acceso
- Copia el token y guรกrdalo en
MATRIX_ACCESS_TOKEN