Skip to main content
The agent endpoint is the primary way to interact with the WeCareRemote AI assistant programmatically. Send a message and receive an AI-generated response, with optional conversation history for context. The agent supports both single-turn requests and multi-turn conversations using thread IDs. This endpoint backs the same AI assistant that refugees and NGO staff see in the WeCareRemote web UI — so any logic you build on top of it benefits from the same conversation memory, role-aware behaviour, and knowledge base integration as the rest of the platform.

Invoke agent

Send a message to the AI assistant and receive a response. Endpoint: POST / Base URL: http://your-instance:8080 Authentication: Bearer token required — see Authentication.

Request body

string
required
The user message to send to the AI assistant.
string
Optional conversation thread ID to maintain history across requests. If omitted, the agent starts a new conversation with no prior context.
string
Optional model override. If omitted, the assistant uses the platform default model configured by your administrator.

Response

string
The AI assistant’s response text.
string
The thread ID for this conversation. Pass this value in subsequent requests to continue the same conversation.
string
The name of the model that generated the response.

Full examples

Streaming responses

For real-time output as the model generates its response, use the streaming variant of the endpoint. The server sends tokens as they are produced rather than waiting for the full response.
The streaming endpoint path may vary. Contact your WeCareRemote administrator if the /stream path is not available on your instance.

Continuing a conversation

To maintain conversation history across multiple requests, pass the thread_id returned from a previous response back into the next request.

Error responses