Agent Media Tools

Integration guide

Choose where people talk to your bot.

Every platform uses the same provider, memory, knowledge, safety limits, and AMT tool configuration. Only the message adapter and its platform credential change.

Terminal

The simplest development target. It needs no platform token and keeps one local session.

./start-linux.sh
# Windows: start-windows.bat
# Exit with /quit

Local web chat

The Waitress-backed Flask adapter binds to 127.0.0.1:8000 by default. Open http://127.0.0.1:8000. Set HOST=0.0.0.0 only inside a protected container/network or when a deployment provider requires it. The runtime refuses any non-loopback bind until BOT_ACCESS_TOKEN is configured; the browser sends it in a private request header and keeps it only in session storage.

HOST=127.0.0.1
PORT=8000
BOT_ACCESS_TOKEN=use-a-long-random-value-for-remote-hosts
python bot.py
The access token is one layer, not a complete public edge.

For public deployments, also use TLS, provider/platform limits, request-size controls, and upstream abuse protection. The app exposes an unauthenticated /healthz endpoint containing only status, bot name, and template version.

Discord

  1. Create an application in the Discord Developer Portal.
  2. Add a bot under the application’s Bot section.
  3. Reset and copy the bot token into private .env as DISCORD_BOT_TOKEN.
  4. Enable Message Content Intent because this template responds to message text.
  5. Use OAuth2 URL Generator with the bot scope and only the permissions it needs: View Channels, Send Messages, and Read Message History.
  6. Invite it to a test server first, then run python bot.py.
DISCORD_BOT_TOKEN=replace_with_private_token

The bot keeps memory per Discord channel and ignores its own messages. Rotate the Discord token immediately if it is ever pasted into chat, committed, or logged. Verify current requirements in Discord’s official bot quickstart and Message Content Intent reference.

Telegram

  1. Message @BotFather in Telegram.
  2. Run /newbot, select a display name and unique username.
  3. Place the issued token in private .env as TELEGRAM_BOT_TOKEN.
  4. Optionally use BotFather privacy settings to control whether a group bot sees all messages.
  5. Run the bot; the template uses long polling and stores memory per chat.
TELEGRAM_BOT_TOKEN=replace_with_private_token

Telegram’s official bot introduction explains BotFather and token security; its Privacy Mode guide explains which group messages a bot receives.

Compatibility

PlatformCredentialDefault exposureMemory scope
TerminalNoneLocal processOne terminal session
WebNone in base templateLoopbackBrowser-generated session ID
DiscordDISCORD_BOT_TOKENDiscord gatewayChannel
TelegramTELEGRAM_BOT_TOKENTelegram pollingChat