StitchAPI
The agent-native runtime where a typed, declarative stitch replaces fetch for humans and agents alike.
A stitch is a typed, declarative, composable unit that turns one endpoint
into a resilient, validated, observable function — you declare it once, and your
code, the CLI, and an agent all call it without ever touching a credential.
StitchAPI is the runtime that lets a stitch replace fetch.
import { } from 'stitchapi';
const = <{ : number; : string }>(
'https://api.example.com/users/{id}',
);
const = await ({ : { : 1 } });New here? Install the runtime and declare your first stitch in five minutes with the Quickstart. For the why behind it, read the Introduction and The stitch primitive.
Explore the docs
Getting started
What a stitch is, how to install it, and your first stitch in five minutes.
Concepts
The mental model — the stitch primitive, the event stream, and capability over credential.
Guides
One focused page per feature: authoring, auth, resilience, data, validation, observability, state.
Surfaces
The front doors to one definition — in-process function, CLI, HTTP, and MCP.
For agents
How an agent invokes, authors, and reasons over stitches without ever seeing a secret.
Reference
Signatures and option shapes, generated from the real types.
Errors & pitfalls
Every coded failure, keyed to the URL the runtime points you at.
Driving stitches from an agent? Head to Use from an agent —
one context-frugal run_stitch tool, the capability boundary, and the
auto-generated llms.txt.