Skip to main content

AgentBuilder

@gravity-rail/sdk


@gravity-rail/sdk / AgentBuilder

Class: AgentBuilder

Extends​

Constructors​

Constructor​

new AgentBuilder(name, options?): AgentBuilder

Parameters​

name​

string

options?​

AnyRecord = {}

Returns​

AgentBuilder

Overrides​

WorkspaceBuilderResource.constructor

Properties​

_created​

_created: boolean = false

Inherited from​

WorkspaceBuilderResource._created


_existed​

_existed: boolean = false

Inherited from​

WorkspaceBuilderResource._existed


_id?​

optional _id: number

Inherited from​

WorkspaceBuilderResource._id


_uuid?​

optional _uuid: string

Inherited from​

WorkspaceBuilderResource._uuid


chatModelId​

readonly chatModelId: string


codeInterpreterEnabled​

readonly codeInterpreterEnabled: boolean


memberRoleId?​

readonly optional memberRoleId: number


name​

readonly name: string


systemPrompt​

readonly systemPrompt: string


tools​

readonly tools: string[]


webBrowserEnabled​

readonly webBrowserEnabled: boolean

Accessors​

appliesWhenExisting​

Get Signature​

get appliesWhenExisting(): boolean

True when apply() is safe — and required — to run against a resource that was ADOPTED rather than created.

False by default because most builders create only: re-running their apply() on an existing resource would make a duplicate. Override it when apply() is an idempotent full write keyed on stable identities, which is the only way a re-run can express an EDIT (a removed goal, a reordered timeline) rather than just an addition.

Returns​

boolean

Inherited from​

WorkspaceBuilderResource.appliesWhenExisting


id​

Get Signature​

get id(): number

Server-assigned numeric id — available after apply() or adopt().

Returns​

number

Inherited from​

WorkspaceBuilderResource.id


isImplicit​

Get Signature​

get isImplicit(): boolean

True for resources the server creates on our behalf (currently a journey's Start step). They are kept in the resource list so edges can reference them, but they are never created, printed, or counted.

Returns​

boolean

Inherited from​

WorkspaceBuilderResource.isImplicit


uuid​

Get Signature​

get uuid(): string

Server-assigned uuid — available after apply() or adopt().

Returns​

string

Inherited from​

WorkspaceBuilderResource.uuid

Methods​

adopt()​

adopt(existing): void

Parameters​

existing​

AnyRecord

Returns​

void

Inherited from​

WorkspaceBuilderResource.adopt


apply()​

apply(client): Promise<void>

Parameters​

client​

GravityRailWorkspaceClient

Returns​

Promise<void>

Overrides​

WorkspaceBuilderResource.apply


matchKey()​

matchKey(): string | undefined

Returns​

string | undefined

Inherited from​

WorkspaceBuilderResource.matchKey


planLine()​

planLine(): string

Returns​

string

Overrides​

WorkspaceBuilderResource.planLine