← Writing

How Long Does It Take to Build an AI Agent? Real Timeline

7 min read

The honest answer: writing an agent's core loop — a prompt, a model call, maybe a tool schema — takes an afternoon. Wiring that agent into a real system so it reacts to real events (an issue gets created, someone assigns it, a comment lands) takes longer, because you're building a webhook pipeline, not a chatbot. That's the part nobody times.

The Question Everyone Asks Wrong

"How long does it take to build an AI agent" conflates two different jobs. Job one: get a model to reason over some input and produce output. Job two: get that reasoning triggered by, and fed back into, a tool your team already uses — a tracker, a chat client, a repo.

Job one is fast now. Any framework, any model provider, a few dozen lines, and you have something that responds to a prompt. Job two is where the actual engineering time goes: webhook signatures, event schemas, idempotency, retry handling, mapping a third-party event model onto your own data model, and — the part that's easy to forget until it bites you — a public URL for the third party to call during development, since most trackers won't POST to localhost.

The bottleneck is integration plumbing, not model logic. If someone tells you they built an agent in an hour and don't mention a webhook, they mean job one.

What Actually Takes Time: A Real Webhook Bridge

Here's what job two looks like, in code, from DevPilot's own docs/LINEAR-BRIDGE.md. This is the inbound sync that turns Linear activity into DevPilot activity.

First, the local dev loop. Linear needs to POST to a URL it can reach, so during development that means tunnelling a local port:

# Expose local server
ngrok http 3847

# Configure webhook in Linear:
# URL: https://xxxxx.ngrok.io/api/integrations/linear/webhook

That /api/integrations/linear/webhook path is the one fixed point everything else hangs off. Get the tunnel wrong, or point Linear's webhook config at the wrong path, and nothing downstream fires — no error in your code, no event in your logs, just silence. That's usually the first hour lost.

Once the tunnel is up and Linear is configured, the interesting work starts: deciding what each event means for your system.

Timeline Breakdown by Component

Three distinct pieces of work, each with a different shape:

Local webhook handler and tunnel. Standing up a server that accepts a POST, verifies it's actually from Linear, and returns a 200 fast enough that Linear doesn't retry on you. Running ngrok http 3847 and pasting the resulting URL into Linear's webhook settings. This is infrastructure, not agent logic — it's the same work you'd do wiring up any webhook-based integration, agent or not.

Mapping the four events DevPilot handles. Linear can emit far more than four event types, but the bridge only listens for the ones that map cleanly onto DevPilot's model:

| Event | Action | |-------|--------| | Issue.create | Create horizon item | | Issue.update | Update item details | | Issue.assign | Check for bot user → dispatch | | Comment.create | Forward to agent session |

Each row here is its own small decision: what does "create a horizon item" actually populate, what fields survive an update, what happens if a comment arrives for an issue that hasn't been synced yet. None of this is agent reasoning. It's data mapping, and it's where most of the implementation hours land.

Bot user creation and configuration. Auto-dispatch — an issue getting assigned and an agent actually starting work on it — needs a Linear "bot" user to exist, its user ID configured in the bridge settings, and then assignment-to-that-user treated as a dispatch signal. Creating the user is a few minutes in Linear's admin UI. Getting the ID into the right config and confirming Issue.assign events actually check for it is the part worth testing properly before you trust it.

None of these three add up to a fixed number of hours you can quote as a benchmark — that depends on your stack, your auth setup, how much error handling you bother with before shipping. What's true is the shape: tunnel and handler first, event mapping second, bot user and dispatch wiring last, and the second step is where the real thinking happens.

Why the Agent's Reasoning Isn't the Bottleneck

Notice that nowhere in the table above does "agent decides what to do" show up as a separate line item. That's the point. The webhook bridge's job is to get an event from Linear into something an agent can act on — a horizon item, an agent session — not to do the reasoning itself.

Once an Issue.create event lands and a horizon item exists, and once an Issue.assign event confirms the bot user matches and pushes work into a dispatch queue, the actual agent invocation is comparatively cheap: an API call to whichever agent is wired up. In DevPilot's case today, that's Claude Code — it's the only agent actually wired in, not a placeholder for "any LLM you like."

The distinction that matters: spinning up a single LLM call is trivial and has been for a while. Building a pipeline that reliably turns external events into durable, resumable work items — one that survives a dropped webhook, a duplicate delivery, or a comment that arrives before its parent issue has synced — is the part that takes real engineering time. The orchestrator concept exists precisely because "call the model" and "manage the queue of things the model should be called about" are different problems with different failure modes.

Is Building AI Agents Profitable?

This depends on which cost you're measuring, and it's worth separating them because they don't move together.

Model API costs, for most integration-triggered work, are small and predictable — you're paying per call, and the calls are triggered by real events (an issue assigned, a comment posted), not by polling. This isn't a claim about a specific dollar figure; DevPilot doesn't publish one, and any number here would be invented. What is knowable is the shape of the cost: bounded by event volume, not by engineering hours.

Engineering time is the number that actually varies, and it's the one the timeline breakdown above is describing. Writing your own Linear webhook handler, testing it with ngrok, mapping four-plus event types, and building bot-user dispatch is a real, repeatable chunk of work — the kind that has to happen again for every tracker you want to support, and again for every agent you want to wire in.

That's the calculation that decides profitability: is the plumbing work you're about to do already solved somewhere, or not? If it is — if there's a published, tested Linear integration doing exactly this event mapping — writing your own version of it is time spent re-deriving a solved problem. If your tracker isn't supported anywhere, the plumbing work is unavoidable, and the question becomes whether the resulting automation is worth those engineering hours. Linear is the only tracker DevPilot has wired up; anything else means someone writes this bridge from scratch.

How to Speed This Up

The fastest path to "an agent responding to my tracker" is not writing the webhook handler yourself. Look at what's already published before building: DevPilot's Linear integration is the exact bridge documented above, already handling the four events and the bot-user dispatch flow. The full list of what's wired, and what isn't, is on the integrations page — worth checking before assuming you need to build a handler at all.

If you're implementing your own bridge regardless — different tracker, different constraints — the terminology is worth knowing before you start naming things yourself. What a dispatch queue is and what it isn't, and how an orchestrator differs from a simple job runner, will save you from reinventing vocabulary that already has a precise meaning.

Once the single-agent pipeline works, the next real question is what happens when more than one issue gets assigned at the same time. That's a different problem from the one this article covers, and it's addressed directly in how many agents you can run at once and in why waves work better than queues for that kind of concurrent dispatch.