system lane · 2026
Slack CRM Agent
A Slack agent that lets the team look up and update the CRM in plain language, with every change held for a person to approve before it lands on a client record.
- data (not covered)
- model (covered)
- eval (not covered)
- serve (covered)
- monitor (covered)
Runs in production as an agent on one ECS task, and no write reaches the CRM until a person approves it in Slack.
stackPythonLangGraphAWS BedrockClaudeSlackECS FargateTerraform
I built this at TechForce Advisors so the team could ask for what they needed from the CRM in a Slack message. The agent can search and read contacts, companies, opportunities and tasks, and it has ten write tools such as updating a stage, logging a call or creating a task. Every write pauses for a person to approve it.
Architecture
The agent runs as one container on ECS Fargate and holds a socket connection to Slack. A LangGraph graph drives the loop. Claude on Bedrock picks the next action, the approval gate stops any write tool, and the tools call the CRM through its API. Token counts go to Redis, which feeds a 30-day cost view on the bot’s Slack home tab. Terraform defines the infrastructure, and a small NAT instance gives the container outbound access.
How a request flows
- A message arrives over Slack’s socket connection, and the thread keeps the conversation together.
- The model step reads the conversation and picks a tool.
- Reads run right away. A write tool triggers a LangGraph interrupt, so the graph stops and posts Approve and Reject buttons in the thread.
- If someone approves, the graph resumes and the write runs. If someone rejects, the agent is told the operation was cancelled and carries on from there.
- Token counts are recorded, so the cost of every conversation is visible.
Why a person approves every write
The agent works with sensitive data about clients, and what it writes ends up on a client record that people use to make decisions about that client. The agent does the work; a person approves every change before it lands on a client record.
How it changed
- A hand-built loop, then a framework. I started with a Node app on the Anthropic SDK with a custom agent loop and model calls instead of a framework, and moved the calls to Bedrock the same day. A week later I rebuilt it in Python on LangGraph, since a supported and proven framework gave me room to specify a proper loop where the custom one boxed me in. It also removed about 700 lines of loop code and gave me native interrupts, which the approval gate is built on.
- A new CRM. The company decided to use a different CRM for other work and ported its data over, so I moved the agent’s tools onto the new CRM’s API.
- A hosting move I didn’t make. I planned to move the agent onto AgentCore Runtime, which is built for agents and opens up other agent features, instead of running it on ECS. I didn’t do it because there was no demand for it.