Skip to content

Multi Agent Conversation

POST
/api/agents/conversation/multi

Initiate a multi-agent conversation with sequential agent participation.

Orchestrates a conversation between multiple agents with sequential message passing, context preservation, and round-based coordination. Enables complex multi-agent collaboration and discussion workflows.

Request Body:

  • agents: List of agent IDs to participate in conversation
  • initial_message: Starting message to begin the conversation
  • context: Optional conversation context and metadata
  • max_rounds: Maximum number of conversation rounds

Returns:

  • status: Operation success indicator
  • conversation: List of agent responses with round numbers
  • participants: Confirmed list of participating agents
  • rounds: Total number of completed conversation rounds

Raises:

  • HTTPException 500: For unexpected errors during conversation

Conversation Flow:

  • Agents participate sequentially in specified order
  • Each agent receives previous agent’s context
  • Conversation limited by max_rounds parameter
  • Failed agent responses terminate conversation

Example Request:

{
    "agents": ["creative_agent", "lorekeeper", "editor_agent"],
    "initial_message": "Let's create a new character backstory",
    "context": {"genre": "fantasy", "setting": "medieval"},
    "max_rounds": 5
}

Example Response:

{
    "status": "success",
    "conversation": [
        {
            "agent": "creative_agent",
            "response": true,
            "round": 1
        },
        {
            "agent": "lorekeeper",
            "response": true,
            "round": 2
        },
        {
            "agent": "editor_agent",
            "response": true,
            "round": 3
        }
    ],
    "participants": ["creative_agent", "lorekeeper", "editor_agent"],
    "rounds": 3
}
MultiAgentConversationRequest

Multi-agent conversation initiation request model.

Request to start a collaborative conversation between multiple divine agents. Used for complex tasks requiring multiple specialized agents working together, such as code generation with review, or comprehensive system analysis.

Fields: agents: List of agent IDs participating in conversation (e.g., [“HAWKEN”, “LAGAN”]) initial_message: Message that starts the conversation context: Optional conversation context and parameters max_rounds: Maximum conversation rounds before termination (default: 5) started_at: Timestamp when conversation was initiated

Used By: - POST /api/agents/multi-agent-conversation endpoint - Multi-agent workflow orchestration - Collaborative task execution - LangGraph multi-agent graph workflows - Agent studio conversation management

Example: Request to have HAWKEN draft content and LAGAN validate the changes through iterative collaboration.

object
agents
required
Agents
Array<string>
initialMessage
required
Initialmessage
string
context
Any of:
object
key
additional properties
Any of:
string
maxRounds
Maxrounds
integer
default: 5
startedAt
Startedat

Conversation start timestamp

string format: date-time

Successful Response

MultiAgentConversationResponse

Multi-agent conversation orchestration response model.

Returns comprehensive conversation history with sequential agent participation, confirmed participants list, and total conversation rounds completed for multi-agent collaboration workflows.

Fields: status: Operation status indicator conversation: Conversation history with agent responses participants: List of participating agent identifiers rounds: Total number of completed conversation rounds

Used By: - POST /api/agents/management/conversation/multi endpoint - Multi-agent conversation orchestration - Sequential agent collaboration

object
status
required
Status

Operation status: ‘success’ or error state

string
conversation
required
Conversation

Conversation history with agent responses and round numbers

Array<object>
MultiAgentConversationTurn

Single agent response within a MultiAgentConversationResponse.

Fields:

  • agent: identifier of the agent that produced this turn.
  • response: text payload of the agent’s reply.
  • success: whether the hub accepted and delivered the message.
  • round: 1-indexed position within the conversation.
object
agent
required
Agent

Agent identifier

string
response
required
Response

Agent reply text

string
success
required
Success

Whether delivery succeeded

boolean
round
required
Round

1-indexed conversation round

integer
>= 1
participants
required
Participants

List of participating agent identifiers

Array<string>
rounds
required
Rounds

Total number of completed conversation rounds

integer

Validation Error

HTTPValidationError
object
detail
Detail
Array<object>
ValidationError
object
loc
required
Location
Array
msg
required
Message
string
type
required
Error Type
string
input
Input
ctx
Context
object