MechaMental
Concepts

Cortex

Built-in chat interface with bundles, scratchpad, cognitive chain, and artifact preview.

Cortex is MechaMental's built-in chat interface for interacting with your AI applications. It connects to your app's endpoints through published bundles and provides a rich conversational experience with streaming responses, cognitive chain visibility, and an artifact scratchpad.

Bundles

A Cortex Bundle is a published configuration that packages an app's endpoint for end-user consumption. Bundles define which endpoint is available, how it appears in the Cortex interface, and who can access it.

When you open Cortex, the landing page displays an Apps browser with the heading "Choose an app to start a conversation." Each bundle appears as a card showing its name, description, icon, and tags. Click a card to open a chat session with that bundle's endpoint.

Bundle Properties

PropertyDescription
NameDisplay name shown in the bundle browser
DescriptionShort summary shown on the bundle card
Icon URLOptional custom icon for the card
EndpointThe app endpoint this bundle connects to
EnvironmentWhich environment the bundle runs against
TagsCategorization tags shown as badges on the card
Is PublishedWhether the bundle is visible in the browser
VisibilityAccess scope for the bundle

Visibility Scopes

ScopeDescription
workspaceOnly members of the workspace can access the bundle
orgAll members of the organization can access the bundle
publicAnyone with the link can access the bundle

Publishing Bundles

Workspace admins can publish Cortex bundles from the workspace settings. A bundle must be published and have a valid endpoint to appear in the Apps browser.

Chat Interface

The chat view provides a full conversational experience:

  • Thread management — create new threads, switch between existing ones, and view message history
  • Streaming responses — messages stream in real time with a "Typing" indicator
  • Input fields — endpoint schema fields are auto-generated from the endpoint's input definition, including text inputs, selects, toggles, and number fields
  • File attachments — attach files to messages when the endpoint supports it
  • Context menu — right-click messages to copy content or add artifacts to the scratchpad

Cognitive Chain

Steps configured with event_action: "secondary" emit cognitive chain events that are visible in the Cortex chat. These appear as a collapsible Cognitive Chain section on assistant messages, labeled with a brain icon and a count badge showing the number of events.

Expanding the cognitive chain reveals the AI's intermediate reasoning: which tools it called, what data it retrieved, and how it arrived at the response. Each event is rendered as markdown for readability.

Transparency

Showing the cognitive chain builds user trust. It is especially valuable for enterprise use cases where users need to understand how the AI reached its conclusions.

Scratchpad

The scratchpad is a collection panel for sources and artifacts. It opens as a dialog (keyboard shortcut: Cmd+Shift+K) with a search bar and a list of collected items. Each item shows its name, type badge (Source or Artifact), file type, and timestamp.

You can add items to the scratchpad from the asset views in Cortex, then reference them in conversations or download them. Use the trash icon to remove individual items, or the clear button to empty the entire scratchpad.

Artifact Preview

Cortex can render previews of various artifact types directly in the interface:

Artifacts generated during a conversation can be clicked to open a full preview panel. From the preview, you can download the artifact or add it to the scratchpad.

On this page