Research Agent

Send a message to a Research Agent session

Changed on

Insert a follow-up message and start another asynchronous turn. Use messages to refine a result, answer the agent, redirect the research, or request another artifact.

The response includes a messageId. The corresponding user_message event carries the same value, allowing the client to confirm delivery.

Attach previously uploaded files by including their file_ids in the attachments array (see the Upload endpoint). A session can hold at most 100 distinct files totaling 10GB across all turns; files already attached to this session can be referenced again without consuming another slot.

If the session is paused for insufficient quota, resolve the usage limit and resume it via POST /api/v2/sessions/:sessionId/resume (or the Elicit web interface) before sending another message.

Example

curl -X POST https://elicit.com/api/v2/sessions/agents/{sessionId}/messages \
  -H "Authorization: Bearer elk_live_your_key_here" \
  -H "Content-Type: application/json" \
  -d '{"message":"Focus on randomized controlled trials only."}'
post/sessions/agents/{sessionId}/messages

Request

  • Base URL
    https://elicit.com/api/v2
  • URL
    https://elicit.com/api/v2/sessions/agents/{sessionId}/messages
  • Auth
    HTTP bearer

Path parameters

sessionIdstring uuid required

Request body

messagestring required

The message to insert into the running research agent session.

Example request

{
  "message": "Focus on randomized controlled trials only.",
  "attachments": [
    {
      "file_id": "a1b2c3d4-e5f6-4a7b-8c9d-0e1f2a3b4c5d"
    }
  ]
}

Response

Message accepted. The session is processing another turn.

sessionIdstring required

Unique identifier for the research agent session.

status'processing' required

The session is processing the inserted message.

messageIdstring required

Identifier of the inserted message. Correlate it with the messageId on the matching user_message event.

urlstring required

URL to view the session in the Elicit web interface. Only the owner can continue it.

Changes

    • info

      the request property's maxLength was increased from 2000 to 20000

    • info

      added the optional property / to the response with the status

    • info

      added the optional property / to the response with the status

    • info

      added the optional property / to the response with the status

    • info

      added the optional property / to the response with the status

    • info

      added the optional property / to the response with the status

    • info

      added the optional property / to the response with the status

    • info

      added the optional property / to the response with the status

    • info

      added the optional property / to the response with the status

    • info

      the response property const value insufficient_quota was added for the status