Skip to main content

Semantic context for your LLMs — generated automatically

Project description

official project PyPI version License

Databao Context Engine

Semantic context for your LLMs — generated automatically.
No more copying schemas. No manual documentation. Just accurate answers.

WebsiteQuickstartData SourcesContributing


What is Databao Context Engine?

Databao Context Engine is a CLI tool that automatically generates governed semantic context from your databases, BI tools, documents, and spreadsheets.

Integrate it with any LLM to deliver accurate, context-aware answers — without copying schemas or writing documentation by hand.

Your data sources → Context Engine → Unified semantic graph → Any LLM

Why choose Databao Context Engine?

Feature What it means for you
Auto-generated context Extracts schemas, relationships, and semantics automatically
Runs locally Your data never leaves your environment
MCP integration Works with Claude Desktop, Cursor, and any MCP-compatible tool
Multiple sources Databases, dbt projects, spreadsheets, documents
Built-in benchmarks Measure and improve context quality over time
LLM agnostic OpenAI, Anthropic, Ollama, Gemini — use any model
Governed & versioned Track, version, and share context across your team
Dynamic or static Serve context via MCP server or export as artifact

Installation

Databao Context Engine is available on PyPI and can be installed with uv, pip, or another package manage.

Using uv

  1. Install Databao Context Engine:

    uv tool install databao-context-engine
    
  2. Add it to your PATH:

    uv tool update-shell
    
  3. Verify the installation:

    dce --help
    

Using pip

  1. Install Databao Context Engine:

    pip install databao-context-engine
    
  2. Verify the installation:

    dce --help
    

Supported data sources

  • PostgreSQL
  • MySQL
  • SQLite
  • DuckDB
  • dbt projects
  • 📄 Documents & spreadsheets (coming soon)

Supported LLMs

Provider Configuration
Ollama languageModel: OLLAMA: runs locally, free
OpenAI languageModel: OPENAI: requires an API key
Anthropic languageModel: CLAUDE: requires an API key
Google languageModel: GEMINI: requires an API key

Quickstart

1. Create a project

  1. Create a new directory for your project and navigate to it:

    mkdir dce-project && cd dce-project
    
  2. Initialize a new project:

    dce init
    

2. Configure data sources

  1. When prompted, agree to create a new datasource. You can also use the dce datasource add command.

  2. Provide the data source type and its name.

  3. Open the config file that was created for you in your editor and fill in the connection details.

  4. Repeat these steps for all data sources you want to include in your project.

  5. If you have data in Markdown or text files, you can add them to the dce/src/files directory.

3. Build context

  1. To build the context, run the following command:

    dce build
    

4. Use Context with Your LLM

Option A: Dynamic via MCP Server

Databao Context Engine exposes the context through a local MCP Server, so your agent can access the latest context at runtime.

  1. In Claude Desktop, Cursor, or another MCP-compatible agent, add the following configuration. Replace dce-project/ with the path to your project directory:

    # claude_desktop_config.json, mcp.json, or similar
    
    {
      "mcpServers": {
        "dce": {
          "command": "dce mcp",
          "args": ["--project-dir", "dce-project/"]
        }
      }
    }
    
  2. Save the file and restart your agent.

  3. Open a new chat, in the chat window, select the dce server, and ask questions related to your project context.

Option B: Static artifact

Even if you don’t have Claude or Cursor installed on your local machine, you can still use the context built by Databao Context Engine by pasting it directly into your chat with an AI assistant.

  1. Navigate to dce-project/output/ and open the directory with the latest run.

  2. Attach the all_results.yaml file to your chat with the AI assistant or copy and paste its contents into your chat.

Contributing

We’d love your help! Here’s how to get involved:

  • Star this repo — it helps others find us!
  • 🐛 Found a bug? Open an issue
  • 💡 Have an idea? We’re all ears — create a feature request
  • 👍 Upvote issues you care about — helps us prioritize
  • 🔧 Submit a PR
  • 📝 Improve docs — typos, examples, tutorials — everything helps!

New to open source? No worries! We're friendly and happy to help you get started. 🌱

For more details, see CONTRIBUTING.

📄 License

Apache 2.0 — use it however you want. See the LICENSE file for details.


Like Databao Context Engine? Give us a ⭐ — it means a lot!

WebsiteDiscord

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

databao_context_engine-0.1.6.tar.gz (74.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

databao_context_engine-0.1.6-py3-none-any.whl (133.0 kB view details)

Uploaded Python 3

File details

Details for the file databao_context_engine-0.1.6.tar.gz.

File metadata

File hashes

Hashes for databao_context_engine-0.1.6.tar.gz
Algorithm Hash digest
SHA256 d14237f7888dd9d9655b639860aa46d45127f780da633e9e646d9cfb39366136
MD5 7b44715fe90af27e6840ac86807b6649
BLAKE2b-256 d5f4dee3ea6e6c6a35f3b4f54ae6bcb56972a26fa932580f1bf8e97b3513570d

See more details on using hashes here.

File details

Details for the file databao_context_engine-0.1.6-py3-none-any.whl.

File metadata

File hashes

Hashes for databao_context_engine-0.1.6-py3-none-any.whl
Algorithm Hash digest
SHA256 38137ff52c2ce05be9803ef44f5eb781c40b111bdec0f19549f9f9278063e4b2
MD5 720373b925075225d90f9b720a4c5119
BLAKE2b-256 e0adb906180fcf9721a3fc463df7c81bfa02c5a98f37410ac226a3578361a7d9

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page