[{"data":1,"prerenderedAt":4},["ShallowReactive",2],{"readme:neocarta":3},"\u003Ch1>Neocarta\u003C\u002Fh1>\n\u003Cp>An end-to-end library for building a semantic layer in Neo4j — giving AI agents systemic understanding of how your data is organized, what it means, and where it lives.\u003C\u002Fp>\n\u003Cp>\u003Cem>Note: This library is not a Neo4j product. It is a Neo4j Labs project supported by the Neo4j field team.\u003C\u002Fem>\u003C\u002Fp>\n\u003Cp>\u003Ca href=\"https:\u002F\u002Fneo4j.com\u002Flabs\u002F\" rel=\"nofollow ugc noopener\">\u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FNeo4j-Labs-6366F1?logo=neo4j\" alt=\"Neo4j Labs\" \u002F>\u003C\u002Fa>\n\u003Ca href=\"https:\u002F\u002Fneo4j.com\u002Flabs\u002F\" rel=\"nofollow ugc noopener\">\u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FStatus-Experimental-F59E0B\" alt=\"Status: Experimental\" \u002F>\u003C\u002Fa>\n\u003Ca href=\"https:\u002F\u002Fgithub.com\u002Fneo4j-field\u002Fneocarta\u002Factions\u002Fworkflows\u002Fpr-main-tests.yml\" rel=\"nofollow ugc noopener\">\u003Cimg src=\"https:\u002F\u002Fgithub.com\u002Fneo4j-field\u002Fneocarta\u002Factions\u002Fworkflows\u002Fpr-main-tests.yml\u002Fbadge.svg\" alt=\"CI\" \u002F>\u003C\u002Fa>\n\u003Ca href=\"https:\u002F\u002Fbadge.fury.io\u002Fpy\u002Fneocarta\" rel=\"nofollow ugc noopener\">\u003Cimg src=\"https:\u002F\u002Fbadge.fury.io\u002Fpy\u002Fneocarta.svg\" alt=\"PyPI version\" \u002F>\u003C\u002Fa>\n\u003Ca href=\"https:\u002F\u002Fpypi.org\u002Fproject\u002Fneocarta\u002F\" rel=\"nofollow ugc noopener\">\u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fpypi\u002Fpyversions\u002Fneocarta.svg\" alt=\"Python versions\" \u002F>\u003C\u002Fa>\n\u003Ca href=\"https:\u002F\u002Fopensource.org\u002Flicenses\u002FApache-2.0\" rel=\"nofollow ugc noopener\">\u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FLicense-Apache%202.0-blue.svg\" alt=\"License\" \u002F>\u003C\u002Fa>\u003C\u002Fp>\n\u003Ch2>What it is\u003C\u002Fh2>\n\u003Cp>Neocarta builds a \u003Cstrong>semantic layer\u003C\u002Fstrong> in Neo4j from your data sources and serves it to your agents through an \u003Cstrong>MCP server\u003C\u002Fstrong>. The graph unifies more than raw schema — it brings together:\u003C\u002Fp>\n\u003Cul>\n\u003Cli>\u003Cstrong>Schema metadata\u003C\u002Fstrong> — tables, columns, foreign keys, and sample values\u003C\u002Fli>\n\u003Cli>\u003Cstrong>Business glossary\u003C\u002Fstrong> — terms and categories linked to the columns and tables they describe\u003C\u002Fli>\n\u003Cli>\u003Cstrong>Metrics\u003C\u002Fstrong> — governed metric definitions and their expressions\u003C\u002Fli>\n\u003Cli>\u003Cstrong>Query history\u003C\u002Fstrong> — real queries and the tables and columns they touch\u003C\u002Fli>\n\u003C\u002Ful>\n\u003Cp>…with more on the way. Across a growing set of database types, only the metadata crosses into Neo4j; your data stays in the source.\u003C\u002Fp>\n\u003Cp>This gives agents systemic familiarity with the data landscape — what data exists, what it means, how it joins, and which database holds it. Agents use the graph to \u003Cstrong>discover insights, ground their answers, and route queries to the right database\u003C\u002Fstrong>, making Text2Query, query routing, and data discovery reliable.\u003C\u002Fp>\n\u003Cp>\u003Cimg src=\"https:\u002F\u002Fraw.githubusercontent.com\u002Fneo4j-labs\u002Fneocarta\u002FHEAD\u002Fassets\u002Fimages\u002Farchitecture\u002Fquickstart-flow.png\" alt=\"Neocarta builds a semantic layer in Neo4j from your data sources and serves it to your agents over MCP, so they can discover, understand, and query the underlying data\" \u002F>\u003C\u002Fp>\n\u003Ch2>Quickstart\u003C\u002Fh2>\n\u003Cp>\u003Cstrong>1. Ingest\u003C\u002Fstrong> — read your source's schema into the semantic graph (your data stays in the source). Use the Python library or the CLI.\u003C\u002Fp>\n\u003Cp>Python — this is the \u003Ca href=\"https:\u002F\u002Fgithub.com\u002Fneo4j-labs\u002Fneocarta\u002Fblob\u002FHEAD\u002Fexamples\u002Fbigquery.py\" rel=\"nofollow ugc noopener\">BigQuery connector example\u003C\u002Fa>:\u003C\u002Fp>\n\u003Cpre>\u003Ccode class=\"language-python\">import os\nfrom google.cloud import bigquery\nfrom neo4j import GraphDatabase\nfrom neocarta import NodeLabel as nl\nfrom neocarta.connectors.bigquery import BigQuerySchemaConnector\nfrom neocarta.enrichment.embeddings import LiteLLMEmbeddingsConnector\n\ndriver = GraphDatabase.driver(\n    os.getenv(\"NEO4J_URI\"),\n    auth=(os.getenv(\"NEO4J_USERNAME\"), os.getenv(\"NEO4J_PASSWORD\")),\n)\nclient = bigquery.Client(project=os.getenv(\"GCP_PROJECT_ID\"))\n\n# Extract, transform, and load BigQuery schema metadata into Neo4j\nBigQuerySchemaConnector(\n    client=client,\n    project_id=os.getenv(\"GCP_PROJECT_ID\"),\n    neo4j_driver=driver,\n).ingest(dataset_id=os.getenv(\"BIGQUERY_DATASET_ID\"))\n\n# Optional: generate embeddings to turn on semantic table\u002Fcolumn search\nLiteLLMEmbeddingsConnector(\n    neo4j_driver=driver,\n    embedding_model=\"text-embedding-3-small\",\n).run(node_labels=[nl.DATABASE, nl.SCHEMA, nl.TABLE, nl.COLUMN])\n\u003C\u002Fcode>\u003C\u002Fpre>\n\u003Cp>CLI — the same ingest without writing Python (\u003Ccode>--embeddings\u003C\u002Fcode> is optional):\u003C\u002Fp>\n\u003Cpre>\u003Ccode class=\"language-bash\">pip install \"neocarta[cli]\"\n# reads NEO4J_URI \u002F NEO4J_USERNAME \u002F NEO4J_PASSWORD \u002F OPENAI_API_KEY from the environment or a .env file\nneocarta bigquery schema --project-id my-proj --dataset-id sales --embeddings\n\u003C\u002Fcode>\u003C\u002Fpre>\n\u003Cp>See the \u003Ca href=\"#neocarta-cli\" rel=\"nofollow ugc noopener\">Neocarta CLI\u003C\u002Fa> section for the full command set.\u003C\u002Fp>\n\u003Cp>\u003Cstrong>2. Serve\u003C\u002Fstrong> — expose the graph to your agent as tools:\u003C\u002Fp>\n\u003Cpre>\u003Ccode class=\"language-bash\">pip install \"neocarta[mcp]\"\n# reads NEO4J_URI \u002F NEO4J_USERNAME \u002F NEO4J_PASSWORD from the environment or a .env file\nneocarta-mcp           # or, from the unified CLI: neocarta mcp serve\n\u003C\u002Fcode>\u003C\u002Fpre>\n\u003Cp>The server gives the agent retrieval tools — `list_s\u003C\u002Fp>\n",1787958256394]