NLP Agent Creation
Overview
Section titled “Overview”Users describe what they want in plain English. The system extracts the intent, maps it to tools and a schedule, and presents a review screen before creating anything.
Creation Flow
Section titled “Creation Flow”sequenceDiagram
participant User
participant UI as AgentBuilder UI
participant BE as Backend :8080
participant AIS as AI Service :9300
participant LLM as Groq LLM
User->>UI: "Monitor payment errors\nand alert me daily"
UI->>AIS: POST /api/v1/agent-builder/parse\n{description: "..."}
AIS->>LLM: System prompt + user description
LLM-->>AIS: Structured JSON (name, tools, schedule, alert)
AIS-->>UI: Parsed agent config
UI->>User: Review screen\n(editable fields)
User->>UI: Adjust schedule → "Every 4 hours"\nClick Confirm
UI->>BE: POST /api/v1/agents\n{...finalConfig}
BE-->>UI: Agent created {id: 42}
UI-->>User: "Agent created!\nFirst run in 4 hours."
AgentBuilder Parse Endpoint
Section titled “AgentBuilder Parse Endpoint”POST /api/v1/agent-builder/parse accepts a free-text description and returns a draft agent config.
Example Request
Section titled “Example Request”{ "description": "Every morning, check if there were any payment timeout errors overnight and send me a summary"}Example Response
Section titled “Example Response”{ "name": "Overnight Payment Timeout Monitor", "description": "Checks for payment timeout errors from the previous night and summarizes findings", "systemPrompt": "You are a monitoring agent for the Logrite platform. Your job is to check for payment timeout errors that occurred overnight (between midnight and 8am). Search the payment_queries logs for timeout-related errors, count occurrences, identify the most affected payment methods or endpoints, and provide a concise summary with recommendations.", "toolsAllowed": ["semantic_search", "opensearch_query"], "schedule": "0 8 * * *", "scheduleLabel": "Every day at 8:00 AM", "alertCondition": null, "suggestedQuery": "Find payment timeout errors from last night (midnight to 8am)", "confidence": 0.92}LLM Extraction Prompt
Section titled “LLM Extraction Prompt”The AI Service uses a structured extraction prompt:
You are an agent configuration extractor for Logrite, a log analysis platform.
Given a user's description of what they want an AI agent to do, extract:1. name: Short, descriptive agent name (max 60 chars)2. description: One sentence explaining the agent's purpose3. systemPrompt: Full system prompt the agent will use when executing4. toolsAllowed: Array of tools from: ["semantic_search", "opensearch_query", "get_scan_results", "analyze_logs"]5. schedule: Cron expression (or "manual" if no schedule mentioned)6. scheduleLabel: Human-readable schedule description7. alertCondition: {metric, operator, threshold} or null8. suggestedQuery: The first query the agent should ask on each run9. confidence: Float 0.0-1.0 confidence in your extraction
Respond ONLY with valid JSON matching this schema.
Available indexes: payment_queries, external_service_calls, database_queries, exceptionsAvailable tools: semantic_search (neural log search), opensearch_query (aggregations/filters), get_scan_results (compliance scan data), analyze_logs (AI analysis)
User description: {userDescription}Review Screen
Section titled “Review Screen”The AgentBuilder UI presents the parsed config in an editable form before creation:
┌─────────────────────────────────────────────┐│ Review Your Agent ││ ││ Name: [Overnight Payment Timeout Monitor ] ││ ││ Schedule: [Every day at 8:00 AM ▼] ││ ││ Tools allowed: ││ ✅ semantic_search ││ ✅ opensearch_query ││ ☐ get_scan_results ││ ☐ analyze_logs ││ ││ System prompt: ││ [You are a monitoring agent... (editable)] ││ ││ Alert condition: None ││ ││ [Cancel] [Create Agent →] │└─────────────────────────────────────────────┘Confidence Handling
Section titled “Confidence Handling”| Confidence | UI Behavior |
|---|---|
| ≥ 0.85 | Parsed config shown with green indicator |
| 0.60–0.84 | Parsed config shown with yellow warning — “Please review carefully” |
| < 0.60 | Low confidence banner — “We couldn’t confidently parse this. Please fill in manually.” |
Edge Cases
Section titled “Edge Cases”Ambiguous Schedule
Section titled “Ambiguous Schedule”“Check periodically” → Defaults to hourly, user must confirm.
No Tools Matched
Section titled “No Tools Matched”“Alert me about problems” → Shows tool browser for manual selection.
Multiple Possible Interpretations
Section titled “Multiple Possible Interpretations”“Monitor errors” → Prompts: “Which service? payment, database, external calls, or all?”
Overly Broad Request
Section titled “Overly Broad Request”“Do everything” → Returns error: “Please describe a specific monitoring task.”