RivenGet started

Search docs

Find a page across the Riven documentation

Riven Cortex

Live

23 MCP tools that let a model do things instead of only describing them — search, files, code, data, and platform actions behind one protocol.

Cortex is the tool layer. It exposes 23 MCP tools over the Model Context Protocol, so a model reasoning inside Chat, Computer, or your own API call can take an action and read the result back into its context.

Tool families#

FamilyWhat it covers
Search & retrievalWeb search via Riven Web Index, grounded lookup via Riven Grounding, document retrieval
FilesRead, write, list, and diff files inside a workspace sandbox
CodeRun a command, run a test, inspect a repository — the substrate Riven Forge builds on
DataScoped queries against Riven ERP and Commerce
CommunicationDraft mail through Riven Mail, post to Comms channels
PlatformQuota lookup, model listing, and scheduling work through Riven Exec

The 23 tools are versioned as a set. A model session declares which families it may use, and Cortex refuses calls outside that declaration rather than failing open.

Permission model#

  • Every tool call inherits the calling identity from Riven Auth — a tool cannot read data the user could not read directly.
  • Write-capable tools are gated separately from read-only ones; a read-only session cannot mutate state by choosing a different tool.
  • Credentials for outbound integrations are resolved from Riven Keymaster at call time and never enter the model context.
  • Every invocation — arguments, duration, and outcome — is traced in Riven Telemetry.

Tool results re-enter the model context as untrusted input. Cortex marks tool output as such so downstream reasoning does not treat a retrieved document as an instruction.

Calling tools from the API#

Tools are requested with the standard OpenAI tools parameter. Cortex-hosted tools are addressed by name and executed server-side, so your client does not implement the tool loop itself.

json
{
  "model": "riven-best",
  "messages": [{"role": "user", "content": "What changed in the router last week?"}],
  "tools": [{"type": "cortex", "name": "web_search"}]
}