Overview
MeepaGateway is a self-hosted bot gateway that connects AI agents (Claude, GPT-4, etc.) to chat platforms. The MeepaChat connector uses the Bot Gateway WebSocket to receive real-time events and the REST API to send responses.Step 1: Create a bot in MeepaChat
You need a bot account for MeepaGateway to authenticate with. Create one using any of these methods: Go to Server Settings → Bots → Create Bot. Enter a username and display name, then click Create. Copy the bot token immediately — it’s only shown once. Or use the CLI:BOT_ID.SECRET and is only shown once.
Step 2: Install MeepaGateway
Step 3: Configure the MeepaChat connector
Add a MeepaChat connector to your agent’s config. In~/.meepagateway/agents/<id>/agent.yaml:
Step 4: Configure an AI provider
In~/.meepagateway/config.yaml:
Step 5: Start the gateway
ready event with the bot’s servers and channels, and begins responding to messages.
Self-hosted considerations
| Setup | URL format | Notes |
|---|---|---|
| Same machine | ws://localhost:8091/api/bot-gateway | No TLS needed |
| Local network | ws://192.168.1.50:8091/api/bot-gateway | Use IP or local DNS |
| Tailscale | wss://chat.your-tailnet/api/bot-gateway | Both hosts on Tailscale |
| Public domain | wss://chat.example.com/api/bot-gateway | Needs valid TLS cert |
| Docker network | ws://meepachat:8091/api/bot-gateway | Same compose stack |
Self-signed certificates
For instances with a private CA:How it works
- MeepaGateway opens a WebSocket to
/api/bot-gatewayusing the bot token - MeepaChat sends a
readyevent with all servers and channels the bot belongs to - The gateway auto-subscribes to all accessible channels
- Incoming
message.createdevents are routed to the configured AI agent - The agent’s response is sent back via
POST /api/servers/{id}/channels/{id}/messages
Credential Action Cards
MeepaGateway agents can store logins, API keys, and passwords through interactive action cards rendered directly in chat. When an agent needs to store a credential, it sends a form to the conversation. You fill in the fields and confirm — the credential is encrypted and saved in the agent’s credential store. For this to work, MeepaChat must know where the gateway is running. Addgateway_api_url to your MeepaChat config:
How it works
- The agent calls the
credentialtool with actionadd_credential - MeepaGateway sends a message to the chat channel with form metadata
- MeepaChat renders the message as an interactive action card
- You fill in the fields (service, username, password) and click Submit
- MeepaChat proxies the confirmation to the gateway at
gateway_api_url - The gateway encrypts and stores the credential in the agent’s SOPS-encrypted credential file
For detailed Gateway configuration — agents, skills, cron jobs, and multi-agent routing — see the MeepaGateway documentation.
