Theo Docs
TheoKitTheoKit-SDKTheoUITheo PaaS
API reference

AgentBuilder

Fluent builder for AgentOptions. Chainable setters mutate internal

AgentBuilder

Auto-generated from TypeDoc on each build. Edit the JSDoc in packages/sdk/src/ to change this page.

Fluent builder for AgentOptions. Chainable setters mutate internal state and return this. Three terminals:

  • .build() — synchronous snapshot (shallow clone) of accumulated options.
  • .create() — calls the injected create (Agent.create).
  • .getOrCreate(agentId) — calls the injected getOrCreate (Agent.getOrCreate).

Validation runs inside the terminals via validateAgentOptions. See ADR D25.

Signature

class AgentBuilder {
  agentId(...): ...
  agents(...): ...
  apiKey(...): ...
  build(...): ...
  cloud(...): ...
  context(...): ...
  create(...): ...
  getOrCreate(...): ...
  local(...): ...
  mcpServers(...): ...
  memory(...): ...
  model(...): ...
}

Kind

class

Source

packages/sdk/src/agent-builder.ts:41

On this page