Cortex Academy

Learn the stack before AI builds it.

You can’t review code you don’t understand — and you can’t steer an AI tool through a stack you’ve never seen. Every technology, AI tool and integration in the Lab has official docs and hand-picked channels here, plus build-alongs that show what your project will look like.

Learning library

Every piece of your stack, explained by people who build with it.

Official documentation first, then channels worth your time. “Recent tutorials” searches YouTube for this year’s material, because stacks move fast.

Loading…

How it might look

Watch someone build what you’re planning.

Before you prompt, see a real build of the same shape: the structure, the rough edges, the time it takes.

1 · Choose a lane

Three runnable starting points.

Each lane is a small TypeScript + Fastify project with contracts, safe defaults and a preconfigured .cortex/.

Lane A

Assistant app + API

A single assistant behind a typed API (POST /assist) with an OpenAPI contract, input validation and safe defaults.

cortex tutorial scaffold lane-a ./my-assistant
Lane B

Workflow agent

Planner + executor with a fixed tool whitelist. safe mode plans only; execute runs approved tools.

cortex tutorial scaffold lane-b ./my-agent
Lane C

MCP server

Contract-first tools with JSON-schema validation, typed errors and an audit-safe path for mutating tools.

cortex tutorial scaffold lane-c ./my-mcp
2 · Load the coaching skills

Your agent becomes the tutor.

These skills compile to Agent Skills for Claude Code, Codex, Cursor, Copilot, Gemini CLI and the rest — so whichever tool you open knows which phase you are in.

shell
cortex add skill stack-selection
cortex add skill tutorial-coach
cortex add skill agent-foundations
cortex add skill mcp-builder
cortex add skill api-contract-engineering
cortex compile
3 · Work the phases

Six phases. Don’t skip ahead.

Finish a phase’s checklist before expanding. cortex tutorial phases shows the same roadmap in your terminal.

0

Pick your lane and constraints

Do

Write down target users, monthly budget ceiling, latency target, team size and stack familiarity, and your compliance boundary. Choose a primary and a fallback stack.

Done when

Constraints are approved · primary + fallback stack chosen · you know what success means in 30 days.

Pitfalls

Picking a model or framework before defining latency and budget; microservices for a team under five; no fallback model.

Try the Lab to turn constraints into a stack and a ready .cortex/ config.

1

Define contracts before code

Do

Agent input/output/error schema, JSON schema for every tool, and OpenAPI contracts with a written versioning policy.

Done when

Every tool has a schema · every endpoint has success and error examples · the versioning policy is written.

Pitfalls

Changing required fields without a version bump; ambiguous error payloads; no idempotency on writes.

2

Build a basic agent safely

Do

Validate input → bounded prompt context → model call with max tokens and a timeout → at most one approved tool → structured output.

Done when

Token budget, timeout and retry limits exist · tool whitelist exists · a suggest-only safe mode exists.

Pitfalls

Letting the model invent tool arguments; no fallback for tool failures; prompt injection mixed with system policy.

3

Add MCP capability

Do

One read-only tool → strict validation and error mapping → one mutating tool with an audit log → capability discovery and version tags.

Done when

Schemas validated server-side · mutating tools enforce authorization · every call is auditable · compatibility policy documented.

Pitfalls

Mutating tools without auth checks; internal exceptions leaking into responses; silent schema changes breaking clients.

4

Evolve contracts and quality

Do

Contract tests on every PR, golden prompt cases, evals for core journeys, and dashboards for latency, cost and failures.

Done when

≥ 10 golden eval cases · contract tests block breaking changes · dashboards show token cost and failure reasons.

Pitfalls

Tuning prompts without regression tests; contract changes without migration notes; no incident path for model outages.

5

Scale deliberately

Do

In order: caching and retrieval quality → queue-based async execution → model routing and fallback → multi-tenant isolation and governance.

Done when

You can name your top 3 cost drivers · fail over between models · trace one request across every system.

Pitfalls

Premature multi-agent orchestration; no governance on tool use and spend; no owner for contracts and model policy.

Compare current model prices and context windows on the model registry before choosing a routing policy.