Semantic infrastructure for AI coding agents
Project description
Cortex
Semantic infrastructure for AI coding agents — symbol index, call graph, framework skills, MCP tools, and a live dashboard for Cursor, Claude Code, and other editors.
License: Personal use only — not for commercial use. See Contributing if you want to improve the project.
What it does
- Indexes your repo — Python, JavaScript, and TypeScript via tree-sitter; symbols, imports, and call relationships stored locally.
- Exposes MCP tools —
find_symbol,find_symbol_usages,trace_symbol_calls,get_file_metadata,get_code_issues, and more. - Framework skills — Optional packs (
python,django,react,typescript,nextjs,celery) add domain tools and agent prompt rules. - Web dashboard — Graph explorer, issues, and project context at
http://127.0.0.1:7070(configurable). - Agent wiring —
cortex add cursor/cortex add claudeinstalls MCP config, a decision-first workflow (classify → gather → plan → implement → verify), and per-skill rules fromskills/*/prompts/*.md.
All project data stays under .cortex/ in each repo (config, database, graph, ignore list). Nothing is sent to a cloud service by default.
Requirements
- Python 3.11+
- macOS / Linux / Windows (WSL recommended on Windows)
Quick start
git clone <this-repo>
cd cortex
python -m venv .venv
source .venv/bin/activate # Windows: .venv\Scripts\activate
pip install -e .
cd /path/to/your-project
cortex init # interactive: name, port, skills, repo path
cortex add cursor # or: cortex add claude
When your editor connects Cortex MCP, it runs cortex serve, which starts MCP tools and the dashboard automatically.
Optional background indexer (watches files on save):
cortex start
More detail: docs/getting-started.md
PyPI: Releases are automated on merge to main / master (patch bump). Manual major/minor via GitHub Actions → Release. Setup: docs/pypi-release.md.
Common commands
| Command | Description |
|---|---|
cortex init |
Create .cortex/cortex.toml and .cortex/cortexignore |
cortex add cursor |
Wire .cursor/mcp.json + rules |
cortex add claude |
Wire .mcp.json + .claude/rules/ |
cortex start |
Background daemon (indexer + HTTP API) |
cortex stop / cortex restart |
Control the daemon |
cortex serve |
MCP over stdio (+ dashboard when used from an editor) |
cortex skills add django python |
Enable skills; auto-syncs agent rules |
cortex skills remove django |
Disable a skill |
cortex skills reload |
Refresh rules and hot-reload config |
cortex agents sync |
Rewrite skill rule files from active skills |
cortex agents fix-mcp |
Fix MCP path (.venv) for Cursor ENOENT |
cortex agents reload-mcp |
Bump MCP env after skill changes |
cortex dashboard |
Open the web UI in a browser |
cortex reindex |
Re-scan the repository |
cortex status |
Daemon health and stats |
Releases (maintainers)
| Event | Version bump |
|---|---|
Merge to main or master |
patch (0.0.1 → 0.0.2) |
| Actions → Release → Run workflow | patch / minor / major (your choice) |
See docs/pypi-release.md for PyPI Trusted Publishing and secrets.
Configuration
| Path | Purpose |
|---|---|
.cortex/cortex.toml |
Project name, port, active skills, watcher ignores |
.cortex/cortexignore |
Extra ignore patterns (like .gitignore) |
.cortex/metadata.db |
Symbol metadata (SQLite) |
.cortex/graph/ |
Call/import graph (Kùzu) |
.cursor/mcp.json |
Cursor MCP entry (cortex serve) |
Legacy ./cortex.toml and ./.cortexignore at the repo root are still read if present; new projects should use .cortex/ only.
Skills
Built-in skills (enable with cortex skills add <name>):
| Skill | Examples |
|---|---|
python |
get_function_signature, get_python_issues |
django |
trace_request_flow, list_django_urls |
react |
list_react_components, trace_component_tree |
typescript |
get_typescript_issues, list_typescript_exports |
nextjs |
get_route_tree, find_server_actions |
celery |
list_celery_tasks |
Each skill can ship prompt markdown under skills/<name>/prompts/, copied to agent rule files on sync.
Repository layout
cortex/ CLI entrypoint
core/ Daemon, parser, graph, MCP, HTTP, integrations
skills/ Framework skill modules
core/dashboard/ Web UI (served by cortex; bundled in the PyPI wheel)
docs/ Documentation
integrations/ Notes per editor (Cursor, Claude, …)
Contributing
Contributions are welcome under the Cortex Personal Use License.
Before you open a PR
- License — By contributing, you agree your work can be distributed under this license (personal/non-commercial use for users; see LICENSE §3).
- Scope — One logical change per PR; match existing style and keep diffs focused.
- Test manually — From the repo root with
.venvactivated:pip install -e . cortex init --force -y --name test --skills python cortex skills add django cortex agents sync
- No secrets — Do not commit API keys,
.env, or local.cortex/databases.
Good first areas
- New or improved skills (
skills/<name>/) - Diagnostics providers (ruff, pyright, tsc, …)
- Dashboard UX (see
core/dashboard/index.html) - Docs and examples in
docs/
Questions or commercial licensing
- Bugs and features: open a GitHub issue (or your tracker).
- Commercial use (company, client work, SaaS, resale): not covered by this license — contact the maintainers for a separate agreement.
License
This project is licensed under the Cortex Personal Use License — see LICENSE.
| Allowed | Not allowed without a commercial agreement |
|---|---|
| Personal projects and learning | Company / client commercial products |
| Hobby apps you do not sell | SaaS or paid tools built on Cortex |
| Contributing to this repo | Redistributing as a commercial SDK |
If in doubt whether your use is personal or commercial, assume you need written permission for commercial use.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file agentcortex-0.0.1.tar.gz.
File metadata
- Download URL: agentcortex-0.0.1.tar.gz
- Upload date:
- Size: 160.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5e68c14eeb50fa9289627b71f35e1c7bb0d5d98df4f5ddc07d6573e85fa7ca82
|
|
| MD5 |
6418062277778024caf2983da46ca508
|
|
| BLAKE2b-256 |
572df8f16783c63d90028146f13e083027f6b01f75e960dfa9ecde4d675c3f6d
|
Provenance
The following attestation bundles were made for agentcortex-0.0.1.tar.gz:
Publisher:
release.yml on zohaib3249/cortex
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
agentcortex-0.0.1.tar.gz -
Subject digest:
5e68c14eeb50fa9289627b71f35e1c7bb0d5d98df4f5ddc07d6573e85fa7ca82 - Sigstore transparency entry: 1633979377
- Sigstore integration time:
-
Permalink:
zohaib3249/cortex@55fda692ef2b3c55f5d563b4380c8c45ee5abb3b -
Branch / Tag:
refs/heads/master - Owner: https://github.com/zohaib3249
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@55fda692ef2b3c55f5d563b4380c8c45ee5abb3b -
Trigger Event:
push
-
Statement type:
File details
Details for the file agentcortex-0.0.1-py3-none-any.whl.
File metadata
- Download URL: agentcortex-0.0.1-py3-none-any.whl
- Upload date:
- Size: 212.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8c1897e0f8a27b5cbd959d643dc26d4089a53241a7a12286a183f6743e306e35
|
|
| MD5 |
8c384f64f50c0307ab3002f7a29453fd
|
|
| BLAKE2b-256 |
86a5ebf2612ba52fe2b837b8365a71786bb44830f041f54eefc8b6d9ff193721
|
Provenance
The following attestation bundles were made for agentcortex-0.0.1-py3-none-any.whl:
Publisher:
release.yml on zohaib3249/cortex
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
agentcortex-0.0.1-py3-none-any.whl -
Subject digest:
8c1897e0f8a27b5cbd959d643dc26d4089a53241a7a12286a183f6743e306e35 - Sigstore transparency entry: 1633979399
- Sigstore integration time:
-
Permalink:
zohaib3249/cortex@55fda692ef2b3c55f5d563b4380c8c45ee5abb3b -
Branch / Tag:
refs/heads/master - Owner: https://github.com/zohaib3249
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@55fda692ef2b3c55f5d563b4380c8c45ee5abb3b -
Trigger Event:
push
-
Statement type: