v10

latestOpenAPI 3.0.0raw.githubusercontent.com2026-07-0582185581.9 KB
Agents

Regenerate agent conversation message

Regenerate the AI response for a specific message in an agent conversation and stream the new answer over Server-Sent Events.

Constraints:

  • Only the last message in the conversation can be regenerated.
  • The target message must be of type bot_response.

Request body:

All request-body fields are optional. When omitted, the server reuses the original model/context. The body supports:

  • filters
  • chatMode
  • modelKey
  • modelName
  • modelFriendlyName
  • timezone
  • currentTime
  • tools

Streaming behavior:

The response is delivered as text/event-stream. Stable events are connected, complete, and error. Additional agent/tool lifecycle events may be forwarded by the backend and should be treated as informational updates.

Validation failures on params/body are returned as normal HTTP 400 responses before the stream starts. Valid-shape requests that fail conversation lookup or regenerate rules are reported as SSE error events after stream initialization.

post/agents/{agentKey}/conversations/{conversationId}/message/{messageId}/regenerate

Path parameters

agentKeystring required

Stable key identifying the agent that owns this conversation.

conversationIdstring objectId required

ID of the agent conversation containing the target message.

messageIdstring objectId required

ID of the bot-response message to regenerate.

Request body

modelKeystring

Identifier of the AI model configuration to use for regeneration. Typically a UUID returned by the model-management endpoints. When omitted, the model used for the original message is reused.

modelNamestring

Provider model name (e.g. the underlying LLM identifier).

modelFriendlyNamestring

Friendly display name of the selected model.

chatModestring

Chat mode used for regeneration (for example internal_search, web_search, or an agent mode such as agent:auto).

timezonestring

IANA timezone identifier from the client. Used to provide time-aware context to the AI during regeneration.

currentTimestring date-time

ISO 8601 / RFC 3339 datetime from the client (UTC Z or numeric offset). Used to anchor any relative time references in the query.

toolsstring[]

Optional list of tool identifiers (fully-qualified action names such as jira.create_issue) the agent may invoke when regenerating. Applicable only in agent chat modes.

Example request

{
  "modelKey": "05438a37-68f2-4641-a8dc-6c47e63278ca",
  "modelName": "gpt-5.4-mini",
  "modelFriendlyName": "mini",
  "chatMode": "internal_search",
  "timezone": "Asia/Calcutta",
  "currentTime": "2026-05-11T15:43:21+05:30",
  "tools": [
    "jira.create_issue",
    "confluence.search_content"
  ]
}

Response

SSE stream established.

Stable event names:

  • connected — confirms the stream is open
  • complete — returns the updated conversation plus metadata
  • error — reports lookup failures, authorization failures on the conversation, or regenerate-rule failures after the stream has started

Additional backend-defined agent/tool events may be emitted. Clients should ignore unknown event names.