M09

AI Models, Prompts, Agents, Avatars

LLM operations with governance, prompt versioning, and agent orchestration.

Centralized AI operations layer for model/platform setup, utilization control, dynamic prompts, call-history outcomes, agent lifecycle management, and AI execution diagnostics.

AIPromptStudio.jsxtsx
import { useState } from 'react';
import { AiWidget, AiInput, AiTextarea, CardIcon } from '@cleen/cleen-components';
import { useAgentChain, usePrompts } from '@/hooks/useAi';

export function AIPromptStudio({ agentChainId }) {
  const { chain, steps, runStep } = useAgentChain(agentChainId);
  const { prompts } = usePrompts();
  const [input, setInput] = useState('');

  return (
    <div className="ai-studio">
      <h1>{chain?.name}</h1>
      <div className="ai-prompt-grid">
        {prompts.map((p) => (
          <CardIcon key={p.id} icon={p.icon} title={p.name} description={p.summary} />
        ))}
      </div>
      <AiWidget chain={chain} steps={steps} />
      <AiTextarea
        value={input}
        onChange={setInput}
        onSubmit={() => runStep({ stepId: chain.firstStepId, payload: input })}
      />
    </div>
  );
}

Capabilities

  • AI model type and platform configuration
  • Utilization percentage assignment by use type
  • Prompt save/filter/delete/history/version restore
  • Dynamic prompt runtime execution
  • AI agent filter/save/detail/delete

Benefits

  • Controls AI spend and quality
  • Supports safe experimentation
  • Enables targeted automation

Flow of work

  1. 01Configure models and platform
  2. 02Allocate utilization by use case
  3. 03Author and version prompts
  4. 04Execute and monitor outcomes
  5. 05Tune and redeploy agents/prompts

Subfeatures

  • Model type filter/save
  • Platform filter/save
  • Utilization save/assignment
  • Prompt CRUD
  • Prompt history outcomes
  • Prompt version restore
  • Dynamic prompt run
  • Agent CRUD
Source surfaces (technical reference)

Internal code areas in the licensed Full-Stack codebase that back this module.

  • ApiAI model/platform/utilization endpoints
  • ApiAI prompt and version endpoints
  • ApiAI agent endpoints
In the stack

Where it lives. What it exposes.

A quick visual of how AI Models, Prompts, Agents, Avatars participates across the CleenUI stack, alongside the named operations it adds to the API surface.

M09 · architecture
Frontend
React · TailwindCSS · 60+ components
Prompt editorModel configAgent panelAvatar galleryUtilization dashboard
API
C# Web API · production-ready · role-aware
Model CRUDPlatform configUtilization rulesPrompt runAgent CRUD
Database
AzureSQL · 300+ tables · 700+ procedures
AIModelsPromptsPromptVersionsAgentsAvatars
Async Services and Batch Jobs
WebJobs & Functions · queue-backed
Prompt executorModel routerAvatar sync
All four layers ship together as the Full-Stack license. M09 blocks are highlighted.
API operations

Named operations on this surface

8
Try these in Postman
  • POSTModel type filter/save/ai/model-type-filter-save
  • POSTPlatform filter/save/ai/platform-filter-save
  • POSTUtilization save/assignment/ai/utilization-save-assignment
  • POSTPrompt CRUD/ai/prompt-crud
  • POSTPrompt history outcomes/ai/prompt-history-outcomes
  • POSTPrompt version restore/ai/prompt-version-restore
  • POSTDynamic prompt run/ai/dynamic-prompt-run
  • POSTAgent CRUD/ai/agent-crud

Each operation maps to an endpoint in the licensed C# Web API surface.