Loading page...Загружаем страницу...正在加载页面...
AtlasRepo

Prompts as Contracts: How the SEO Master Agent Turns an LLM Into a Typed Function

Description and use

SEO Master Agent enforces strict JSON contracts for LLM outputs, enabling predictable, automated UI rendering across multiple SEO workflows.

Problem

Ensuring LLM outputs are predictable and machine‑processable for SEO workflows.

Outcome

The agent enforces typed JSON contracts, enabling automated UI rendering and robust error handling across multiple LLM providers.

Workflow

  • Define TASK_TYPES and REQUIRED_INPUTS
  • Validate inputs, return 422 on missing
  • Build system prompt that pins output shape
  • Send request to chosen LLM via LiteLLM
  • Receive structured JSON, store in ExecutionLog
  • Expose GET /api/tasks/{task_id} for result retrieval

Evidence

every task type forces the LLM to return only a raw JSON object with fixed keys. No markdown fences.

Source

POST /api/settings/keys stores keys in local SQLite as a self-host convenience — flagged as not-a-secrets-manager, env vars recommended for production.

Source

  • Record date: 2026-10-12T23:41:13.370Z