For the complete documentation index, see llms.txt. This page is also available as Markdown.

RAG action

Reference for the retrieve_rag_content workflow action

retrieve_rag_content action

retrieve_rag_content retrieves CMS Content through the helper selected in global_settings.default_rag_helper. It can run as a normal workflow task or as a tool mounted on an AI Agent.

Input

Field
Type
Required
Description

query

string

Yes

Non-empty natural-language or keyword query sent to the selected helper.

Settings

Field
Type
Default
Description

limit

positive integer

3 when omitted

Maximum number of content hits to return. The value is passed to the helper.

content_type_id

string

None

Restricts retrieval to one Content Type. The action validates that the Content Type exists.

include_inactive

boolean

false

Allows inactive content to be returned when the helper has indexed it.

Output

Field
Type
Description

hits

RagHit[]

Ranked structured results returned by the helper.

text

string

The text value from each hit, joined with a blank line between hits. Convenient for an LLM prompt.

warning

string or undefined

Explains a helper configuration or availability problem. In this case, hits is empty and text is empty.

RagHit

Field
Type
Description

contentId

string

ID of the matching Content entry.

title

string

Content title.

text

string

Matching canonical text or chunk text returned by the helper.

score

number or undefined

Optional helper-specific rank or similarity score.

contentTypeId

string or undefined

ID of the entry's Content Type.

source

string

Registered runtime name of the helper that produced the hit, such as fulltext-search, sqlite-vector, or pgvector.

Common integration patterns

Retrieve with a Content Type filter

Use a stable Content Type ID in the action settings or API request. Do not use the displayed label where an ID is required.

Retrieve first, generate second

Use text as model context and retain hits for traceability.

Let an agent retrieve

Define the action with kind: tools and mount the definition in the AI Agent's tools binding.

Build an external application

Call the search endpoint from a trusted backend, then supply the returned texts to the model under a separate, clearly delimited context section. Do not expose administrative reindexing endpoints to untrusted clients.

Last updated

Was this helpful?