Skip to content

AgentDefinitionRequest

Namespace AgentPrism · Assembly AgentPrism.AspNetCore.dll

Request to create or update an agent definition.

public sealed record AgentDefinitionRequest : IEquatable<AgentDefinitionRequest>

objectAgentDefinitionRequest

IEquatable<AgentDefinitionRequest>

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

Does not bind directly to AgentDefinition. The definition’s Origin, Version, TenantId, and UpdatedAt fields belong to the server; letting the client set these would break version history and tenant isolation.

public AgentDefinitionRequest()

Names of other agents this agent may call.

public IReadOnlyList<string> CallableAgentNames { get; init; }

IReadOnlyList<string>

Checked at the moment the call graph is saved: an unknown name, self-calling, and indirect cycles are rejected with 400 Bad Request.

Context compaction settings. If left empty, no compaction is applied.

public CompactionSettings? Compaction { get; init; }

CompactionSettings?

Short description.

public string? Description { get; init; }

string?

Name shown in the UI.

public string? DisplayName { get; init; }

string?

Harness settings. If left empty, a plain chat agent is compiled.

public HarnessSettings? Harness { get; init; }

HarnessSettings?

System instructions.

public string? Instructions { get; init; }

string?

Culture-keyed instructions. See AgentDefinition.InstructionsByCulture.

public IReadOnlyDictionary<string, string>? InstructionsByCulture { get; init; }

IReadOnlyDictionary<string, string>?

Memory provider settings. If left empty, no memory provider is added.

public MemorySettings? Memory { get; init; }

MemorySettings?

Model binding: provider, model, and sampling settings.

public required ModelBinding Model { get; init; }

ModelBinding

Agent name. Unique within the catalog.

public required string Name { get; init; }

string

Names of skills that can be loaded at runtime.

public IReadOnlyList<string> SkillNames { get; init; }

IReadOnlyList<string>

Names of tools to use. Tools are defined only in code; only the name of an already registered tool may be given here.

public IReadOnlyList<string> ToolNames { get; init; }

IReadOnlyList<string>

public override bool Equals(object? obj)

obj object?

bool

public bool Equals(AgentDefinitionRequest? other)

other AgentDefinitionRequest?

bool

public override int GetHashCode()

int

Converts the request into a persistable definition.

public AgentDefinition ToDefinition()

AgentDefinition

A definition ready to be written to the database.

public override string ToString()

string

operator ==(AgentDefinitionRequest?, AgentDefinitionRequest?)

Section titled “ operator ==(AgentDefinitionRequest?, AgentDefinitionRequest?)”
public static bool operator ==(AgentDefinitionRequest? left, AgentDefinitionRequest? right)

left AgentDefinitionRequest?

right AgentDefinitionRequest?

bool

operator !=(AgentDefinitionRequest?, AgentDefinitionRequest?)

Section titled “ operator !=(AgentDefinitionRequest?, AgentDefinitionRequest?)”
public static bool operator !=(AgentDefinitionRequest? left, AgentDefinitionRequest? right)

left AgentDefinitionRequest?

right AgentDefinitionRequest?

bool