> ## Documentation Index
> Fetch the complete documentation index at: https://docs.bijection.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Claude Agent SDK workers

Run the worker on compute you operate. Configure the worker's MCP client for
MCP 2026-07-28 and Streamable HTTP, and give it a credential for the app's
exact endpoint. [Authenticate MCP requests](https://docs.bijection.com/mcp/authentication.md) The worker
calls your tools as its own principal, of kind `"agent"` or `"service"`, so
guards can tell its calls apart (`a.as.kind`).

When a mutation asks the worker for a run, declare the worker as a target
whose performer is `http(url, { bearer })`, and submit to it. The
continuation named by `then` receives the run's `Result`:

```ts theme={"theme":{"light":"github-light-default","dark":"github-dark-default"}}
import { http, label, mutation, secret, t, target } from "@bijectionhq/bijection";

export const workerToken = secret();

export const triage = target({
  label: label.public,
  via: http("https://worker.example.com/runs", { bearer: workerToken }),
  args: { ticket: t.string },
  returns: { summary: t.string },
  within: { minutes: 10 },
});

export const triaged = mutation(
  { args: { ticket: t.string, result: t.result(triage) } },
  async (ctx, { ticket, result }) => {
    if (!result.ok) return null; // `Unknown`, `Expired`, `Failed` or the worker's refusal
    // store result.value.summary for the ticket
    return null;
  },
);

export const startTriage = mutation({ args: { ticket: t.string } }, async (ctx, { ticket }) => {
  await ctx.submit(triage, { ticket }, { once: ["triage", ticket], then: triaged.with({ ticket }) });
  return null;
});
```

A worker that must ask a person mid-run can call a tool that submits to a
target performed by roles, `target({ via: [roles], within })`, and wait for
its answer. [Run a tool as a task](https://docs.bijection.com/mcp/tasks.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.