# Cortex

> A self-hosted alternative to Dify and Flowise — design an AI agent's reasoning on a canvas, then watch it execute node by node.

Source page: https://saascode.ai/products/cortex
Machine-readable record: https://saascode.ai/products/cortex.md

One-time purchase · full source code · self-hosted by the buyer.

Price: $179 (one-time)

## How to read this document

Written for a model auditing this product on a buyer's behalf. Two labels
appear throughout and they mean different things:

- **measured** — produced by a script reading the product's own source tree
  or database at the stated date. The method is named beside each number.
- **stated** — written by the seller. True or not, it is a claim, and this
  document does not ask you to treat it as evidence.

The live demo is the strongest verification available from outside: it runs
the same source a buyer receives. Nothing to sign up for — the public side is
open, and the seeded credentials below get you into each role.

## What it is

Cortex is a visual canvas for designing how an AI agent thinks — not what it says next.

## Live demo

Two doors into the same running instance, and the same source a buyer
receives. There is no account to create; the public side is open, and the
seeded credentials below sign you into each role.

- **Guided (recommended):** https://saascode.ai/demo/cortex — our shell, with a role switcher and
  the credentials in the menu. Best for a person.
- **Direct:** https://cortex.saascode.ai — the product on its own, no chrome.
  Best when you are relaying steps to someone, or fetching a page.

2 roles seeded on the demo (of the 4 the schema defines — the build data below counts them all). Credentials are published deliberately: these
are demo accounts on a public demo instance, and a reviewer who cannot get
in cannot verify anything.

- **Workspace user** (`user`) — `user@demo.com` / `demo123`
  Builds and runs agents inside the workspace.
- **Platform admin** (`super_admin`) — `admin@demo.com` / `demo123`
  The backend: every organisation, plans and flags.

Or open a role directly: https://saascode.ai/demo/cortex?role={role}

## Measured build

*measured — each number names the method that produced it.*

- **roles: 4** — distinct roles accepted by the role CHECK constraint: admin, super_admin, user, viewer
- **tables: 53** — distinct CREATE TABLE statements across every applied migration
- **migrations: 50** — .sql files in supabase/migrations
- **page modules: 76** — files named page.tsx under src/app, excluding node_modules and .next
- **source lines: 113,964** — lines of code (comments and blank lines excluded) across 840 TypeScript files (104,847) and 66 SQL files (9,117); node_modules and .next excluded
- **api route files: 176** — files named route.ts under src/app/api
- **http operations: 233** — exported HTTP method handlers across those files, de-duplicated per file, OPTIONS excluded as CORS preflight
- **schema graph: 53 tables, 88 relationships** — parsed from the applied migrations

A large number here is scope, not quality. It says the product models a
real domain rather than a CRUD skeleton; it says nothing about code
quality, duplication, test coverage or maintainability, and should not be
read as if it did.

Release: v1.0.0 · built 2026-06-20

## Complete capability inventory

13 capabilities. Each summary is *stated* — selected from the
product's own buyer documentation, or written by the seller where marked.

### Designing & testing agents

- **Visual agent canvas (6-category nodes)** — Three panels: a node palette on the left, the canvas in the middle, and a configuration panel on the right for whatever is selected.
- **Agent CRUD (create/edit/duplicate/delete)** *(seller-authored)* — Agents are created, edited, duplicated and deleted as first-class objects. Duplication matters most: a working agent becomes the starting point for the next one, which is how a portfolio of a dozen gets built without starting over each time.
- **Agent versioning (draft/published/archived + rollback)** — Agents move draft → published → archived, with snapshot rollback to any earlier version.
- **Live-preview chat + node-execution trace** — A split panel: the canvas on one side, a chat on the other, running the agent server-side against the graph as currently designed.
- **Conversation history (thread + node_trace)** — Every conversation is logged per agent as a thread, and each message keeps its own execution trace.
- **Agent dashboard (CARD MOSAIC grid)** — Agents as a grid of cards showing status, recent activity, deployment state and quick actions — built for someone maintaining a dozen agents rather than admiring one.
- **Template gallery (cross-org official import)** *(seller-authored)* — Official templates import across organizations as editable starting points, so a new agent begins as a working graph rather than an empty canvas and a set of unanswered structural questions.

