Skip to content
~/patrick/projects/crm-agent
← projects

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.

pipeline
  1. data (not covered)
  2. model (covered)
  3. eval (not covered)
  4. serve (covered)
  5. monitor (covered)
result

Runs in production as an agent on one ECS task, and no write reaches the CRM until a person approves it in Slack.

stack

PythonLangGraphAWS 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

Slack one ECS Fargate task Model step Approval gate Tools Redis Claude on Bedrock The CRM DMs, mentions, approve buttons picks the next action writes pause here reads and writes cost counters the model via its API

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

  1. A message arrives over Slack’s socket connection, and the thread keeps the conversation together.
  2. The model step reads the conversation and picks a tool.
  3. Reads run right away. A write tool triggers a LangGraph interrupt, so the graph stops and posts Approve and Reject buttons in the thread.
  4. 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.
  5. 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.
nextGTM Diagnostic Automation →

keyboard

⌘K /
Search and commands
t T
Next / previous theme
j k
Move through items on the page (k on the first one goes back to the top)
o
Open the selected item
g then h w p b a l
Home, Work, Projects, Blog, About, Lab
c
Copy email
?
This list

Choose a theme

Dark

Light

You can also press t to step through them.