Macha

How Do You Build an AI Agent for Pylon? (2026)

Abbas, Customer Support & AI, Macha

Written by

Ankeet Guha, Co-founder & CTO, Macha

Reviewed by

Published July 30, 2026

Updated October 6, 2026

An AI agent for Pylon reads a new issue, looks up the account, answers from your help center, and either replies or escalates. You can use Pylon's own Support Agent, build on the Pylon API and webhooks yourself, or run a platform like Macha against the same API.

Key takeaways

  • An AI agent for Pylon can be Pylon's own Support Agent, your own agent built on the Pylon REST API and webhooks, or a platform like Macha calling the same API.
  • The Pylon API sends customer-facing replies through POST /issues/{id}/reply, which requires the message_id of the customer-visible message being answered.
  • Pylon publishes per-endpoint rate limits of 30 requests a minute for replies, notes and listing issues, 120 for issue updates and 300 for fetching one issue.
  • Pylon webhooks are sent by a Trigger with a Send webhook action and custom headers, so a DIY endpoint should check a shared secret header and dedupe repeats itself.
  • Macha has no native Pylon connector, so a Macha agent on Pylon runs on Custom Tools for the Pylon endpoints and a Pylon webhook; the Macha team builds and tests both for you, included at about $0.40 a ticket.
How Do You Build an AI Agent for Pylon? (2026)

You build an AI agent for Pylon in one of three ways: turn on Pylon's own Support Agent, build your own agent on the Pylon REST API (a webhook fires on new issues and your code replies through POST /issues/{id}/reply), or run a model-agnostic platform such as Macha against the same API. Pylon documents the second route itself as "Bring Your Own Agent": webhooks listen for new issues and messages, and the API posts replies or changes metadata. The API calls take an afternoon; the webhook handling, grounding, hosting and evaluation around them are the real work.

RouteWhat you getWhat you own
Pylon Support AgentNative agent that deflects with your content, gathers internal context and takes actionsConfiguration only; Pylon's pricing is now behind a demo form
Build on the Pylon APIAny model, any tools, full control of the runtimeWebhook endpoint, retries, rate limits, hosting, evals, upkeep
Macha on the Pylon APIModel choice and custom tools without hosting your own runtimeThe Pylon API token and a Pylon trigger that calls Macha's webhook; the Macha team builds the Custom Tools and the agent

What does a Pylon AI agent do?

The loop is the same as any support agent, wired to Pylon: a new issue arrives → the agent reads it and the account's history → it calls tools (look up the account, search your help center, check a policy) → it posts a reply or routes the issue to a human. The hard part is doing that reliably against real issues. (New to agents generally? Start with AI agents for customer service.)

How do you build it on the Pylon API?

Pylon has a full REST API at https://api.usepylon.com (EU workspaces use https://api.eu.usepylon.com), so you can build the agent yourself. The pieces, per Pylon's API docs:

  • Read issues: GET /issues and GET /issues/{id} pull the issue and its account; GET /issues/{id}/messages returns the conversation.
  • Reply and act: POST /issues/{id}/reply sends a customer-facing reply, POST /issues/{id}/note leaves an internal note, and PATCH /issues/{id} changes state, assignee, tags or custom fields.
  • Trigger on new issues: in Pylon, you add your endpoint under Settings → Webhooks, then create a Trigger with the action "Send webhook" and conditions for when it fires.

A reply-and-update tool against the Pylon API looks like this. Note that the reply endpoint requires a message_id: the customer-visible message you're replying under, taken from GET /issues/{id}/messages.

import requests
PYLON = "https://api.usepylon.com"      # EU: https://api.eu.usepylon.com
HEADERS = {"Authorization": f"Bearer {PYLON_TOKEN}"}

