Skip to content
theblueprintcodePublic

About

AI Agent Integration Layer

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Cortex

AI service for theblueprintcode. Tenant-aware knowledge hub (RAG), agents (LangGraph) and MCP tools, sitting beside engine. Full plan: ../docs/ai-module-plan.md.

Run

cp .env.example .env          # set JWT_ACCESS_SECRET to the same value as engine/.env
createdb cortex               # on the local Postgres (:5432); needs the pgvector extension available (Postgres.app ships it)
uv sync
uv run uvicorn app.main:app --reload --port 5202
uv run pytest
  • GET /health checks the AI database.
  • GET /v1/whoami (Bearer token from the engine's /auth/login) shows the AI schema Cortex derived from the token.

How tenancy works here

Cortex trusts only the engine-signed JWT. Tenant tokens map to schema ai_<accountId>, root (platform) tokens map to public. The schema is never read from the request body or headers. All DB access goes through app/db.py:tenant_connection.

About

AI Agent Integration Layer

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages