Skip to content

ChildRunApproval

Namespace AgentPrism · Assembly AgentPrism.Core.dll

Determines whether a response carries a tool call pending approval.

public static class ChildRunApproval

objectChildRunApproval

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

The detection is kept in one place because it has more than one consumer: ChildAgentInvoker returns an understandable error message to the caller, RunRecordingAgent closes the sub-run as Failed. If written separately in two places, one would change and the other would fall behind.

The MCP and A2A external call handlers in AgentPrism.AspNetCore use the same detection too (the second application of the same rule: it is not an external caller, it cannot give approval). This is why the type is public.

Searches the messages for a tool call pending approval.

public static string? Describe(IEnumerable<ChatMessage> messages)

messages IEnumerable<ChatMessage>

Response messages.

string?

Names of tools pending approval; null when there are none.

Searches the contents for a tool call pending approval.

public static string? Describe(IEnumerable<AIContent> contents)

contents IEnumerable<AIContent>

Response contents.

string?

Names of tools pending approval; null when there are none.