How Do You Build an AI Agent for Front? (2026)
You can build an AI agent for Front by coding against Front's Core API and a signed webhook, or by connecting a platform such as Macha that already has a Front connector. The API route takes weeks of production work; the connector route can be drafting on your real conversations the same day.
Key takeaways
- Building an AI agent for Front means choosing between coding against Front's Core API at api2.frontapp.com or connecting a platform such as Macha through its Front connector.
- Front application webhooks sign an HMAC-SHA256 of the request timestamp plus the raw body, and Front retries up to 3 times when an endpoint fails to answer within 5 seconds.
- Front rate-limits its Core API per company by plan: 50 requests a minute on Starter, 100 on Professional and 200 on Enterprise.
- Front's own AI agent, Autopilot, starts at $0.05 per conversation, while Copilot is a $20/seat/month add-on included on Front's Enterprise plan.
- Macha connects to Front with an API token and can grade an agent against historical conversations with Studies before the agent replies to live customers.
There are two ways to build an AI agent for Front: code it against Front's Core API (a REST API at https://api2.frontapp.com, with a webhook that fires your agent on new messages), or connect a platform such as Macha that already has a Front connector. The API route takes weeks plus upkeep; the connector route can have an agent drafting on your real conversations the same day.
| Build on the Front API | Connect Macha | |
|---|---|---|
| Read/reply to conversations | You write the API client | Native connector (API token) |
| Trigger on new messages | You build a signed webhook endpoint (5-second ACK) | 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 |
What does a Front AI agent do?
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.)
How do you build a Front agent on the Core 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 (an admin creates one under Settings → Developers → API Tokens), 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.
What does it take to run in production?
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. Front application webhooks sign the request timestamp plus the raw body:
import hmac, hashlib, base64
from fastapi import FastAPI, Request, HTTPException
app = FastAPI()
def verify_front_signature(raw_body: bytes, timestamp: str, header_sig: str):
# HMAC-SHA256 over ":", base64-encoded
base = f"{timestamp}:".encode() + raw_body
digest = hmac.new(FRONT_WEBHOOK_SECRET.encode(), base, 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-request-timestamp", ""),
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 up to 3 times
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 5 seconds. Front times webhook requests out after 5 seconds and retries up to 3 times on a timeout or a 408, 429 or 500, so push the agent run onto a queue and return a 2xx immediately, or a slow model call turns one inbound message into several replies.
Then the rest of the production surface:
- Auth and rate limits: Front rate-limits the Core API per company by plan: 50 requests a minute on Starter, 100 on Professional and 200 on Enterprise, plus a burst allowance of half that. Over the limit you get a
429with aretry-afterheader in seconds; back off on that header (see Front's rate-limiting docs). Your agent shares that budget with every other integration on the account. 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.
How do you connect Front to Macha instead?
If the goal is a working agent on your Front, not a project to maintain, a platform with a Front connector is far faster. Macha layers on top of Front, one of the six help desks it runs on. It isn't a Front replacement or a marketplace app you install: you connect it with a Front API token and it works autonomously.
- Native Front connector: add a Front API token and the agent can search and read conversations (messages and comments), reply publicly or post internal comments, update status and tags, and assign a teammate.
- 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.
Should you use Front's own AI instead?
Front sells its own AI, and it's worth pricing before you build anything. Per Front's pricing page, Autopilot, Front's AI agent, starts at $0.05 per conversation, and Copilot, a real-time assistant for your team, is a $20/seat/month add-on (included on Enterprise). A rule of thumb for the three routes:
- Front's native AI: fastest setup, if you're happy inside Front's built-in features and the per-conversation price works at your volume. Least control, least effort.
- 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 engineers 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, live in days instead of weeks, with the webhook, hosting, observability and eval harness handled, and setup and monitoring by the Macha team included. Macha bills per ticket, from $299 a month for up to 750 tickets.
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? No. Front sells its own AI (Autopilot from $0.05 per conversation, Copilot at $20/seat/month), but you can also run a model-agnostic agent on top of Front through its API or a platform like Macha, which is 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 with an API token 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.