def reply_to_issue(issue_id: str, body: str):
    # find the customer-visible message to reply under
    msgs = requests.get(f"{PYLON}/issues/{issue_id}/messages",
        headers=HEADERS, timeout=10)
    msgs.raise_for_status()
    visible = [m for m in msgs.json()["data"] if not m.get("is_private")]
    # post the customer-facing reply (message_id is required;
    # email conversations also need email_info recipients)
    r = requests.post(f"{PYLON}/issues/{issue_id}/reply",
        json={"body_html": body, "message_id": visible[-1]["id"]},
        headers=HEADERS, timeout=10)
    r.raise_for_status()          # back off and retry on 429
    # then move the issue to waiting on the customer
    requests.patch(f"{PYLON}/issues/{issue_id}",
        json={"state": "waiting_on_customer"}, headers=HEADERS, timeout=10)
    return {"status": "sent"}

Wrap that (and a get_account, a search_help_center) as tools in an agent loop on the model of your choice. Our from-scratch walkthrough is in how to build an AI agent: from scratch vs. platform. The standard issue states are new, waiting_on_you, waiting_on_customer, on_hold and closed, so an escalation is the same PATCH with waiting_on_you plus an assignee.

How do auth and rate limits work?

Pylon's API authenticates with a bearer token (Authorization: Bearer <token>), and only Admin users can create API tokens. It's a workspace credential, not per-user OAuth, so store it as a secret and rotate it. Pylon publishes a rate limit on every endpoint: 30 requests a minute for listing issues, creating issues, replying and adding notes; 120 a minute for updating an issue and reading its messages; and 300 a minute for fetching a single issue. Past the limit you get HTTP 429. The reply limit is the one that bites: an agent answering a spike of new issues can hit 30 replies a minute, so every call needs retry with backoff (honor Retry-After when present), and a bulk backfill, such as pulling a year of issues for evals, has to be paced so it doesn't stall mid-run.

What does the production webhook need?

The API calls are the easy bit; making the agent run on real issues is the work. Pylon's webhooks don't document a signature scheme. Instead you set the body with templated variables and add any custom headers you like, such as a shared secret. So your endpoint checks that header, dedupes, and acks fast:

import hmac, os
from fastapi import FastAPI, Request, HTTPException

app = FastAPI()
SECRET = os.environ["PYLON_WEBHOOK_SECRET"]
seen: set[str] = set()   # use Redis/DB with a TTL in prod, not an in-memory set

@app.post("/pylon-webhook")
async def on_issue(req: Request):
    # Pylon sends the custom headers you configured on the webhook
    sent = req.headers.get("X-Webhook-Secret", "")
    if not hmac.compare_digest(sent, SECRET):
        raise HTTPException(status_code=401, detail="bad secret")
    event = await req.json()          # shape comes from your trigger's template
    issue_id = event["issue_id"]
    key = f"{issue_id}:{event.get('event', 'created')}"
    if key in seen:                   # a re-fired trigger must not send a second reply
        return {"ok": True, "dedup": True}
    seen.add(key)
    run_agent(issue_id)               # ideally enqueue; ack fast
    return {"ok": True}

Two things earn their keep here. The secret check rejects anything that didn't come from your Pylon trigger, which matters because your endpoint is public and issue text is attacker-controllable input. And the idempotency key is yours to design: put the issue ID and the event type in the trigger's body template, so a repeat delivery of the same event is dropped while a genuinely new event on the same issue still runs. Ack quickly and do the model call in a queue, so a slow run never holds the request open.

Then the rest: rate-limit handling (the 30-a-minute reply ceiling above), grounding in your help center (embed the articles and re-index when they change), guardrails (escalate refunds, redact PII, treat issue text as untrusted input), hosting 24/7, observability so you can see what every run did, and an eval harness that replays real historical issues so you measure quality before customers do. That's weeks of work plus permanent upkeep, none of it specific to your product.

What about Pylon's own AI?

