Cortex is a Windows-native local assistant for conversations, workspace-specific knowledge, durable memory, controlled file access, multi-expert review, governed data queries, and business workflow operations. This guide explains how to use the features exposed by the current Cortex WebUI and the supporting launch scripts.
For system architecture, configuration schemas, tool payloads, or development details, use the reference documentation instead.
- Install And Start Cortex
- Understand The WebUI
- Use Conversations And Models
- Use Workspaces
- Use Files And Workspace RAG
- Use Memory
- Use Skills
- Use The Expert Panel
- Inspect Sources And Source Health
- Run Governed SQL Queries
- Use The Workflow Operations Center
- Evaluate Deployments And Show ROI
- Explore The Context Graph
- Create Durable Expert Reviews
- Manage Plugins
- Use Scheduled And Unattended Actions
- Understand Safety Boundaries
- Troubleshoot Common Problems
- Windows PowerShell.
- Node.js 24 or later. The bundled Matbot runtime declares Node.js 24 as its minimum supported version.
npm;pnpmis also used by the Matbot monorepo. The launch script installspnpm@9when needed unless installation is skipped.- Docker Desktop with WSL2 for Mem0, Postgres/pgvector, Neo4j, and the normal workspace RAG storage path.
- Network access to any hosted model provider you configure.
- An OpenAI-compatible provider for real model turns. A local compatible endpoint can be used instead of a hosted provider.
Build the setup program from a source checkout with Inno Setup 6:
.\installer\Build-Installer.ps1Each commit pushed to main also triggers the GitHub Actions installer workflow.
It publishes a GitHub Release tagged build-<full commit SHA> with the setup
program and a SHA-256 manifest. A push containing several commits builds each
commit separately. Rerunning a completed workflow reuses its existing release.
Run installer\Output\Cortex-0.1.0-win-x64-Setup.exe on Windows 10/11 x64.
Setup checks for Docker Desktop and Node.js 24 or newer before copying Cortex.
If Docker Desktop is missing, Setup downloads Docker's pinned Windows installer,
verifies its published SHA-256, and runs its per-user installation. Docker
Desktop must be able to run Linux containers; Setup starts it and waits for its
engine if necessary. Complete any Docker first-run, WSL, license, or restart
prompts. Rerun Setup if Docker requires a Windows restart. Node.js 24 or newer
must already be installed. Setup asks for an OpenAI API key on the first
install, generates local service secrets, installs Node dependencies, builds
Cortex, starts its services, checks the WebUI, and creates a Cortex Start
menu shortcut. That shortcut starts Cortex when needed and opens
http://localhost:19778/ in the default browser. Initial downloads require
network access and can take several minutes.
Setup preserves existing matbot.yaml, workspace registry, workspace data,
provider secrets, and Docker volumes on upgrades. It starts with no authorized
host file roots. Add roots in the installed
local-agent\config\workspaces.json only after reviewing their permissions.
If first-run setup fails, read local-agent\logs\installer-setup.log under the
chosen install directory, address the error, and run Setup again.
From the repository root, run the setup command once:
.\scripts\setup-secrets.ps1 -OpenAiKey "<your-openai-key>"The command stores user-scoped environment variables and writes the local Mem0 environment file. Open a new PowerShell window afterward so it receives the new user environment variables.
Do not place real credentials in documentation, chat messages, committed
workspace files, or matbot.yaml.
.\scripts\run.ps1The launcher installs and builds components when required, starts the local services, checks their health, starts or restarts the WebUI, and normally opens:
http://localhost:19778
The first Docker-backed startup can take longer while the local Mem0 image and databases are prepared.
.\scripts\health-check.ps1
.\scripts\stop-local-agent.ps1For optional switches, Windows service installation, individual service commands, and development commands, see Commands.
The WebUI has three main areas:
- The left sidebar contains conversations, workspace files, memory, architecture features, plugins, skills, and the workspace selector.
- The center displays the current conversation or the selected full-page feature, such as workspace settings or Workflow Operations Center.
- The bottom composer contains the model selector, expert controls, prompt input, Send button, and Stop button.
Use the small A controls beside the Cortex title to decrease or increase text
size. On a narrow screen, use the menu button in the chat header to open the
sidebar.
If the WebUI displays a banner saying that sessions are not loaded, enable the sessions plugin before relying on conversations to survive a restart.
- Click
+ New conversationto create a separate conversation. - Select an existing item under
Conversationsto reopen it. - Hover over a conversation and use the rename control to change its title.
- Use the hide control to remove a conversation from the visible list. Hiding is not the same as deleting all underlying workspace data.
Each conversation belongs to the active Cortex workspace. Switching workspaces changes which conversations are available.
Choose a provider from the Model: selector above the composer. Provider names
come from the active workspace's matbot.yaml, so different workspaces can
offer different choices.
Changing the selected model affects later normal chat turns. Individual experts can have their own configured providers; the selected chat model is used as a fallback and can be used for expert synthesis.
Type in Ask Cortex... and select Send. Cortex streams the response and shows
tool activity when tools are used. Completed turns include elapsed-time and
token information when the provider supplies it.
While a turn is running, the Stop button replaces Send. Stopping a turn aborts the active request and drops anything queued behind it.
A Cortex workspace is an isolation boundary for a project, customer, or body of work. Each workspace has separate provider and plugin configuration, secrets, sessions, workspace files, memories, skills, stores, and RAG configuration.
- Select the workspace control at the bottom-left of the sidebar.
- Choose the destination workspace.
- Wait while Cortex changes the active registry entry and restarts the Matbot process.
Do not send a new message while the workspace status says that Cortex is still restarting.
- Open the workspace selector.
- Select
+ New workspace. - Enter a descriptive name.
- Select the new workspace to activate it.
New workspaces begin from the default workspace configuration and then diverge independently.
- Select
Rename workspaceto rename the currently selected workspace. - Use the delete button beside a workspace and confirm the warning to delete its local workspace files.
Workspace deletion is destructive. Review the workspace name in the
confirmation dialog before selecting Yes.
Select the gear beside the workspace control to open the workspace settings
page. Context name labels the active RAG context. Under Markdown folders,
enter one absolute directory per line, then select Save.
The page reports ingestion progress, the current file, and final status. Select
Close to return without saving additional changes.
For storage locations and configuration details, see Cortex Workspaces.
Cortex exposes two distinct file concepts:
- Workspace files are uploaded into the active Matbot workspace through the
Filessection. - Workspace RAG indexes
.mdfiles from absolute folders configured in the active workspace settings.
- Select the upload control beside
Files. - Choose one or more files.
- Confirm the selected files appear as attachment chips above the composer.
- To attach an existing workspace file, hover over it and select the paperclip.
- Enter the task and send the message. The attachment selection clears after the message is accepted.
- Select a file row to open it.
- Hover over a file and use the delete action to remove it.
These files remain scoped to the active workspace. They are not unrestricted
access to the host filesystem. An attachment tells Cortex to read the imported
workspace copy with workspace_action; it does not grant access to the file's
original host directory. If Workspace RAG returns a same-named external path,
the explicit attachment takes precedence for that turn.
- Open the workspace gear.
- Enter the folders containing the Markdown documentation.
- Save the settings. Saving rejects a configuration whose paths are all inaccessible; if at least one path exists, unavailable roots are skipped gracefully and reported through the ingestion status.
- Wait until the status shows an
active_*publication and no pending watcher or queued reconciliation. - Ask a question that depends on the indexed documentation.
Relevant snippets are injected automatically into later turns. Workspace RAG uses the V2 hybrid index only and automatically reconciles folder changes. It currently indexes Markdown files only; PDF, Office, email, and spreadsheet ingestion are roadmap work rather than current WebUI behavior.
Make the desired scope explicit. For example:
Using the indexed architecture documentation, explain how workflow approvals
are enforced. Cite the source file.
When no useful source is retrieved, verify the configured folder, file extension, ingestion status, and active workspace.
For host-file access policy and tool-level examples, see Plugins And Tools.
Memory stores stable facts that should remain useful beyond one conversation. Memories are isolated by workspace.
Use an explicit instruction:
Remember that I prefer PowerShell on Windows.
Memorize that this project's production region is West Europe.
Good memory candidates include stable preferences, decisions, project facts, domain terms, implementation notes, and confirmed troubleshooting outcomes. Do not store secrets, raw document contents, large logs, or temporary command output as memories.
Ask a direct question in the same workspace:
What shell do I prefer on Windows?
Recall and storage are separate operations. A fact may be stored correctly but not used if the later turn does not retrieve relevant context.
- Expand
Skillsin the sidebar. - Select
Open memory browserbelowInner voice. - Search remembered facts or filter by processing state.
- Select a memory to inspect its fact, session/message provenance, creation time, version, dream-skill assignment, and ignore-until value.
- Edit the fact and select
Save, or selectDeleteto remove it.
To create a memory manually, enter the fact in Add a remembered fact manually
and select Add memory. The browser uses version-aware updates so it can report
when a record changed before an edit or delete was applied.
| Layer | Use |
|---|---|
| Remembered facts | Explicit durable facts and preferences. |
| Skills | Reusable instructions and playbooks. |
| Workspace RAG | Grounding from configured Markdown folders. |
| Contextual search | Searches remembered facts, the knowledge index, and workspace RAG together. |
| Dream time | Slower consolidation that can merge facts into longer-lived skill knowledge. |
For the storage flow and administrative tool calls, see Memory And Retrieval.
Skills are reusable Markdown instructions or playbooks stored in the active workspace.
- Expand
Skillsin the sidebar. - Select a skill or use its edit action.
- Use
Contentto edit the Markdown instructions. - Use
Triggersto inspect or change automatic activation conditions. - Use
Metadatato inspect catalogue and derived knowledge information. - Select
Save.
Use the remove action only when the skill is no longer needed. Skill changes are workspace-specific and can affect later tool selection and retrieval.
If the Markdown editor is unavailable in an offline browser session, Cortex shows an error instead of saving through a partially loaded editor.
The Expert Panel sends one question to several independently configured domain experts and can synthesize their findings. It is useful for decisions with competing design, finance, engineering, legal, security, operational, or customer concerns.
- Select
Expertsabove the composer. - Enable
Use experts. - Leave
All expertsselected. - Choose
Parallel,Review, orDebate. - Leave
Synthesize decisionenabled if you want a combined recommendation. - Close the popup, enter the question in the normal composer, and send it.
The transcript records the chosen mode, selection, and synthesis setting so the turn can be understood after a reload.
- Enable the panel.
- Clear
All experts. - Select the individual experts.
- Choose the mode and synthesis setting.
- Send the question normally.
Cortex does not run the panel when no expert is selected.
| Mode | Best use |
|---|---|
| Parallel | Gather independent perspectives without forcing agreement. |
| Review | Critique a proposal, plan, workflow, or implementation. |
| Debate | Surface disagreements, tradeoffs, and conditions that would change a recommendation. |
When synthesis is enabled, the result includes consensus, disagreement, risks, assumptions, and a final recommendation. Each expert searches only its own configured knowledge roots, which keeps domain evidence separated.
For a detailed panel walkthrough and expert configuration, see the Expert Panel User Manual.
The source panels show the evidence records Cortex uses for retrieval and automation.
- Expand
Architecturein the sidebar. - Select
Sources. - Select a source from the list.
- Review its URI, kind, sensitivity, permission state, trust, health, freshness, connector, observation time, and last successful read.
- Inspect citation text, known limitations, health findings, and source events.
Use the health and freshness information before relying on a source for a
decision or approved workflow. Stale, degraded, unhealthy, or denied
states should be investigated rather than silently ignored.
Select Refresh to reload the source and health records for the active
workspace.
The SQL Preview panel plans and executes bounded read-only Postgres queries
from approved semantic identifiers.
- Open
Architectureand selectSQL Preview. - Enter the metric identifier.
- Optionally enter a dimension and filter column/value.
- Set a result limit.
- Select
Plan. - Review the generated
SELECTstatement, row-cap warning, source tables, and validation result. - Select
Approveto obtain approval for that exact planned run. - Select
Execute. - Inspect the rows and query-result citation.
Planning does not execute the query. Approval and execution are separate steps, and the approval token is tied to the planned query run. Cortex rejects writes, unknown columns, unsafe joins, missing limits, and execution without approval.
Do not approve a query when the metric, filters, source tables, or row cap do not match the intended business question.
Open Architecture and select Workflow Center. The Center is the control room
for governed business workflows. It uses persisted workflow compilations, typed
run records, approval gates, ordered run events, and shadow comparisons.
The top cards show:
- number of compiled workflows;
- number of workflow runs;
- pending approvals;
- shadow acceptance rate.
The Overview tab highlights failed runs, approvals that need attention,
recent runs, and shadow readiness. Select a recent run to open it in the Run
Ledger.
- Open the
Librarytab. - Enter a clear workflow name.
- Choose the risk level.
- Enter the purpose or selected transcript. Use placeholders such as
{{invoiceId}}for typed workflow inputs. - Enter comma-separated evidence source IDs when the workflow must use registered evidence.
- Enter an allowed tool name only when the workflow needs that tool.
- Choose whether to publish an immutable version.
- Choose whether to run the dry-run smoke test.
- Select
Compile workflow.
The compiler derives a definition, input schema, required evidence, allowed tools, risk, approval gates, smoke test, and success metrics. Review the resulting library entry before starting another run.
The current form accepts purpose/transcript text; selecting a range directly from an existing chat and editing a version diff are not implemented yet.
Use the library search field to filter by name, purpose, workflow ID, compilation ID, or status. Select an entry to see:
- compilation status and compiler version;
- published workflow and version;
- risk;
- purpose;
- evidence sources and allowed tools;
- approval gates and success metrics;
- validation errors and compiler warnings.
From a published entry you can start:
| Mode | Behavior |
|---|---|
| Dry run | Records validation, evidence, and proposed actions without executing write/admin tools. |
| Shadow | Records the recommendation for later comparison with a human decision; write/admin tools remain blocked. |
| Approval gated | Creates approval requests before protected actions can proceed. |
Open Run Ledger, then filter by workflow/run ID or status. Select a run to
inspect:
- workflow and immutable version;
- mode and status;
- effective principal;
- typed inputs;
- evidence source IDs and source versions;
- proposed actions;
- executed actions;
- approvals;
- ordered run events.
Proposed and executed actions are displayed separately. An approved proposal is not proof that an external action succeeded; check the executed action and later ledger events.
- Open
Approvals. - Select a pending gate.
- Review the reason, workflow run, evidence, proposed actions, and ledger.
- Select
ApproveorReject.
The controls are disabled while the decision request is in progress, preventing rapid duplicate submissions. High-risk workflows may contain separate action, stale-source, risk, cost, confidence, and expert-review gates.
- Open
Shadow Lab. - Select an unlabeled shadow run.
- Review the proposed recommendation and evidence.
- Select
Accept,Reject, orMark mixed.
The comparison is stored against the exact run, workflow version, source IDs, and recommendation hash. The overview acceptance rate updates after labeling. Use shadow mode to gather evidence about workflow quality before enabling approval-gated or unattended behavior.
The current Center does not provide arbitrary visual multi-step execution, background scheduling, or editable version diffs. The existing workflow runtime provides typed definitions, run ledgers, evidence, proposed actions, approvals, dry-run/shadow semantics, and policy enforcement; do not describe an unimplemented step executor as active.
Open Architecture and select Evaluation & ROI. This panel turns runtime
behavior into release evidence and sponsor-facing operating evidence.
The summary cards show trace volume, regression pass rate, verified workflow completion, and net benefit. Use the three detail areas as follows:
- In
Traces, select a run to inspect its agent, model, tool, retrieval, policy, evaluator, and workflow spans. The waterfall shows nesting, status, duration, tokens, and cost.Replay safelyreconstructs the stored timeline and never re-executes writes. - In
Regression suites, select a versioned suite, review its cases and gate, then selectRun suite. Required scorer failures or a pass rate below the suite threshold fail the deployment gate. - In
Sponsor evidence, review retrieval/citation coverage, action and policy outcomes, workflow approvals and escalations, verified time saved, operating cost, benefit, net benefit, ROI, and estimated payback outcomes.
Only outcomes marked verified_completed contribute to time-saved and benefit
calculations, and they must link to a workflow baseline and named verifier.
Model prices come from provider-reported cost or CORTEX_MODEL_PRICING_JSON.
Use the regression CLI in automation when a failed suite must block a release:
npm run eval:cortex -- <suite-id> --candidate <version> --junit <results.xml>The Context Graph connects source-backed entities and relationships for multi-hop retrieval.
- Open
Architectureand selectGraph. - Enter one or more comma-separated search terms.
- Optionally enter a source ID to constrain retrieval.
- Select
Retrieve. - Select an entity to inspect identifiers, aliases, sensitivity, relationships, evidence spans, confidence, and citations.
Graph relationships are derived assertions, not silent authoritative facts.
Use their source and confidence information when interpreting them. Select
Refresh to discard the current retrieval result and reload stored entities.
The Reviews architecture panel stores structured expert review artifacts that
can be connected to workflows, runs, alerts, investigations, or decisions.
- Open
Architectureand selectReviews. - Enter the review question.
- Choose the target type.
- Enter the target ID when one exists.
- For workflow reviews, enter the workflow ID and optional run ID.
- Enter comma-separated expert IDs.
- Select
Create Review.
Select a review card to inspect expert recommendations, confidence, evidence, risks, blockers, mitigations, approval checklist, consensus, disagreements, risk register, and synthesis.
The current WebUI can create and inspect review records. Manual reviewer assignment and status editing remain future product work.
Plugins determine which providers, tools, stores, hooks, and WebUI capabilities are available in the active workspace.
- Expand
Pluginsin the sidebar. - Expand an active plugin to inspect its description, runtime types, and tools.
- Hover over a compatible inactive local plugin and use its add control to activate it.
- Use the remove control on an active optional plugin to deactivate it.
- Restart Cortex when the plugin adds boot-time services, hooks, stores, providers, or frontend behavior.
Do not remove core plugins such as sessions, workspace, workflow governance, or the active frontend without understanding the resulting loss of behavior. Plugin configuration is workspace-specific.
For available plugins and direct tool examples, see Plugins And Tools.
Cortex contains a background plugin and scheduling primitives, but the default workspace does not expose a general scheduling screen in the WebUI.
For scheduled work:
- Enable the
backgroundplugin in the intended workspace. - Enable only the tools the scheduled task needs.
- Use a scheduled prompt as a thin trigger for typed workflow execution rather than embedding complex business logic in an unstructured prompt.
- Review run history, approvals, tool permissions, and failure handling before relying on unattended execution.
For operational and configuration details, see Scheduled And Unattended Actions.
- The WebUI is intended for localhost use. Do not expose it remotely until an authentication and TLS boundary is configured.
- Workspace files, memories, skills, and RAG settings are isolated by workspace.
- Host file access remains constrained by configured file-broker roots and policy.
- File-broker creates backups and diffs for overwrites and requires explicit approval for high-risk writes.
- Workspace RAG indexes Markdown only and stores data per workspace.
- Sources carry sensitivity, permission, freshness, health, and citation metadata.
- Governed SQL is read-only and requires approval before execution.
- Workflow dry-run and shadow modes do not execute write/admin tools.
- Expert knowledge roots are isolated by expert ID.
- Secrets and machine-local workspace state must not be committed.
When a tool requests approval, review the exact path, query, action, source, and workflow run—not only the natural-language explanation.
Providers come from the active workspace's matbot.yaml. Confirm the selected
workspace, restart Cortex, and hard-refresh the browser.
Expand Plugins and verify that the required plugin is active. Restart Cortex
after boot-sensitive plugin changes.
.\scripts\stop-local-agent.ps1
.\scripts\run.ps1Then hard-refresh the browser and confirm the port is 19778.
Open the memory browser and check whether the fact exists. If it exists, storage worked and the issue is retrieval or model behavior. If it does not, verify that skills, triggers, and cognition are loaded.
Confirm that paths are absolute, accessible, and contain .md files. Check the
workspace settings publication/job and watcher status, then inspect
local-agent\logs\matbot.err.log. An inaccessible configured root is reported
as a retryable discovery failure and the prior complete publication is retained.
Select Refresh. If the active workspace recently changed, wait for the Matbot
restart and reload the WebUI.
Postgres and Neo4j preserve first-run credentials in Docker volumes. If the data can be discarded, recreate the volumes and restart:
docker compose -f local-agent\docker\mem0\docker-compose.yml down -v
.\scripts\run.ps1This deletes the Docker-backed local memory databases. Do not run it when those volumes contain data you need to preserve.
For additional cases, see Troubleshooting.
| Document | Use it for |
|---|---|
| Architecture And Core Systems | Request flow, services, persistence, scheduling, workflows, graphs, and experts. |
| Configuration Reference | Providers, secrets, workspaces, RAG, file policy, and expert configuration. |
| Commands | Launcher, service, health, build, and test commands. |
| Plugins And Tools | Plugin inventory and direct tool/API payloads. |
| Memory And Retrieval | Memory storage, retrieval, consolidation, and policy. |
| Expert Panel User Manual | Detailed expert-panel usage and customization. |
| WebUI | Concise list of current WebUI capabilities. |
| Testing | Automated test layers and coverage. |
| Troubleshooting | Operational failure cases and recovery. |