### Knowledge & deployment

- **Knowledge base (upload/chunk/embed/vector search)** — Documents upload, chunk, embed and become searchable by meaning. An agent draws on the knowledge bases it is wired to, and retrieval happens as part of its reasoning rather than as a separate search feature.
- **Deploy — embeddable widget** — A vanilla-JavaScript embed that renders inside a shadow root, so the host page's styles and the widget's cannot reach each other. No framework ships with it, and the bundle is kept under 30KB compressed.
- **Deploy — public share link /chat/[slug]** — A hosted chat page at its own address, for an agent that should be shareable without embedding — internal tools, a link in an email, a QR code at an event.
- **Conversation analytics** — What the agents actually did: volume, conversations and message-level detail. The basic view is on every tier; the fuller view and export arrive higher up.
- **Message metering + usage dashboard** — Messages are counted per workspace per month against the plan's allowance, with a warning at 80% and throttling at 100% — checked before the agent responds rather than reconciled afterwards.
- **MCP server (agent-as-tool)** *(seller-authored)* — Publishes an agent as a tool another AI system can call directly through a machine-readable bridge, so the agent becomes something the rest of the business's automation can use rather than only a chat window.

## What each system gives the operator

*stated.*

- **Designing & testing agents** — An agent's behaviour is something you can see and change, not code you re-read.
- **Knowledge & deployment** — The agent answers from your material, and you can see exactly why it answered that.

## The problems it was built to solve

*stated — the seller's argument, given in full so you can judge it.*

### What the agent does is a diagram, not a prompt somebody edited last month.

Agent logic written as prose in a text box becomes unmaintainable faster than anyone expects. Six months in, nobody remembers why a particular instruction is there, whether removing it breaks something, or which of the four paragraphs is doing the work. Changes get made by adding another sentence rather than by editing, because editing is too risky. The agent slowly becomes a thing the business depends on and nobody is willing to touch, and the person who wrote it has usually moved on.

### Every published version is still there, and rolling back takes one action.

The worst day with an agent is the day someone improves it. A change goes out, quality drops in a way nobody can quite characterise, and the previous behaviour exists only in whatever the last person happened to remember. Teams respond by freezing: the agent stops improving because improving it is how it broke last time. What that costs is not the bad version, it is every good version that was never tried afterwards.

### The agent draws on your documents, and the trace shows which ones.

A generic assistant is confidently wrong about the specific things a business cares about — its pricing, its policies, its edge cases. Bolt on retrieval and a second problem appears: when the answer is wrong nobody can tell whether the document was missing, the wrong passage was found, or the model ignored what it found. Debugging becomes guesswork, and the usual outcome is that people stop trusting the agent and go back to searching manually.

## What it takes to run it

*stated — external services the buyer supplies and pays for directly.*

- **Node host** (required) — Agent execution runs in Node runtime routes, which need database access. A single service — there is no separate execution worker to deploy.
- **Supabase** (required) — Postgres with row-level security and vector search for knowledge retrieval.
- **An AI provider key** (required) — Agent reasoning and the streaming preview run on it.
- **An embeddings provider** (required for knowledge) — Documents are embedded on upload. Agents without a knowledge base do not need it.
- **A payment provider** (required to charge) — Configured by the operator, not hardwired.

## FAQ

**What exactly do I receive after purchase?**

The complete source repository behind the live demo — 113,964 lines across the application and its database, 53 tables defined by 50 migrations that the shipped scripts apply for you, plus the seed data, the demo accounts and the setup documentation. Not a subset and not a scaffold: the same code that runs the demo you just used.

**Is the live demo the same product whose source I receive?**

Yes. The Cortex demo runs the delivered release (v1.0.0), and the build figures on this page are measured from that same source — not from a showcase build kept separately.