Pylon is a B2B support platform built for shared Slack channels and high-touch accounts, and it ships its own agents: a Support Agent that can deflect questions using your content, gather internal context and take actions, plus Background Agents that prepare investigations on incoming issues, an Assist Agent and a Slack Agent (Pylon agent docs). Pylon's public pricing page now redirects to a demo form, so its AI pricing has to come from sales. Be honest about which of three routes you want:

  • Pylon's native agents: the fastest no-code path. You stay on Pylon's models and settings, and it's a fine fit if that covers your cases. Least control, least effort.
  • Build on the Pylon API yourself: you need a specific model, custom tools wired to your own systems (accounts, billing, provisioning), or full control of the runtime, and you have the engineering to own it. Most control; weeks to build plus the upkeep above.
  • Run a model-agnostic platform (Macha) against the API: model choice and custom tools, with hosting, observability and evaluation handled for you. Macha works as the AI layer on top of Pylon, not a replacement for it.

How do you connect Pylon to Macha?

Macha has native connectors for Zendesk, Freshdesk, Gorgias, Front, HubSpot or Intercom. Pylon isn't one of them, so a Pylon agent on Macha is built from two general-purpose pieces instead of a one-click connector:

  • Custom Tools for the Pylon API: describe GET /issues/{id}, GET /issues/{id}/messages, POST /issues/{id}/reply, POST /issues/{id}/note and PATCH /issues/{id} as Custom Tools with your Pylon bearer token, and the agent can read issues, reply, leave notes and change state. No glue code to host.
  • A Macha custom trigger: Macha generates a webhook URL; point a Pylon Trigger's "Send webhook" action at it, and each new issue starts an agent run with the payload as context.
  • Ground on your knowledge: add your help center, Confluence, Google Workspace or website as a Source so replies quote real articles instead of guessing.
  • Other systems as tools: the same Custom Tools approach turns your order, billing or CRM APIs into agent capabilities.
  • Check it before go-live: run it on sample issues in the test panel, keep it on internal notes first, and use evaluation and Studies to score its runs against its instructions.
Macha's Sources: a Confluence space, Google Workspace, a Zendesk Help Center with 24 articles, and the Macha site
Macha's Sources: a Confluence space, Google Workspace, a Zendesk Help Center with 24 articles, and the Macha site

You still set up the Pylon side (the token and the trigger), but you skip hosting the webhook endpoint, the queue and the agent runtime, and you don't write the tools either. The Macha team describes the Pylon endpoints as Custom Tools, builds the agent and tests it on sample issues before it touches a live one, on the trial and every plan. Pricing is about $0.40 a ticket, from $299 a month for up to 750 tickets, and that includes setup and a dedicated success manager who handles your changes.

Macha's Studies: batch agent evaluations against historical records, with model, status, result and credits
Macha's Studies: batch agent evaluations against historical records, with model, status, result and credits

How does building compare with Macha for Pylon?

Build on the Pylon APIMacha on the Pylon API
Read/reply to issuesYou write the API clientPylon endpoints described as Custom Tools
Trigger on new issuesYou build and host a webhook endpointPylon trigger calls a Macha custom trigger URL
Ground on help centerYou embed and host a vector storeAdd it as a Source
Other systems as toolsYou wire each integrationCustom Tools
Hosting, retries, observabilityYour infrastructureBuilt in
Evaluate before go-liveYou build a harnessTest runs, evaluation and Studies
UpkeepYours, permanentlyDone for you by the Macha team, with a dedicated success manager, included

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. If Pylon's Support Agent covers your cases, use it. If you want your own model and your own tools without running the infrastructure, Macha on the Pylon API gets you there, built for you. You can start free on Macha with $50 of usage and no credit card; the Macha team adds the Pylon endpoints as Custom Tools and tests an agent on sample issues before it touches a customer. After the trial it's about $0.40 a ticket, setup and a dedicated success manager included.

FAQ

Is a Pylon AI agent the same as Pylon's built-in AI? Not necessarily. Pylon ships its own Support Agent, but Pylon also documents "Bring Your Own Agent": you can run a model-agnostic agent on top of Pylon through its webhooks, API or MCP server, which helps if you want a specific model, custom tools, or to grade the agent your own way.

