using Codex.Dal.Enums; namespace Codex.Dal.Entities; /// /// Represents an AI agent with its configuration and model settings. /// public class Agent { /// /// Unique identifier for the agent /// public Guid Id { get; set; } /// /// Display name of the agent /// public string Name { get; set; } = string.Empty; /// /// Description of the agent's purpose and capabilities /// public string Description { get; set; } = string.Empty; /// /// Type of agent (CodeGenerator, CodeReviewer, etc.) /// public AgentType Type { get; set; } /// /// Model provider name (e.g., "openai", "anthropic", "ollama") /// public string ModelProvider { get; set; } = string.Empty; /// /// Specific model name (e.g., "gpt-4o", "claude-3.5-sonnet", "codellama:7b") /// public string ModelName { get; set; } = string.Empty; /// /// Type of provider (CloudApi, LocalEndpoint, Custom) /// public ModelProviderType ProviderType { get; set; } /// /// Model endpoint URL (e.g., "http://localhost:11434" for Ollama). Nullable for cloud APIs. /// public string? ModelEndpoint { get; set; } /// /// Encrypted API key for cloud providers. Null for local endpoints. /// public string? ApiKeyEncrypted { get; set; } /// /// Temperature parameter for model generation (0.0 to 2.0) /// public double Temperature { get; set; } = 0.7; /// /// Maximum tokens to generate in response /// public int MaxTokens { get; set; } = 4000; /// /// System prompt defining agent behavior and instructions /// public string SystemPrompt { get; set; } = string.Empty; /// /// Whether conversation memory is enabled for this agent /// public bool EnableMemory { get; set; } = true; /// /// Number of recent user/assistant/tool messages to include in context (system messages always included) /// public int ConversationWindowSize { get; set; } = 10; /// /// Current status of the agent /// public AgentStatus Status { get; set; } = AgentStatus.Active; /// /// When the agent was created /// public DateTime CreatedAt { get; set; } = DateTime.UtcNow; /// /// When the agent was last updated /// public DateTime UpdatedAt { get; set; } = DateTime.UtcNow; /// /// Soft delete flag /// public bool IsDeleted { get; set; } = false; // Navigation properties /// /// Tools available to this agent /// public ICollection Tools { get; set; } = new List(); /// /// Execution history for this agent /// public ICollection Executions { get; set; } = new List(); }