> For the complete documentation index, see [llms.txt](https://docs.scaleconnect.com.au/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.scaleconnect.com.au/api/rest-api/scaleai-rest-api/message-suggestions.md).

# Message Suggestions

## Ai Suggestions Stream

> Streaming endpoint for AI chat message suggestions.\
> \
> Generates contextual follow-up questions and exploration paths\
> for users chatting with the portfolio analysis AI.\
> \
> Chunk Types:\
> \- text: Suggestion text being generated\
> \- done: Complete with structured suggestions array\
> \- error: Error occurred during generation

```json
{"openapi":"3.1.0","info":{"title":"ScaleAI r16 API","version":"2.0.0"},"servers":[{"url":"https://agent-backend.r16.app"}],"security":[{"HTTPBearer":[]}],"components":{"securitySchemes":{"HTTPBearer":{"type":"http","scheme":"bearer"}},"schemas":{"MessageSuggestionRequest":{"properties":{"current_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Current Message"},"conversation_history":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Conversation History","default":[]},"number_of_suggestions":{"type":"integer","title":"Number Of Suggestions","default":3},"model":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Model","default":"claude-haiku-4-5-20251001"},"jwt_token":{"type":"string","minLength":1,"description":"Downstream user JWT, separate from the service bearer token."},"strategy_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Strategy Id"},"user_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Id"},"environment":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Environment","default":"dev"}},"type":"object","title":"MessageSuggestionRequest","description":"Request model for message suggestions.","required":["jwt_token"]},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}},"paths":{"/suggestions/ai/stream":{"post":{"tags":["Message Suggestions"],"summary":"Ai Suggestions Stream","description":"Streaming endpoint for AI chat message suggestions.\n\nGenerates contextual follow-up questions and exploration paths\nfor users chatting with the portfolio analysis AI.\n\nChunk Types:\n- text: Suggestion text being generated\n- done: Complete with structured suggestions array\n- error: Error occurred during generation","operationId":"ai_suggestions_stream_suggestions_ai_stream_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessageSuggestionRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"text/event-stream":{"schema":{"type":"string","description":"SSE chunk. See the operation description for chunk types."}}}},"401":{"description":"Missing or invalid service bearer token, or missing downstream jwt_token in the request body.","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}},"required":["detail"]}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"500":{"description":"Handler failed","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}},"required":["detail"]}}}},"503":{"description":"AI features temporarily disabled","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}},"required":["detail"]}}}}}}}}}
```

## Ai Suggestions

> Non-streaming endpoint for AI chat message suggestions.\
> \
> Returns structured array of suggestion strings for users\
> chatting with the portfolio analysis AI.

```json
{"openapi":"3.1.0","info":{"title":"ScaleAI r16 API","version":"2.0.0"},"servers":[{"url":"https://agent-backend.r16.app"}],"security":[{"HTTPBearer":[]}],"components":{"securitySchemes":{"HTTPBearer":{"type":"http","scheme":"bearer"}},"schemas":{"MessageSuggestionRequest":{"properties":{"current_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Current Message"},"conversation_history":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Conversation History","default":[]},"number_of_suggestions":{"type":"integer","title":"Number Of Suggestions","default":3},"model":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Model","default":"claude-haiku-4-5-20251001"},"jwt_token":{"type":"string","minLength":1,"description":"Downstream user JWT, separate from the service bearer token."},"strategy_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Strategy Id"},"user_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Id"},"environment":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Environment","default":"dev"}},"type":"object","title":"MessageSuggestionRequest","description":"Request model for message suggestions.","required":["jwt_token"]},"MessageSuggestionResponse":{"properties":{"suggestions":{"items":{"type":"string"},"type":"array","title":"Suggestions"},"raw_response":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Raw Response"},"usage":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Usage"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},"type":"object","required":["suggestions"],"title":"MessageSuggestionResponse","description":"Response model for non-streaming suggestions."},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}},"paths":{"/suggestions/ai":{"post":{"tags":["Message Suggestions"],"summary":"Ai Suggestions","description":"Non-streaming endpoint for AI chat message suggestions.\n\nReturns structured array of suggestion strings for users\nchatting with the portfolio analysis AI.","operationId":"ai_suggestions_suggestions_ai_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessageSuggestionRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessageSuggestionResponse"}}}},"401":{"description":"Missing or invalid service bearer token, or missing downstream jwt_token in the request body.","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}},"required":["detail"]}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"500":{"description":"Handler failed","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}},"required":["detail"]}}}},"503":{"description":"AI features temporarily disabled","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}},"required":["detail"]}}}}}}}}}
```

## Broker Suggestions Stream

> Streaming endpoint for broker-client chat message suggestions.\
> \
> Generates professional response suggestions for brokers\
> communicating with their property investment clients.\
> \
> Chunk Types:\
> \- text: Suggestion text being generated\
> \- done: Complete with structured suggestions array\
> \- error: Error occurred during generation

```json
{"openapi":"3.1.0","info":{"title":"ScaleAI r16 API","version":"2.0.0"},"servers":[{"url":"https://agent-backend.r16.app"}],"security":[{"HTTPBearer":[]}],"components":{"securitySchemes":{"HTTPBearer":{"type":"http","scheme":"bearer"}},"schemas":{"MessageSuggestionRequest":{"properties":{"current_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Current Message"},"conversation_history":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Conversation History","default":[]},"number_of_suggestions":{"type":"integer","title":"Number Of Suggestions","default":3},"model":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Model","default":"claude-haiku-4-5-20251001"},"jwt_token":{"type":"string","minLength":1,"description":"Downstream user JWT, separate from the service bearer token."},"strategy_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Strategy Id"},"user_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Id"},"environment":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Environment","default":"dev"}},"type":"object","title":"MessageSuggestionRequest","description":"Request model for message suggestions.","required":["jwt_token"]},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}},"paths":{"/suggestions/broker/stream":{"post":{"tags":["Message Suggestions"],"summary":"Broker Suggestions Stream","description":"Streaming endpoint for broker-client chat message suggestions.\n\nGenerates professional response suggestions for brokers\ncommunicating with their property investment clients.\n\nChunk Types:\n- text: Suggestion text being generated\n- done: Complete with structured suggestions array\n- error: Error occurred during generation","operationId":"broker_suggestions_stream_suggestions_broker_stream_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessageSuggestionRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"text/event-stream":{"schema":{"type":"string","description":"SSE chunk. See the operation description for chunk types."}}}},"401":{"description":"Missing or invalid service bearer token, or missing downstream jwt_token in the request body.","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}},"required":["detail"]}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"500":{"description":"Handler failed","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}},"required":["detail"]}}}},"503":{"description":"AI features temporarily disabled","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}},"required":["detail"]}}}}}}}}}
```

## Broker Suggestions

> Non-streaming endpoint for broker-client chat message suggestions.\
> \
> Returns structured array of professional response suggestions\
> for brokers communicating with clients.

```json
{"openapi":"3.1.0","info":{"title":"ScaleAI r16 API","version":"2.0.0"},"servers":[{"url":"https://agent-backend.r16.app"}],"security":[{"HTTPBearer":[]}],"components":{"securitySchemes":{"HTTPBearer":{"type":"http","scheme":"bearer"}},"schemas":{"MessageSuggestionRequest":{"properties":{"current_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Current Message"},"conversation_history":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Conversation History","default":[]},"number_of_suggestions":{"type":"integer","title":"Number Of Suggestions","default":3},"model":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Model","default":"claude-haiku-4-5-20251001"},"jwt_token":{"type":"string","minLength":1,"description":"Downstream user JWT, separate from the service bearer token."},"strategy_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Strategy Id"},"user_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Id"},"environment":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Environment","default":"dev"}},"type":"object","title":"MessageSuggestionRequest","description":"Request model for message suggestions.","required":["jwt_token"]},"MessageSuggestionResponse":{"properties":{"suggestions":{"items":{"type":"string"},"type":"array","title":"Suggestions"},"raw_response":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Raw Response"},"usage":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Usage"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},"type":"object","required":["suggestions"],"title":"MessageSuggestionResponse","description":"Response model for non-streaming suggestions."},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}},"paths":{"/suggestions/broker":{"post":{"tags":["Message Suggestions"],"summary":"Broker Suggestions","description":"Non-streaming endpoint for broker-client chat message suggestions.\n\nReturns structured array of professional response suggestions\nfor brokers communicating with clients.","operationId":"broker_suggestions_suggestions_broker_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessageSuggestionRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessageSuggestionResponse"}}}},"401":{"description":"Missing or invalid service bearer token, or missing downstream jwt_token in the request body.","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}},"required":["detail"]}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"500":{"description":"Handler failed","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}},"required":["detail"]}}}},"503":{"description":"AI features temporarily disabled","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}},"required":["detail"]}}}}}}}}}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.scaleconnect.com.au/api/rest-api/scaleai-rest-api/message-suggestions.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
