How to Build an AI Agent for Front (2026)
If your support runs on Front, an AI agent that reads a conversation, looks up the customer, answers from your help center, and either replies or hands off to a teammate is the highest-leverage automation you can add. There are two ways to get there: build it against the Front API yourself, or connect an agent platform that already speaks Front. This guide covers both honestly — the real API path with code, the production work it takes, and the faster route — so you can pick the one that fits your team.
What a Front AI agent does
The loop is the same as any support agent, wired to Front: a new message lands in an inbox → the agent reads the conversation and the contact's history → it calls tools (look up the order, search your help center, check a policy) → it posts a reply or adds an internal comment and routes the conversation to a teammate. The trick is doing that reliably against real conversations. (New to agents generally? Start with AI agents for customer service.)
Option 1: Build it against the Front API
Front has a full REST API (the Core API), so you can build the agent yourself. The pieces:
- Read conversations — the Conversations endpoints pull the conversation, its messages, and the contact.
- Reply / act — send an outbound message to reply, add a comment for an internal note, or apply tags to route.
- Trigger on new messages — a Front rule or webhook fires your endpoint when a conversation is created or updated.
Authenticate with a bearer API token (create one under Settings → Developers, or use an OAuth token for a public integration). Every request goes to https://api2.frontapp.com over HTTPS. A reply tool against the real Front API looks like this:
import requests
FRONT = "https://api2.frontapp.com"
HEADERS = {"Authorization": f"Bearer {FRONT_API_TOKEN}"}
def reply_to_conversation(conversation_id: str, body: str, channel_id: str):
r = requests.post(
f"{FRONT}/conversations/{conversation_id}/messages",
json={"body": body, "channel_id": channel_id, "options": {"archive": False}},
headers=HEADERS, timeout=10)
r.raise_for_status() # handle 429 rate limits, token refresh
return {"status": "sent"}
See Front's API reference for the full surface. Wrap that (and a get_contact, a search_help_center) as tools in an agent loop on the model of your choice — see our from-scratch walkthrough in how to build an AI agent: from scratch vs. platform.
The production part
The API calls are the easy bit; making the agent run on real conversations is the work. You stand up a webhook to trigger the agent, and it has to verify Front's signature and dedupe retries so one conversation never gets two replies:
import hmac, hashlib, base64
from fastapi import FastAPI, Request, HTTPException
app = FastAPI()
def verify_front_signature(raw_body: bytes, header_sig: str):
# Front signs the raw payload with your app secret (HMAC-SHA256, base64)
digest = hmac.new(FRONT_APP_SECRET.encode(), raw_body, hashlib.sha256).digest()
expected = base64.b64encode(digest).decode()
if not hmac.compare_digest(expected, header_sig or ""):
raise HTTPException(status_code=401, detail="bad signature")
@app.post("/front-webhook")
async def on_conversation(req: Request):
raw = await req.body()
verify_front_signature(raw, req.headers.get("X-Front-Signature"))
event = await req.json()
event_id = event["id"] # unique per delivery
if already_handled(event_id): # idempotency — Front retries on non-2xx
return {"ok": True}
mark_handled(event_id)
run_agent(event["conversation"]["id"])
return {"ok": True} # ACK fast; do the work async
Two things that bite people here: verify the signature over the raw bytes (re-serializing the JSON changes the HMAC and every request 401s), and ACK within Front's timeout — Front retries deliveries that don't get a prompt 2xx, so kick the agent run onto a queue and return immediately, or a slow model call turns one inbound message into several replies.
Then the rest of the production surface:
- Auth + rate limits — Front's Core API is rate-limited per token by plan tier, and it returns standard
429s withRetry-Afterwhen you're over; you back off and retry on that header rather than assuming a fixed number (tiers change — confirm your ceiling in the API reference rather than trusting a figure here). Rotate/refresh OAuth tokens before they expire so the agent never silently stops replying. - Grounding in your help center — embed the articles into a vector store and re-index when they change, so replies quote real content instead of hallucinating policy.
- Guardrails — escalate refunds, redact PII, and treat inbound conversation text as untrusted input (prompt-injection from customers is real).
- Hosting 24/7, observability (log every run, tool call, and hand-off), and an eval harness over real historical conversations so you know the agent is right before it replies.
That's weeks of work plus permanent upkeep — the undifferentiated infrastructure every support agent needs, before the agent has resolved a single conversation.
Option 2: Connect Front via Macha
If the goal is a working agent on your Front — not a project to maintain — a platform that connects natively is far faster. Macha layers on top of Front (it's not a Front replacement or a marketplace app you install — it connects via OAuth and works autonomously):
- Native Front connector — authorize Front and the agent can read conversations and post replies, with a full set of conversation tools ready to use.
- Ground on your help center — add your help center as a Source so replies quote real articles.
- Any other system as a tool — Custom Tools turn your order/billing APIs into agent capabilities by describing them.
- Grade before go-live — Studies run the agent over batches of your real historical conversations and score it, so you tune it against evidence before it ever touches a live customer.
Custom Tools are how you extend the agent past Front itself: order lookups, refunds, and internal systems all become tools the agent can call alongside the native Front connector.
Studies are the "prove it before it replies" step: point the agent at past conversations, see how it would have handled them, and only widen its autonomy once the scores hold up.
What about Front's own AI?
Front has native AI, and it now offers a "Bring Your Own AI Agent to Front" capability — a way to connect an external AI agent to Front so it can work your conversations. That's a real, first-party option, and it's worth naming honestly before you build anything. Here's a quick rule of thumb for the three routes:
- Front's native AI — fastest setup, you're happy on Front's built-in features, and its pricing works for your volume. Least control, least effort. If you want to plug in your own agent, Front's Bring Your Own AI Agent path is the native way to attach one.
- Build on the Front API yourself — you need a specific model, custom tools wired to your own systems (orders, billing), or full control of the runtime, and you have the engineering to own the webhook, hosting, evals, and upkeep. Most control; weeks to build plus permanent maintenance.
- Connect a model-agnostic platform (Macha) — the control and model choice of building, but live in days instead of weeks, with the webhook, hosting, observability, and eval harness handled for you. Macha connects to Front as a native connector and stays model-agnostic, so you're not locked to any one vendor's AI.
The rest of this guide is about the second and third routes — where you want more than Front's native automation gives you.
Build vs. connect — for Front
| Build on the Front API | Connect Macha | |
|---|---|---|
| Read/reply to conversations | You write the API client | Native connector (OAuth) |
| Trigger on new messages | You build a webhook endpoint | Handled |
| Ground on help center | You embed + host a vector store | Add it as a Source |
| Hosting, retries, observability | Your infrastructure | Built in |
| Evaluate before go-live | You build a harness | Studies |
| Time to a live agent | Weeks + ongoing | Same day |
So which should you build?
Build on the API if you need a fully custom runtime, have strict data-residency needs, or the agent is your product. For most Front teams who just want conversations resolved, a native connector gets you a measurable agent on your real conversations far faster — and you keep your model of choice. You can start free on Macha, connect Front, and test an agent on your own conversations the same day.
FAQ
Is a Front AI agent the same as Front's own AI features? Not necessarily. Front offers built-in AI and a "Bring Your Own AI Agent to Front" option for attaching an external agent, but you can also run a model-agnostic agent on top of Front (via its API or a platform like Macha) — useful if you want a specific model, custom tools wired to your own systems, or to grade the agent your own way.
Do I need to install a Front app? No — Macha connects to Front via OAuth and works autonomously; it's an AI layer on top of Front, not a marketplace app you install.
Can the agent take actions, not just answer? Yes — via the Front API (reply, comment, tag, route) plus your own systems' APIs as tools (order lookups, refunds) through Custom Tools, with guardrails on what it can do unattended.
How do I make sure it's accurate before it replies to customers? Ground it in your help center and grade it against real historical conversations first (Macha's Studies do this), start in a draft/approve mode, and widen autonomy per conversation type as it earns trust.
Add AI agents to your Front
Macha resolves tickets end to end on Front — no migration, no code.
Shopify
Stripe
Slack
Notion
Google Workspace
Confluence