**Can I test every account role before buying?**

Yes — all 2 of them: Workspace user, Platform admin. Each one is seeded in the live demo and reachable from the role board above, so you can inspect the product from the customer's side, the agent's side and the administrator's side before you decide.

**Is this a complete product or a starter template?**

Complete. 76 page modules and 233 HTTP operations, with authentication, roles, billing, an administration panel, background jobs and seeded demo data all wired and running. A template gives you the shape of an application; this is one you can deploy and start operating.

**Can I rebrand and modify it?**

Yes, without asking. The name, identity, copy, styling and code are yours to change. Rebranding and operating it as your own service is exactly what the licence is for.

**What does the licence allow?**

A perpetual, worldwide, non-exclusive, non-transferable licence to the product you bought and to every update released for it. The Standard licence covers one business — yours. If you deploy for clients, the Client licence covers up to five. You can modify it, rebrand it, deploy it and charge your own customers.

**Can I resell the source code?**

No. Reselling, redistributing, sublicensing or giving away the source itself is not permitted under either licence. You build and deliver products with it — the code stays with you.

**What services and ongoing costs are required?**

You bring your own accounts, so we never mark anything up and there is no ongoing cost to us beyond the purchase. Required: Node host, Supabase, An AI provider key, An embeddings provider, A payment provider. Optional: none. The table above says exactly what stops working without each one; most have usable free tiers at low volume.

**How difficult is deployment?**

Two ways, and most buyers use the first. The installer in your saascode dashboard walks it: you create free accounts at Vercel and Supabase, connect them, and it provisions the database, applies 50 migrations, seeds the data, deploys and verifies the result — you watch the steps go green. Or take the source and do it yourself with the shipped scripts and docs, which is the same sequence run by hand.

**What updates and support are included?**

Updates to that product for as long as we maintain it — no renewal fee and no expiry date on your access. Support covers download problems, defects in the code as shipped, questions about what the product does and how it is structured, and licence questions. It does not cover debugging your own modifications, building features for you, or setting up your hosting and third-party accounts.

**Why does a complete codebase cost $179?**

Because it was built once and is distributed many times. SaaSCode builds each product and ships the same finished release through the catalog, so the price reflects repeatable distribution — not a reduced codebase, an unfinished template, or what the same work would cost commissioned.

**Do I need to be a developer?**

No, for the normal path. You create free accounts at Vercel and Supabase, connect them to the installer in your saascode dashboard, and it does the deployment for you — provision, migrate, seed, deploy, verify. What it asks of you is creating two accounts and copying a token, not writing code. If you would rather deploy it yourself, or host it somewhere else, the full source and the scripts are yours to do that with. Running the product day to day needs no technical skill at all: that happens through its own interface, which is what the demo shows.

## Licence

The buyer receives the complete source and may deploy, modify and operate it
as their own SaaS, charging their own customers. The source itself is not
resold or redistributed: you build and deliver **with** it, you do not sell **it**.

## What this document cannot tell you

Stated plainly because a review that misses it is not a review:

- code quality, duplication, or architectural consistency
- test coverage
- query performance under load
- security posture beyond what the stack implies
- how maintainable it will be in a year

Scope is measurable from outside; implementation quality is not. Anyone
evaluating this should say so rather than infer quality from size.

## Written about it

- [AI Agent Builders 2026 — What the Licence Actually Permits You to Do for Other People](https://saascode.ai/inside/ai-agent-builders-2026-what-the-licence-actually-permits-you.md)
- [The Argument Against This Entire Category — And Who It Still Fits](https://saascode.ai/inside/cortex-vs-dify-self-hosted-ai-agent-builder-comparison-own.md)
- [Cortex: a self-hosted AI agent builder with the reasoning on a canvas](https://saascode.ai/inside/road-to-cortex.md)

## Links

- Catalog page: https://saascode.ai/products/cortex
- Product record: https://saascode.ai/inside/products/cortex
- Live demo: https://cortex.saascode.ai
- Every product: https://saascode.ai/llms.txt

