Majid Sohail Khan
All roles
Agents·Available for new projects

Hire an AI agent developer

Agents with write access to things that matter.

An agent that drafts text is a demo. An agent that updates a loan file, triggers a notification, or moves money is a production system that happens to have a model in it — and it needs the same treatment as any other: bounded permissions, idempotent actions, retries that do not double-charge, an audit trail, and a human in the loop wherever being wrong is expensive. I build that second kind.

// the problem

Why agent projects stall between the prototype and the product

A prototype agent is genuinely easy now, which is exactly what makes the next step deceptive. Reading is safe. The moment an agent gets write access— to a record, a notification, an invoice, a customer-facing message — you have crossed into production engineering, and the failure modes are the ordinary distributed-systems ones with a nondeterministic component bolted on.

The stalls are predictable. A scope wide enough that success was never defined, so the agent is judged on whether it feels impressive. Tools shaped for the developer rather than the model, returning errors as prose the model reads as success. No idempotency, so a retry after a timeout sends the second email. Unbounded loops that turn a five-cent task into an eighty-dollar one overnight. And no trace of what happened, so the first incident becomes archaeology and the fix is somebody rewording a prompt and hoping.

The pattern that actually survives contact with a business is narrower than the marketing suggests: an agent with a defined job, tools that enforce their own permissions, and a review surface where a person sees what it completed, what is pending, and what needs judgment — accepting or overriding in a click. That is the shape I have shipped into a live lending platform, and it is the shape teams keep using six months later.

// approach

How I build it

01

Give the agent one job and one owner

Autonomous, open-ended agents are where budgets go to die. The ones that survive contact with production have a narrow remit, a defined success condition, and a named person who sees what it did. We start by cutting the scope down to the task that is genuinely worth automating.

02

Tools are an API surface — design them like one

Most agent failures are tool-design failures: an action that is too broad, a response the model cannot interpret, an error string that reads like success. I write narrow, well-typed tools with useful failure messages, and enforce permissions in the tool itself rather than trusting the model to stay inside its instructions.

03

Assume every step fails at least once

Models time out, return malformed output, and occasionally call the same tool twice. Actions are idempotent, retries are bounded, partial progress is checkpointed, and there is always a terminal state — so a bad run costs you a log line rather than a duplicated record and a support ticket.

04

Human-in-the-loop where being wrong is expensive

The most useful pattern I have shipped is not full automation: it is an agent that does the work and a dashboard showing what it completed, what is pending, and what needs a person — where any suggestion can be accepted or overridden in a click. Teams trust that, and trust is what determines whether the feature gets used.

05

Observability, because you cannot debug a vibe

Traced runs, per-step token and latency accounting, and a graded set of real scenarios that runs when prompts or tools change. Without it, the first production incident becomes a guessing game, and prompt changes ship on someone's impression that the output felt better.

06

Built into your architecture, not beside it

The agent authenticates as a real principal in your system, respects the same authorization rules, writes through your existing services, and shows up in your existing logs. A parallel stack with its own credentials and its own database is how this becomes someone else's problem in six months.

// deliverables

What you get

  • A scoped agent or agentic workflow running against your real services
  • Typed tool definitions with permissions enforced at the tool boundary
  • Retry, idempotency, and failure handling around every side effect
  • A review surface showing what ran, what it changed, and what needs a human
  • Tracing plus per-run cost and latency reporting
  • A scenario suite that catches regressions when prompts or models change
// stack
AI AgentsAgentic WorkflowsOpenAI & ClaudeLangChain / LangGraphNode.jsNestJSTypeScriptPostgreSQLRedisSocket.io
// engagement

How we would work

Ways to work together
  • Own a build end-to-end, from data model to shipped interface
  • Drop into an existing team and carry a workstream
  • Scope and prototype a feature before you commit a budget to it
  • Review an architecture before it has to scale
Hours & overlap

I work to your timezone rather than asking you to work around mine — my hours shift to cover your team’s working day, wherever that is. Live calls where they earn the time, written updates for everything else.

Top Rated Plus · Top 3% on Toptal · 100% Job Success · 10 yrs in production.

// questions

Questions people ask before hiring

Do we need an agent, or just a workflow?

If the steps are known in advance, you want a workflow with model calls inside it — cheaper, faster, testable, and it fails in predictable ways. An agent earns its cost when the path genuinely varies with the input and the number of branches is too large to enumerate. I will tell you honestly which one your problem is; it is a workflow more often than the market implies.

Which model should we build on?

Decide that last, and keep it swappable. I build against a thin abstraction so the model is a configuration choice, then evaluate candidates on your actual scenarios rather than on benchmarks. The usual outcome is a mixed setup: a strong model for reasoning-heavy steps, a cheaper and faster one for extraction and classification.

How do you keep token costs under control?

Measure per run before optimising. After that the wins are structural: retrieve less and better rather than stuffing context, cache the stable parts of prompts, route simple steps to smaller models, and cap the number of iterations a single run may take. Runaway agent spend is almost always an unbounded loop, not an expensive model.

What happens when the agent gets something wrong?

You design for it up front. Actions are reversible or gated behind review, every run is traced so you can see exactly which step went wrong and why, and the scenario suite grows by one case each time reality surprises you. The goal is not an agent that never errs — it is a system where an error is visible, contained, and cheap to undo.

Can it work with our existing API and permissions?

That is the preferred route. The agent calls your services as an authenticated principal with a scoped role, so it inherits the authorization rules you already trust and appears in your existing audit log. If some capability has no API yet, I build that endpoint properly rather than letting the agent reach around your architecture into the database.

How do you work with a team in another timezone?

By moving to yours. I set my working hours around your team's day and hold a consistent overlap window, so calls happen when a call is worth it and nobody waits overnight to learn what changed. Everything outside that window runs async with written updates.

Tell me what you are building.

You get an honest answer on fit within 24 hours — including when the answer is that you do not need me.

Start a conversation