Interface ILdAiGraphClient
Extension interface for agent graph operations. Implemented alongside ILdAiClient by LdAiClient.
Namespace: LaunchDarkly.Sdk.Server.Ai.Interfaces
Assembly: LaunchDarkly.ServerSdk.Ai.dll
Syntax
public interface ILdAiGraphClient
Methods
| Edit this page View SourceAgentGraph(string, Context, IReadOnlyDictionary<string, object>)
Retrieves and validates an agent graph identified by graphKey.
Fires a usage tracking event, evaluates the graph flag, fetches all agent configs
referenced in the graph, and performs connectivity validation. Returns an
AgentGraphDefinition whose Enabled property indicates whether
all validation steps passed.
Declaration
AgentGraphDefinition AgentGraph(string graphKey, Context context, IReadOnlyDictionary<string, object> variables = null)
Parameters
| Type | Name | Description |
|---|---|---|
| string | graphKey | the LaunchDarkly flag key for the agent graph |
| Context | context | the context |
| IReadOnlyDictionary<string, object> | variables | optional variables interpolated into each node's agent instructions |
Returns
| Type | Description |
|---|---|
| AgentGraphDefinition | an agent graph definition |
CreateGraphTracker(string, Context)
Reconstructs a graph tracker from a resumption token. This enables cross-process continuation of graph-level metrics.
Declaration
AiGraphTracker CreateGraphTracker(string resumptionToken, Context context)
Parameters
| Type | Name | Description |
|---|---|---|
| string | resumptionToken | the token obtained from ResumptionToken |
| Context | context | the context to use for track events |
Returns
| Type | Description |
|---|---|
| AiGraphTracker | a graph tracker associated with the original run |