Do I need to install a Pylon marketplace app? No. Macha doesn't have a native Pylon connector; it calls the Pylon API through Custom Tools and is started by a Pylon trigger that sends a webhook to Macha. Nothing is installed inside Pylon beyond the API token and the trigger.

Can the agent take actions, not just answer? Yes. Through the Pylon API it can reply, leave internal notes, and update state, tags, assignee or custom fields, and your own systems' APIs (account lookups, refunds) can be added as Custom Tools, with guardrails on what it does unattended.

How do I make sure it's accurate before it replies to customers? Ground it in your help center, run it on sample issues in the test panel, and start with internal notes (POST /issues/{id}/note) rather than customer replies. Widen autonomy per issue type as it earns trust, and keep evaluating its runs.

Macha

About Macha

Macha is an AI agent platform that works on top of the help desk you already use (Zendesk, Freshdesk, Gorgias, Front, Intercom or HubSpot) and connects to the rest of your stack, even your own internal systems. It is done for you: the Macha team analyzes your past tickets, builds the knowledge base and the agents, and runs them in safe mode until the drafts are right. Pricing is about $0.40 a ticket, and that includes setup and a dedicated success manager who handles your changes. Learn more about Macha →

Zendesk
5.0 on Zendesk Marketplace

Loved by support teams worldwide

See what support teams are saying about Macha AI.

The application seems excellent to me! We are still testing, and we need support for some details and they were extremely efficient too!

Daniela Costa

Daniela Costa

Head of Support, Seabra

Macha has been a great addition to our support toolkit. It generates clear, well-organized responses that fit naturally into our workflow. One feature we particularly appreciate is its ability to automatically reply in the same language as the ticket.

Marius F

Marius F

Support Head, Zentana

We've been using Macha for a little while now and it's been really great addition so far! It's powerful, convenient, and makes getting work done a lot easier for our agents.

Alexander Wedén

Alexander Wedén

Head of Support

Support team is very helpful and responsive. Really enjoy how lightweight this is within Zendesk itself vs other more intrusive tools.

Cathleen Wright

Cathleen Wright

Zendesk Admin, Cortex IO

So far it's pretty good! Our queries are a little nuanced, so we can't always use it, but it's got enough utility for us. It can even incorporate our bilingual country with greetings in a second language.

Jae Oliver

Jae Oliver

Head of Support, Wise

Really enjoying using Macha, it has made a noticeable difference to our support team in a short amount of time. I really like the ticket summary feature, saves us a lot of time.

Harry Jackson

Harry Jackson

Head of Support, Crumb

Macha AI is a great addition to my workspace! It's powerful, convenient, and it really makes productivity so much easier for our agents!

Dave G

Dave G

Head of Support, Cyber Power Systems

Very impressed! AI integration for Zendesk has certainly come a long way and Macha seems to set the standard for now. This will for sure save lot of time in our support team.

Pauli Juel

Pauli Juel

Head of CS, Dokument24

Macha has been working great for us so far! The auto-responses are accurate and our resolution time has dropped significantly.

Lana T

Lana T

Zendesk Admin, Swotzy

Macha AI is a great addition. The knowledge base feature means our agents always have the right answers at their fingertips.

Mischa Wolf

Mischa Wolf

Head of Support, Topi

We're enjoying this integration so far. It's made our support team more efficient and our customers get faster responses.

Paula G

Paula G

Head of Customer Support, Xly Studio

The team enjoys using it. It saves considerable time on common questions and the integration options are excellent.

Kilian Leister

Kilian Leister

Support Head, Didriksons

Get your AI agents set up for you.

Book a 20-minute call with our team. We'll show you where we would start on your help desk and how the setup works. Setup and a dedicated success manager come with the trial and every plan.

Live in under a week
Safe mode until you approve
About $0.40 a ticket