API Reference
CRM APIs
Orfeo

Orfeo API Reference

Overview

The Orfeo API provides endpoints for handling support questions and audio transcription processing in the TKM AI Agency Platform. It manages Q&A interactions and audio-based support requests.

Endpoints

Process Question

POST /support

Processes a support question and returns an answer.

Request Body

{
    "prompt": "string",
    "user_id": "string",
    "organization_id": "string",
    "conversation_id": "string",
    "session_id": "string"
}

Response

{
    "success": true,
    "message": "string",
    "response": "string",
    "metadata": {
        "processed_at": "string",
        "source_agent": "string"
    }
}

Transcribe and Process Audio

POST /support/transcribe

Transcribes an audio file using Rufa agent and processes the transcribed text with Orfeo.

Request Body

Multipart form data with the following fields:

  • file: Audio file (required)
  • user_id: string (required)
  • conversation_id: string (required)
  • organization_id: string (optional, defaults to "tkm_123456")

Response

{
    "success": true,
    "text": "string",
    "file_path": "string",
    "duration": "number",
    "qa_response": {
        "success": true,
        "message": "string",
        "response": "string",
        "metadata": {
            "processed_at": "string",
            "source_agent": "string"
        }
    }
}

Error Responses

400 Bad Request

{
    "detail": "Invalid conversation ID: {conversation_id}"
}

500 Internal Server Error

{
    "detail": "Orfeo agent not configured" | "Error message"
}

Integration Notes

Support Features

  • Question processing with context awareness
  • Audio transcription integration with Rufa
  • Answer generation
  • Context preservation
  • Conversation verification with Atta

Event System

  • Transcription events
  • Event-based processing
  • Asynchronous handling
  • Result coordination

Audio Processing

  • Audio file handling with temporary storage
  • Transcription through Rufa agent
  • Text extraction and processing
  • Multi-format support
  • Automatic cleanup of temporary files

Integration with Other Agents

  • Rufa: Audio transcription processing
  • Humile: Response normalization
  • Atta: Conversation verification and context management