Skip to content

Developer hub

Build agents. Run them again and again.

Define a reusable agent around your workflow. Create it in chat or code, run it on new inputs, and build up to batches, loops, and multi-agent campaigns.

Browse developer docs

Current: Build with Grep

Create your first agent

Start with the work you want to repeat: the instructions, evidence, tools, and output format. Build once, save the agent ID, and reuse it for every new input.

Create, run, reuse

create-agent.tstypescript

import { Agent } from '@parcha/agentrun';

const agent = await Agent.create({
  apiKey: process.env.AGENTRUN_API_KEY!,
  baseURL: process.env.AGENTRUN_API_BASE!,
  prompt: 'Extract invoice numbers, totals, and due dates. Return JSON and flag missing fields.',
});
await agent.waitUntilReady();
console.log('Save this agent ID:', agent.id);

const run = await agent.run('Invoice INV-1042. Total USD 250. Due 2026-10-15.');
const result = await agent.wait(run.id);
console.log(result);

Set your API key and the base URL for your AgentRun-enabled deployment before running this example. The quickstart covers setup, build completion, and reuse.

Build with the agent primitives

PrimitiveUse it for
AgentsReusable instructions, skills, tools, and output requirements.
RunsOne execution of an agent on a new input.
SkillsReusable methods that agents apply to the job.
BatchesThe same agent across many inputs.
LoopsRepeat work on a schedule and watch for changes.
CampaignsConnect multiple agents and pass results between stages.

Use the interface that fits your workflow