AI Agent for Request Processing

We design and deploy artificial intelligence systems: from prototype to production-ready solutions. Our team combines expertise in machine learning, data engineering and MLOps to make AI work not in the lab, but in real business.
Showing 1 of 1 servicesAll 1566 services
AI Agent for Request Processing
Medium
from 1 week to 3 months
FAQ
AI Development Areas
AI Solution Development Stages
Latest works
  • image_website-b2b-advance_0.png
    B2B ADVANCE company website development
    1212
  • image_web-applications_feedme_466_0.webp
    Development of a web application for FEEDME
    1161
  • image_websites_belfingroup_462_0.webp
    Website development for BELFINGROUP
    852
  • image_ecommerce_furnoro_435_0.webp
    Development of an online store for the company FURNORO
    1041
  • image_logo-advance_0.png
    B2B Advance company logo design
    561
  • image_crm_enviok_479_0.webp
    Development of a web application for Enviok
    822

AI Agent Development for Request Processing

An AI agent for request processing automates initial handling of incoming requests: classification, validation, collection of missing data and routing to appropriate specialist or automatic execution. Applied in support services, procurement, HR, legal departments.

Request Processing Agent Components

from pydantic import BaseModel
from typing import Optional, Literal
from openai import OpenAI
import json

client = OpenAI()

class RequestClassification(BaseModel):
    category: Literal["billing", "technical", "account", "shipping", "legal", "other"]
    subcategory: str
    priority: Literal["low", "normal", "high", "critical"]
    requires_human: bool
    missing_fields: list[str]
    confidence: float  # 0-1

def classify_request(request_text: str) -> RequestClassification:
    """Classify request using Structured Outputs"""
    response = client.beta.chat.completions.parse(
        model="gpt-4o",
        messages=[
            {"role": "system", "content": "Classify incoming request."},
            {"role": "user", "content": request_text},
        ],
        response_format=RequestClassification,
        temperature=0,
    )
    return response.choices[0].message.parsed

def collect_missing_info(request_text: str, missing_fields: list[str]) -> str:
    """Form clarifying question to collect missing data"""
    response = client.chat.completions.create(
        model="gpt-4o-mini",
        messages=[{
            "role": "system",
            "content": "Form a polite question to clarify request information."
        }, {
            "role": "user",
            "content": f"Request: {request_text}\nMissing fields: {missing_fields}"
        }],
    )
    return response.choices[0].message.content

Conversational Agent for Data Collection

class RequestProcessor:
    """Conversational agent for complete request data collection"""

    TEMPLATES = {
        "billing": ["invoice_number", "amount", "payment_date"],
        "technical": ["product_name", "version", "error_description", "steps_to_reproduce"],
        "account": ["user_email", "account_id", "issue_description"],
    }

    def __init__(self):
        self.conversations: dict[str, list] = {}
        self.collected_data: dict[str, dict] = {}

    def process_message(self, session_id: str, message: str) -> str:
        if session_id not in self.conversations:
            self.conversations[session_id] = []
            self.collected_data[session_id] = {}

        self.conversations[session_id].append({"role": "user", "content": message})

        # Update collected data
        self._extract_and_update(session_id, message)

        # Check completeness
        required = self._get_required_fields(session_id)
        missing = [f for f in required if f not in self.collected_data[session_id]]

        if not missing:
            return self._finalize_request(session_id)

        # Ask for next field
        return self._ask_for_field(session_id, missing[0])

    def _ask_for_field(self, session_id: str, field: str) -> str:
        field_questions = {
            "invoice_number": "Please provide invoice number",
            "amount": "What amount is specified in the invoice?",
            "error_description": "Describe the error in more detail",
        }
        return field_questions.get(field, f"Please clarify: {field}")

    def _finalize_request(self, session_id: str) -> str:
        data = self.collected_data[session_id]
        ticket_id = create_ticket(data)
        return f"Request created: #{ticket_id}. We will contact you within 24 hours."

Practical Case: IT Support Request Processing Agent

Task: initial processing of IT requests in 800-employee company.

Categories: system access (34%), equipment (22%), software (18%), network (14%), other (12%).

Agent handles:

  1. Classify request and priority (SLA depends on priority)
  2. Request missing information (OS version, error screenshot)
  3. Try automatic resolution from knowledge base (RAG on runbooks)
  4. If unsuccessful — create ticket with full data and assign executor

Metrics:

  • Auto-resolution L1 (answer without engineer): 41%
  • Time to first response: 4h → instant
  • Classification correctness: 93%
  • Created ticket data completeness: 78% → 96%

Timeline

  • Agent classification + routing: 2–3 weeks
  • Ticket system integration (Jira/Zendesk): 1–2 weeks
  • Knowledge base (RAG): 2–3 weeks
  • Testing and tuning: 1–2 weeks
  • Total: 6–10 weeks