A Slack Agent integrated with Google's Antigravity Managed Agent and a secure, remote sandboxed Linux environment. This agent allows Slack users to query their Trello boards dynamically using natural language. It writes and executes scripts on-the-fly to read card status, recent edits, and comments history safely and securely.
This agent is a proof of concept for the Google Antigravity Managed Agent API. Article describing the decisions and architecture: Build your own Google Antigravity agent in Slack
- Google Antigravity Integration: Leverages Google GenAI's Interactions API to manage a persistent, remote Linux sandbox for code execution (Python, Node.js, bash) and data analysis.
- Stateful Slack Conversations: Seamlessly maps Slack thread timestamps (
thread_ts) to Antigravity environment IDs (environment_id), maintaining context and file states across multiple consecutive user messages. - Strictly Read-Only Trello Access: Dynamically executes secure retrieval code in the sandbox to fetch Trello board actions, cards, lists, and search queries. Modifying operations are strictly restricted.
- Egress Proxy Credentials Injection: Employs Google GenAI's Egress Proxy Header Transformations (
environment.network.allowlist.transform) to dynamically and securely inject Trello credentials (oauth_consumer_key,oauth_token) at the proxy level. No Trello API keys or tokens are ever embedded in scripts, prompts, or environment variables inside the sandbox. - Slack Agent View Experience: Custom UI using Slack's
agent_viewfeature complete with:- Dynamic suggested prompts pinned in the Messages tab (e.g., Recent Edits, Card Status, Comments History).
- Native Slack Assistant typing indicators (
assistant.threads.setStatus).
- Smart Response Optimization: To prevent Slack's standard 4,000-character limitation (
msg_too_longerrors), responses under ~3,500 characters are posted directly, while larger documents are dynamically bundled and uploaded directly to the thread as an elegant Markdown (.md) file using Slack'sfiles.uploadV2API. - Built with Strict Best Practices: Powered by ESM, Node 24, pnpm 11, strict TypeScript, Vitest, Hono.js for server endpoints, and Docker.
[ Slack Workspace ]
│
│ (Socket Mode Event: message.im)
▼
[ Hono.js Server ]
│
│ 1. Set assistant thread status ("is provisioning...")
│ 2. Create/Retrieve persistent Google Agent ("trello-slack-agent")
│ 3. Execute Task on Google GenAI Interactions API
▼
[ Google Antigravity Remote Sandbox ]
│
│ (Executes sandbox script to fetch Trello board data)
│ (Sends request to api.trello.com)
▼
[ Google Egress Proxy ] ──(Injects OAuth Header)──► [ Trello REST API ]
│
▼ (Returns parsed data)
[ Hono.js Server ]
│
├─► Response <= 3,500 chars ──► Updates original message text
└─► Response > 3,500 chars ──► Uploads response as `.md` file in thread
- Node.js:
v24.0.0or higher - pnpm:
v11.5.3or higher
Copy the .env.example file to .env and fill in the required keys:
cp .env.example .envPORT=3000
NODE_ENV=development
# Google Gemini / Antigravity Managed Agent API Configuration
GEMINI_API_KEY=your-gemini-api-key-here
# Slack App Credentials (from Slack Developer Console)
SLACK_BOT_TOKEN=xoxb-your-bot-token
SLACK_SIGNING_SECRET=your-signing-secret
SLACK_APP_TOKEN=xapp-your-app-token
# Read-only Trello Board Configuration
TRELLO_API_KEY=your-trello-api-key
TRELLO_TOKEN=your-trello-token
TRELLO_BOARD_IDS=your-comma-separated-trello-board-idsInstall all workspace dependencies:
pnpm installRun the Hono server and Slack Socket Mode listener in development watch mode:
pnpm run devCompile the TypeScript source code to production-ready JavaScript (ESM):
pnpm run buildRun the production build:
pnpm run startExecute the Vitest test suite:
pnpm run test:runFormat the codebase with Prettier and lint with ESLint:
pnpm run format
pnpm run lintTo configure your Slack App with the exact permissions, scopes (chat:write, files:write, assistant:write), Socket Mode settings, and suggested prompts, copy the contents of slack-manifest.json into your app configuration in the Slack Developer Console.
To reset your remote Linux sandbox environment at any point and clear the conversation context, run the /reset slash command in your Slack workspace, or send the message reset directly to the agent.
Deploy the agent within a secure, multi-stage production container.
docker build -t antigravity-slack-agent .docker run -d --name slack-agent --env-file .env -p 3000:3000 antigravity-slack-agentThis project is licensed under the MIT License.