Skip to content
Apkar

Reference

SDK reference

Every method on the agent builder.

The builder is chainable and immutable — each call returns a new agent definition rather than mutating the previous one, so a base agent can be safely extended in several directions.

agent(name: string)
  .step(tool: string, input?: (ctx) => object)
  .parallel(steps: Step[])
  .approval(options: ApprovalOptions)
  .retry(policy: RetryPolicy)
  .budget(budget: Budget)
  .start(input: object): Promise<Run>