Table of Contents

Class AgentDefinition

Namespace
JD.AI.Core.Agents
Assembly
JD.AI.Core.dll

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

DateTime

Description

Description of this agent's purpose and capabilities.

public string? Description { get; set; }

Property Value

string

DisplayName

Human-readable display name.

public string? DisplayName { get; set; }

Property Value

string

Environment

Environment this definition is intended for (e.g. "development", "production").

public string? Environment { get; set; }

Property Value

string

IsDeprecated

Whether this definition is deprecated and should not be used for new sessions.

public bool IsDeprecated { get; set; }

Property Value

bool

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

string

MigrationGuidance

Guidance for migrating to a newer version.

public string? MigrationGuidance { get; set; }

Property Value

string

Model

Model selection for this agent.

public AgentModelSpec? Model { get; set; }

Property Value

AgentModelSpec

Name

Unique identifier for this agent (kebab-case, e.g. "pr-reviewer").

public string Name { get; set; }

Property Value

string

SystemPrompt

System prompt override. Supports multi-line YAML block scalars.

public string? SystemPrompt { get; set; }

Property Value

string

Tags

Classification and discovery tags.

public IList<string> Tags { get; init; }

Property Value

IList<string>

UpdatedAt

Timestamp the definition was last modified.

public DateTime UpdatedAt { get; set; }

Property Value

DateTime

Version

Semantic version string (e.g. "1.0", "2.3.1").

public string Version { get; set; }

Property Value

string

Workflows

Named workflows this agent can trigger (references AgentWorkflowDefinition.Name).

public IList<string> Workflows { get; init; }

Property Value

IList<string>