Skip to content

AgentPrismAgentGraphOptions

Namespace AgentPrism · Assembly AgentPrism.Core.dll

Defines limits that apply when an agent calls another agent.

public sealed class AgentPrismAgentGraphOptions

objectAgentPrismAgentGraphOptions

object.GetType(), object.ToString(), object.Equals(object?), object.Equals(object?, object?), object.ReferenceEquals(object?, object?), object.GetHashCode()

Child-agent calls multiply cost because every layer makes its own model calls. Without limits, one incorrectly written definition can start dozens of runs for one request. Depth, token, and count limits therefore have defaults.

Limits apply per tree: the root run creates an AgentRunBudget, and every run in the tree shares it.

public AgentPrismAgentGraphOptions()

Gets or sets the largest allowed call depth. The root run has depth zero, so the default allows a three-layer tree.

public int MaxDepth { get; set; }

int

Gets or sets the largest number of child runs a tree can start. The root run does not count. Zero or a negative value removes the limit.

public int MaxTotalRuns { get; set; }

int

Gets or sets the largest token count that a tree can spend. Zero or a negative value removes the limit.

public long MaxTotalTokens { get; set; }

long

The default intentionally exists. An unlimited installation learns about its first invalid definition from the bill.

Creates a tree budget from these options.

public AgentRunBudget CreateBudget()

AgentRunBudget

The budget that the root run shares through its tree.