Skip to content

IWaldiezAgentStore

@waldiez/react v0.4.8


Defined in: src/waldiez/models/Stores/IAgentStore.ts:14

PropertiesΒΆ

addAgent()ΒΆ

addAgent: (agentType, position, parentId) => WaldiezNodeAgent

Defined in: src/waldiez/models/Stores/IAgentStore.ts:35

Add a new agent to the store.

ParametersΒΆ
agentTypeΒΆ

WaldiezAgentType

positionΒΆ
xΒΆ

number

yΒΆ

number

parentIdΒΆ

undefined | string

ReturnsΒΆ

WaldiezNodeAgent

The newly added agent.

SeeΒΆ

WaldiezNodeAgent


addGroupMember()ΒΆ

addGroupMember: (groupId, agentId, position?) => void

Defined in: src/waldiez/models/Stores/IAgentStore.ts:109

Add a member to a specific group.

ParametersΒΆ
groupIdΒΆ

string

agentIdΒΆ

string

position?ΒΆ

XYPosition

ReturnsΒΆ

void


cloneAgent()ΒΆ

cloneAgent: (id) => null | WaldiezNodeAgent

Defined in: src/waldiez/models/Stores/IAgentStore.ts:46

Clone an existing agent.

ParametersΒΆ
idΒΆ

string

ReturnsΒΆ

null | WaldiezNodeAgent

The cloned agent, or null if the agent was not found.

SeeΒΆ

WaldiezNodeAgent


deleteAgent()ΒΆ

deleteAgent: (id) => void

Defined in: src/waldiez/models/Stores/IAgentStore.ts:58

Delete a specific agent from the store.

ParametersΒΆ
idΒΆ

string

ReturnsΒΆ

void


exportAgent()ΒΆ

exportAgent: (agentId, hideSecrets) => object

Defined in: src/waldiez/models/Stores/IAgentStore.ts:82

Export a specific agent from the store.

ParametersΒΆ
agentIdΒΆ

string

hideSecretsΒΆ

boolean

ReturnsΒΆ

object

The exported agent data.


getAgentById()ΒΆ

getAgentById: (id) => null | WaldiezNodeAgent

Defined in: src/waldiez/models/Stores/IAgentStore.ts:27

Get a specific agent by its ID.

ParametersΒΆ
idΒΆ

string

ReturnsΒΆ

null | WaldiezNodeAgent

The agent with the specified ID, or null if not found.

SeeΒΆ

WaldiezNodeAgent


getAgentConnections()ΒΆ

getAgentConnections: (nodeId, options?) => WaldiezAgentConnections

Defined in: src/waldiez/models/Stores/IAgentStore.ts:89

Get the connections of a specific agent.

ParametersΒΆ
nodeIdΒΆ

string

options?ΒΆ
sourcesOnly?ΒΆ

boolean

targetsOnly?ΒΆ

boolean

ReturnsΒΆ

WaldiezAgentConnections

An object containing sources and targets with their respective nodes and edges.


getAgents()ΒΆ

getAgents: () => WaldiezNodeAgent[]

Defined in: src/waldiez/models/Stores/IAgentStore.ts:20

Get the stored agents.

ReturnsΒΆ

WaldiezNodeAgent[]

An array of agents.

SeeΒΆ

WaldiezNodeAgent


getGroupMembers()ΒΆ

getGroupMembers: (groupId) => WaldiezNodeAgent[]

Defined in: src/waldiez/models/Stores/IAgentStore.ts:102

Get the members of a specific group.

ParametersΒΆ
groupIdΒΆ

string

ReturnsΒΆ

WaldiezNodeAgent[]

An array of agents in the group.

SeeΒΆ

WaldiezNodeAgent


importAgent()ΒΆ

importAgent: (agent, agentId, skipLinks, position, save) => WaldiezNodeAgent

Defined in: src/waldiez/models/Stores/IAgentStore.ts:69

Import an agent into the store.

ParametersΒΆ
agentΒΆ
agentIdΒΆ

string

boolean

positionΒΆ

undefined | { x: number; y: number; }

saveΒΆ

boolean

ReturnsΒΆ

WaldiezNodeAgent

The imported agent.

SeeΒΆ

WaldiezNodeAgent


removeGroupMember()ΒΆ

removeGroupMember: (groupId, memberId) => void

Defined in: src/waldiez/models/Stores/IAgentStore.ts:115

Remove a member from a specific group.

ParametersΒΆ
groupIdΒΆ

string

memberIdΒΆ

string

ReturnsΒΆ

void


setAgentGroup()ΒΆ

setAgentGroup: (agentId, groupId, position?) => void

Defined in: src/waldiez/models/Stores/IAgentStore.ts:122

Set the group of a specific agent.

ParametersΒΆ
agentIdΒΆ

string

groupIdΒΆ

string

position?ΒΆ

XYPosition

ReturnsΒΆ

void


updateAgentData()ΒΆ

updateAgentData: (id, data) => void

Defined in: src/waldiez/models/Stores/IAgentStore.ts:53

Update the data of a specific agent.

ParametersΒΆ
idΒΆ

string

dataΒΆ

Partial\<WaldiezNodeAgentData>

ReturnsΒΆ

void

SeeΒΆ

WaldiezNodeAgentData