Skip to content

Function: createAgentBuilder() ​

ts
function createAgentBuilder<THandle>(id): AgentBuilder<unknown, unknown, THandle>;

Defined in: builders/create-agent-builder.ts:17

Creates a fluent AgentBuilder for P.agent(id).

Validates that id is a non-empty identifier and initializes an immutable AgentBuilder with roleKey defaulting to id.

Type Parameters ​

Type ParameterDefault typeDescription
THandleunknownIsolation scope handle type.

Parameters ​

ParameterTypeDescription
idstringUnique identifier of the base agent definition.

Returns ​

AgentBuilder<unknown, unknown, THandle>

Frozen AgentBuilder instance.

Released under the MIT License.