Class AgentDefinition
Describes a fully configured agent as a serializable, versionable artifact. An agent definition captures everything needed to reproduce an agent's behavior across environments: model selection, tool loadout, system prompt, and workflow chain.
public sealed class AgentDefinition
- Inheritance
-
AgentDefinition
- Inherited Members
Remarks
YAML format example:
name: pr-reviewer
displayName: PR Reviewer Agent
description: Reviews pull requests for code quality and security
version: "1.0"
model:
provider: ClaudeCode
id: claude-opus-4
maxOutputTokens: 8096
loadout: developer
systemPrompt: |
You are a code reviewer focused on...
workflows:
- pr-review-workflow
tags:
- code-review
Properties
CreatedAt
Timestamp the definition was first authored.
public DateTime CreatedAt { get; set; }
Property Value
Description
Description of this agent's purpose and capabilities.
public string? Description { get; set; }
Property Value
DisplayName
Human-readable display name.
public string? DisplayName { get; set; }
Property Value
Environment
Environment this definition is intended for (e.g. "development", "production").
public string? Environment { get; set; }
Property Value
IsDeprecated
Whether this definition is deprecated and should not be used for new sessions.
public bool IsDeprecated { get; set; }
Property Value
Loadout
Name of the tool loadout to apply (must be registered in IToolLoadoutRegistry).
Defaults to the session's active loadout if not specified.
public string? Loadout { get; set; }
Property Value
MigrationGuidance
Guidance for migrating to a newer version.
public string? MigrationGuidance { get; set; }
Property Value
Model
Model selection for this agent.
public AgentModelSpec? Model { get; set; }
Property Value
Name
Unique identifier for this agent (kebab-case, e.g. "pr-reviewer").
public string Name { get; set; }
Property Value
SystemPrompt
System prompt override. Supports multi-line YAML block scalars.
public string? SystemPrompt { get; set; }
Property Value
Tags
Classification and discovery tags.
public IList<string> Tags { get; init; }
Property Value
UpdatedAt
Timestamp the definition was last modified.
public DateTime UpdatedAt { get; set; }
Property Value
Version
Semantic version string (e.g. "1.0", "2.3.1").
public string Version { get; set; }
Property Value
Workflows
Named workflows this agent can trigger (references AgentWorkflowDefinition.Name).
public IList<string> Workflows { get; init; }