AAMG
AI Agent Messaging Gateway

Your agent runs on your machine. Talk to it from your phone.

AAMG is a self-hosted gateway that pairs an AI agent with a mobile app. The agent keeps running where you put it — laptop, home server, VPS — and the app gets a real conversation: live messages, push notifications, history, and a clear approve/deny step before anything runs. No port forwarding, no inbound firewall rule, no third-party relay account.

How it works

  1. One Gateway. The Gateway is the only always-reachable piece. It holds the pairing record, the conversation history and the WebSocket endpoints — and it stores no agent credentials on your behalf.
  2. Pair once. The app mints a short-lived pairing code; the Connector on your machine claims it, you approve it on the phone, and both sides receive a device credential. Nothing is typed between the two devices, and the pairing expires if it is not used.
  3. Then just talk. Messages travel over an authenticated WebSocket, with a REST fallback when the socket cannot stay open. Replies land as push notifications, and any action that needs your sign-off waits for an explicit approval.

What you get

Realtime, with a fallback

An authenticated WebSocket carries the conversation; if the socket drops, the app falls back to polling and recovers the missed cursor instead of losing messages.

Explicit approvals

Requests that need a human decision arrive as an interactive prompt with an approve or deny answer — the agent waits instead of assuming.

Push notifications

Replies reach the phone while the app is backgrounded, so the agent can work unattended.

Conversation history

Named, archived, resumable conversations — held by the Gateway, so a new phone does not mean a new history.

Artifacts

Files and results the agent produces are handed to the app as time-limited download URLs, not pasted into the message body.

Yours to run

The Gateway is a single Cloudflare Worker plus Postgres — self-hostable, and the protocol, contracts and tests are in the repository.

Get started

The Android app is a sideloaded beta: it is signed with a test key, not a store upload key, and it talks to the production Gateway at aamg-api.azuddin.com.

1 — Install the app from the download page, then install the Connector where your agent runs:

npm install --global @azuddin/aamg-hermes-adapter

2 — Start the connection and approve the pairing on your phone:

hermes-connector connect

Pointing at your own Gateway instead of the production one? Pass --gateway-url https://your-gateway.example; a non-HTTPS origin is refused.