This is the initial commit for the CODEX_ADK project, a full-stack AI agent management platform featuring: BACKEND (ASP.NET Core 8.0): - CQRS architecture with 6 commands and 7 queries - 16 API endpoints (all working and tested) - PostgreSQL database with 5 entities - AES-256 encryption for API keys - FluentValidation on all commands - Rate limiting and CORS configured - OpenAPI/Swagger documentation - Docker Compose setup (PostgreSQL + Ollama) FRONTEND (Flutter 3.x): - Dark theme with Svrnty branding - Collapsible sidebar navigation - CQRS API client with Result<T> error handling - Type-safe endpoints from OpenAPI schema - Multi-platform support (Web, iOS, Android, macOS, Linux, Windows) DOCUMENTATION: - Comprehensive API reference - Architecture documentation - Development guidelines for Claude Code - API integration guides - context-claude.md project overview Status: Backend ready (Grade A-), Frontend integration pending 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
111 lines
3.2 KiB
C#
111 lines
3.2 KiB
C#
using Codex.Dal.Enums;
|
|
|
|
namespace Codex.Dal.Entities;
|
|
|
|
/// <summary>
|
|
/// Represents an AI agent with its configuration and model settings.
|
|
/// </summary>
|
|
public class Agent
|
|
{
|
|
/// <summary>
|
|
/// Unique identifier for the agent
|
|
/// </summary>
|
|
public Guid Id { get; set; }
|
|
|
|
/// <summary>
|
|
/// Display name of the agent
|
|
/// </summary>
|
|
public string Name { get; set; } = string.Empty;
|
|
|
|
/// <summary>
|
|
/// Description of the agent's purpose and capabilities
|
|
/// </summary>
|
|
public string Description { get; set; } = string.Empty;
|
|
|
|
/// <summary>
|
|
/// Type of agent (CodeGenerator, CodeReviewer, etc.)
|
|
/// </summary>
|
|
public AgentType Type { get; set; }
|
|
|
|
/// <summary>
|
|
/// Model provider name (e.g., "openai", "anthropic", "ollama")
|
|
/// </summary>
|
|
public string ModelProvider { get; set; } = string.Empty;
|
|
|
|
/// <summary>
|
|
/// Specific model name (e.g., "gpt-4o", "claude-3.5-sonnet", "codellama:7b")
|
|
/// </summary>
|
|
public string ModelName { get; set; } = string.Empty;
|
|
|
|
/// <summary>
|
|
/// Type of provider (CloudApi, LocalEndpoint, Custom)
|
|
/// </summary>
|
|
public ModelProviderType ProviderType { get; set; }
|
|
|
|
/// <summary>
|
|
/// Model endpoint URL (e.g., "http://localhost:11434" for Ollama). Nullable for cloud APIs.
|
|
/// </summary>
|
|
public string? ModelEndpoint { get; set; }
|
|
|
|
/// <summary>
|
|
/// Encrypted API key for cloud providers. Null for local endpoints.
|
|
/// </summary>
|
|
public string? ApiKeyEncrypted { get; set; }
|
|
|
|
/// <summary>
|
|
/// Temperature parameter for model generation (0.0 to 2.0)
|
|
/// </summary>
|
|
public double Temperature { get; set; } = 0.7;
|
|
|
|
/// <summary>
|
|
/// Maximum tokens to generate in response
|
|
/// </summary>
|
|
public int MaxTokens { get; set; } = 4000;
|
|
|
|
/// <summary>
|
|
/// System prompt defining agent behavior and instructions
|
|
/// </summary>
|
|
public string SystemPrompt { get; set; } = string.Empty;
|
|
|
|
/// <summary>
|
|
/// Whether conversation memory is enabled for this agent
|
|
/// </summary>
|
|
public bool EnableMemory { get; set; } = true;
|
|
|
|
/// <summary>
|
|
/// Number of recent user/assistant/tool messages to include in context (system messages always included)
|
|
/// </summary>
|
|
public int ConversationWindowSize { get; set; } = 10;
|
|
|
|
/// <summary>
|
|
/// Current status of the agent
|
|
/// </summary>
|
|
public AgentStatus Status { get; set; } = AgentStatus.Active;
|
|
|
|
/// <summary>
|
|
/// When the agent was created
|
|
/// </summary>
|
|
public DateTime CreatedAt { get; set; } = DateTime.UtcNow;
|
|
|
|
/// <summary>
|
|
/// When the agent was last updated
|
|
/// </summary>
|
|
public DateTime UpdatedAt { get; set; } = DateTime.UtcNow;
|
|
|
|
/// <summary>
|
|
/// Soft delete flag
|
|
/// </summary>
|
|
public bool IsDeleted { get; set; } = false;
|
|
|
|
// Navigation properties
|
|
/// <summary>
|
|
/// Tools available to this agent
|
|
/// </summary>
|
|
public ICollection<AgentTool> Tools { get; set; } = new List<AgentTool>();
|
|
|
|
/// <summary>
|
|
/// Execution history for this agent
|
|
/// </summary>
|
|
public ICollection<AgentExecution> Executions { get; set; } = new List<AgentExecution>();
|
|
}
|