Skip to content
Proud to collaborate with Microsoft for Startups

agents.agent-config.draft-from-description ​

Draft a complete agent config (name, system prompt, model, memory) from a human-typed job description. Wraps ai.chat.complete with an internal system prompt that never leaves the server.

Draft a complete agent config from a human-typed job description.

Wraps ai.chat.complete with an internal system prompt that never leaves the server. Produces a draft for human review — does NOT persist any rows. Phase 5a of the storage-workflows initiative; Phase 5b updates the staff app (ltinteg-app-staff/HireActorPage) to call this workflow instead of ai.chat.complete directly.

Overview ​

PropertyValue
Workflow typeAtomic
LibraryApp-agents
Version1.0

Triggers ​

SourceEndpoint / EventDescription
APIPOST /api/agents/configs/draftDraft an agent config from a human-typed job description

Input Schema ​

FieldTypeRequiredDefaultDescription
organization_uuidstringYes——
descriptionstringYes——

Output Schema ​

FieldTypeRequiredDefaultDescription
namestringNo——
descriptionstringNo——
system_promptstringNo——
model_namestringNo——
memory_enabledbooleanNo——
memory_strategystringNo——
memory_top_kintegerNo——
notesstringNo——
failure_reasonstringNo——
failed_atstringNo——
failed_at_statestringNo——
failed_stepstringNo——
failed_layerintegerNo——
errorstringNo——
error_typestringNo——
organization_uuidjsonNo——

States ​

StateInitialTerminalSuccessAuto-advanceDescription
pendingYesNo—execute—
completedNoYesYes——
failedNoYesNo——

State Diagram ​

Transitions ​

FromActionToDescription
pendingexecutecompleted—
* (any state)failfailed—

Outcomes ​

OutcomeTypeDescriptionState Data Keys
draftedSUCCESSAgent configuration draft generated from descriptionname, description, system_prompt, organization_uuid
failedFAILUREAgent configuration draft generated from description failedfailure_reason, error, error_type, failed_at_state, failed_step, failed_layer

Business Errors ​

CodeMessage Template
AGENTS_ORGANIZATION_CONTEXT_INVALIDAuthenticated organization context is missing or does not match the workflow input
AGENTS_CONFIG_NOT_FOUNDAgent configuration {agent_config_uuid} was not found in the organization
AGENTS_SKILL_NOT_FOUNDAgent skill {skill_uuid} was not found in the organization
AGENTS_MCP_SERVER_NOT_FOUNDMCP server {mcp_server_uuid} was not found in the organization
AGENTS_RUNNER_GROUP_NOT_FOUNDRunner group {runner_group_uuid} was not found in the organization
AGENTS_VALIDATION_FAILEDWorkflow input or domain state failed validation:
AGENTS_CONFLICTConflicting agent domain state:

API Usage ​

bash
POST /api/workflows/start
Content-Type: application/json

{
  "workflow_type": "agents.agent-config.draft-from-description",
  "initial_data": {
    "organization_uuid": "value",
    "description": "value"
  }
}