Inquir Compute · agentic workflows

Agentic workflow backend for multi-step AI agents

Agentic workflows need a durable backend: each step runs as an isolated serverless function, tool calls go through authenticated gateway routes, and long or flaky work runs on the durable background-jobs queue—automatic retries with exponential backoff, dead-letter on repeated failure, and runs that survive restarts. Per-step execution traces show input, output, and retry count for every model turn.

Last updated: 2026-06-28

Direct answer

Agentic workflow backend for multi-step AI agents. Each workflow step is a serverless function: plan, call-tool, validate, notify, approve. The durable background-jobs queue connects steps with automatic retries, backoff, and dead-letter—so a failed enrichment step retries without re-running the model planning step.

When it fits

  • Multi-step agents that call tools, validate results, and notify humans
  • Workflows that need durable state, per-step retries, or approval gates

Tradeoffs

  • In-memory state machines lose progress on restart. There is no durable checkpoint between tool calls, no audit trail for compliance, and no way to pause for human approval without custom plumbing.
  • Calling tools directly from the orchestrator couples model traffic with database credentials and third-party API keys in the same runtime—harder to scope permissions and rotate secrets.

Why agentic workflows need a dedicated backend

A single LLM loop with inline tool calls works in demos. Production agentic workflows span minutes or hours: research, act, verify, escalate, notify. When step four fails, you need to retry only that step—not replay the entire conversation from scratch.

Without a real backend, orchestration logic, tool execution, and side effects share one process. One bad deploy or memory leak takes down every agent workflow simultaneously.

Where lightweight agent orchestration breaks

In-memory state machines lose progress on restart. There is no durable checkpoint between tool calls, no audit trail for compliance, and no way to pause for human approval without custom plumbing.

Calling tools directly from the orchestrator couples model traffic with database credentials and third-party API keys in the same runtime—harder to scope permissions and rotate secrets.

Serverless functions + pipelines as the agentic layer

Each workflow step is a serverless function: plan, call-tool, validate, notify, approve. The durable background-jobs queue connects steps with automatic retries, backoff, and dead-letter—so a failed enrichment step retries without re-running the model planning step.

Tool calls go through authenticated gateway routes with per-tool secrets. The orchestrator sees structured JSON; the platform handles isolation, warm pools for hot tools, and execution history per step.

Agentic workflow backend patterns

Durable multi-step runs

Long-running steps run on the durable background-jobs queue: automatic retries with exponential backoff, dead-letter after repeated failure, and visibility-timeout reaping so runs survive a worker restart. A failed step retries without re-running completed steps.

Tool calls as gateway functions

Each tool is an authenticated HTTP endpoint with isolated containers and scoped secrets—not inline code in the orchestrator.

Human-in-the-loop gates

Pause the pipeline before sensitive actions; continue when approval arrives via webhook or manual trigger.

Branching and fan-out

Route to different steps based on tool output, confidence scores, or policy checks—without nested if/else in one monolith.

How to build an agentic workflow backend on Inquir

Separate orchestration from execution: the model plans, gateway functions run tools, and the durable background-jobs queue carries long work with retries.

1

Define workflow steps

Map each agent action to a function or pipeline step: plan, tool-call, validate, notify, approve.

2

Wire tools to gateway routes

Deploy one function per tool with API key auth and workspace secrets. Return structured JSON the orchestrator passes back to the model.

3

Connect steps in a pipeline

Use pipelines for durable runs: retries per step, branching on tool output, human approval waits, and full execution history.

A multi-step agent workflow as a pipeline

A multi-step agent workflow is a pipeline: each step is an isolated function wired into a graph, with its own retry policy and its own persisted run record. A humanGate node pauses the run for approval and resumes when someone acts on it; flaky steps retry with backoff without re-running completed steps, and the whole run—inputs, outputs, retry counts, and where it is right now—is queryable in execution history.

pipelines/research-agent.json (pipeline graph)
{
  "schemaVersion": 1,
  "nodes": [
    { "id": "in",      "kind": "httpTrigger", "name": "Start research", "config": { "method": "POST" } },
    { "id": "search",  "kind": "lambda", "name": "Search docs",
      "config": { "functionId": "search-docs",
                  "inputMapping": { "query": "{{trigger.body.query}}" },
                  "retryPolicy": { "maxAttempts": 3, "backoffMs": 1000, "strategy": "exponential" } } },
    { "id": "draft",   "kind": "lambda", "name": "Generate draft",
      "config": { "functionId": "generate-draft",
                  "inputMapping": { "results": "{{steps.search.output.results}}" } } },
    { "id": "approve", "kind": "humanGate", "name": "Approve publish",
      "config": { "mode": "approve", "promptTemplate": "Publish the draft for {{trigger.body.query}}?" } },
    { "id": "publish", "kind": "lambda", "name": "Publish result", "config": { "functionId": "publish-result" } },
    { "id": "reject",  "kind": "lambda", "name": "Notify rejected", "config": { "functionId": "notify-rejected" } }
  ],
  "edges": [
    { "id": "e1", "sourceNodeId": "in",      "targetNodeId": "search" },
    { "id": "e2", "sourceNodeId": "search",  "targetNodeId": "draft",   "sourceHandle": "success" },
    { "id": "e3", "sourceNodeId": "draft",   "targetNodeId": "approve", "sourceHandle": "success" },
    { "id": "e4", "sourceNodeId": "approve", "targetNodeId": "publish", "sourceHandle": "approve" },
    { "id": "e5", "sourceNodeId": "approve", "targetNodeId": "reject",  "sourceHandle": "reject" }
  ]
}
functions/search-docs.mjs (pipeline step function)
export async function handler(event) {
  // API key auth enforced at the gateway route before this code runs
  const { query } = JSON.parse(event.body || '{}');
  const results = await searchInternalDocs(query); // DB_URL from workspace secrets
  return { statusCode: 200, body: JSON.stringify({ results, count: results.length }) };
}
start a run (via the pipeline httpTrigger route)
# The httpTrigger node exposes the pipeline on a gateway route.
# POST a query to start a run; it flows search -> draft -> approval.
curl -X POST https://<your-app>/api/research-agent \
  -H "X-Api-Key: $INQUIR_API_KEY" \
  -d '{"query":"Q3 pricing changes"}'
# -> { "runId": "...", "status": "RUNNING" }
# The run pauses at the humanGate until someone approves or rejects;
# each step's input, output, and retry count is in the execution history.

Best fit for agentic workflow backends

When this works

  • Multi-step agents that call tools, validate results, and notify humans
  • Workflows that need durable state, per-step retries, or approval gates

When to skip it

  • Single-turn chat with one tool call and no side effects

FAQ

How is this different from tool calling backend?

Tool calling covers individual HTTP endpoints per tool. Agentic workflow backend adds the multi-step layer: chained steps on the durable background-jobs queue, branching, human-approval waits, automatic retries, and per-step execution history across model turns.

Can I use LangGraph or CrewAI with Inquir?

Yes. Keep your orchestration framework; point tool calls at Inquir gateway routes and offload long or retriable steps to the durable background-jobs queue.

What happens when a pipeline step fails?

The step retries according to pipeline policy. Completed steps are not re-run. Execution history shows which step failed, how many retries occurred, and the error output.