datus-agent


Namedatus-agent JSON
Version 0.2.1 PyPI version JSON
download
home_pageNone
SummaryAI-powered SQL Agent for data engineering (Compiled Version)
upload_time2025-10-18 15:49:59
maintainerNone
docs_urlNone
authorNone
requires_python>=3.12
licenseNone
keywords sql ai agent database nlp natural-language
VCS
bugtrack_url
requirements python-dotenv pandas sqlalchemy sqlglot snowflake-connector-python pyyaml transformers sentence-transformers pytest black mypy langsmith lancedb pylance structlog openai httpx tantivy aiohttp xlsxwriter tiktoken pytest-asyncio openai-agents pydantic Markdown datasets pyarrow rich textual prompt-toolkit sqlglot anthropic google-generativeai snowflake-sqlalchemy duckdb-engine duckdb uv json-repair pymysql fastapi uvicorn pyperclip streamlit wcmatch
Travis-CI No Travis.
coveralls test coverage No coveralls.
            <table width="100%">
  <tr>
    <td align="left">
      <a href="https://www.apache.org/licenses/LICENSE-2.0">
        <img src="https://img.shields.io/badge/license-Apache%202.0-blueviolet?style=for-the-badge" alt="Apache 2.0 License">
      </a>
    </td>
    <td align="right">
      <a href="https://datus.ai">Website</a> |
      <a href="https://docs.datus.ai/">Docs</a> |
      <a href="https://docs.datus.ai/getting_started/Quickstart/">QuickStart</a> |
      <a href="https://docs.datus.ai/release_notes/">ReleaseNotes</a>
    </td>
  </tr>
</table>

## 🎯 Overview

**Datus** is an open-source data engineering agent that builds evolvable context for your data system. 

Data engineering needs a shift from "building tables and pipelines" to "delivering scoped, domain-aware agents for analysts and business users. 

![DatusArchitecure](docs/assets/datus_architecture.svg)

* Datus-CLI: An AI-powered command-line interface for data engineers—think "Claude Code for data engineers." Write SQL, build subagents, and construct context interactively.
* Datus-Chat: A web chatbot providing multi-turn conversations with built-in feedback mechanisms (upvotes, issue reports, success stories) for data analysts.
* Datus-API: APIs for other agents or applications that need stable, accurate data services.

## 🚀 Key Features

### 🧩 Contextual Data Engineering  
Automatically builds a **living semantic map** of your company’s data — combining metadata, metrics, SQL history, and external knowledge — so engineers and analysts collaborate through context instead of raw SQL.

### 💬 Agentic Chat  
A **Claude-Code-like CLI** for data engineers.  
Chat with your data, recall tables or metrics instantly, and run agentic actions — all in one terminal.

### 🧠 Subagents for Every Domain  
Turn data domains into **domain-aware chatbots**.  
Each subagent encapsulates the right context, tools, and rules — making data access accurate, reusable, and safe.

### 🔁 Continuous Learning Loop  
Every query and feedback improves the model.  
Datus learns from success stories and user corrections to evolve reasoning accuracy over time.


---

## 🧰 Installation

```bash
pip install datus-agent==0.2.1

datus-agent init
```

## 🧭 User Journey

### 1️⃣ Initial Exploration

A Data Engineer (DE) starts by chatting with the database using /chat.
They run simple questions, test joins, and refine prompts using @table or @file.
Each round of feedback (e.g., “Join table1 and table2 by PK”) helps the model improve accuracy.
`datus-cli --namespace demo`
`/Check the top 10 bank by assets lost @Table duckdb-demo.main.bank_failures`

### 2️⃣ Building Context

The DE imports SQL history and generates summaries or semantic models:

`/gen_semantic_model xxx`
`@subject`
They edit or refine models in @subject, combining AI-generated drafts with human corrections.
Now, /chat can reason using both SQL history and semantic context.

### 3️⃣ Creating a Subagent

When the context matures, the DE defines a domain-specific chatbot (Subagent):

`.subagent add mychatbot`

They describe its purpose, add rules, choose tools, and limit scope (e.g., 5 tables).
Each subagent becomes a reusable, scoped assistant for a specific business area.

### 4️⃣ Delivering to Analysts

The Subagent is deployed to a web interface:
`http://localhost:8501/?subagent=mychatbot`

Analysts chat directly, upvote correct answers, or report issues for feedback.
Results can be saved via !export.

### 5️⃣ Refinement & Iteration

Feedback from analysts loops back to improve the subagent:
engineers fix SQL, add rules, and update context.
Over time, the chatbot becomes more accurate, self-evolving, and domain-aware.

For detailed guidance, please follow our [tutorial](https://docs.datus.ai/getting_started/contextual_data_engineering/).

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "datus-agent",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.12",
    "maintainer_email": "Datus Team <harrison.zhao@datus.ai>",
    "keywords": "sql, ai, agent, database, nlp, natural-language",
    "author": null,
    "author_email": "Datus Team <harrison.zhao@datus.ai>",
    "download_url": "https://files.pythonhosted.org/packages/17/ea/980445154be8b07fd20a0d5ca3b54789973b36ab10c462018175e8f38251/datus_agent-0.2.1.tar.gz",
    "platform": null,
    "description": "<table width=\"100%\">\n  <tr>\n    <td align=\"left\">\n      <a href=\"https://www.apache.org/licenses/LICENSE-2.0\">\n        <img src=\"https://img.shields.io/badge/license-Apache%202.0-blueviolet?style=for-the-badge\" alt=\"Apache 2.0 License\">\n      </a>\n    </td>\n    <td align=\"right\">\n      <a href=\"https://datus.ai\">Website</a> |\n      <a href=\"https://docs.datus.ai/\">Docs</a> |\n      <a href=\"https://docs.datus.ai/getting_started/Quickstart/\">QuickStart</a> |\n      <a href=\"https://docs.datus.ai/release_notes/\">ReleaseNotes</a>\n    </td>\n  </tr>\n</table>\n\n## \ud83c\udfaf Overview\n\n**Datus** is an open-source data engineering agent that builds evolvable context for your data system. \n\nData engineering needs a shift from \"building tables and pipelines\" to \"delivering scoped, domain-aware agents for analysts and business users. \n\n![DatusArchitecure](docs/assets/datus_architecture.svg)\n\n* Datus-CLI: An AI-powered command-line interface for data engineers\u2014think \"Claude Code for data engineers.\" Write SQL, build subagents, and construct context interactively.\n* Datus-Chat: A web chatbot providing multi-turn conversations with built-in feedback mechanisms (upvotes, issue reports, success stories) for data analysts.\n* Datus-API: APIs for other agents or applications that need stable, accurate data services.\n\n## \ud83d\ude80 Key Features\n\n### \ud83e\udde9 Contextual Data Engineering  \nAutomatically builds a **living semantic map** of your company\u2019s data \u2014 combining metadata, metrics, SQL history, and external knowledge \u2014 so engineers and analysts collaborate through context instead of raw SQL.\n\n### \ud83d\udcac Agentic Chat  \nA **Claude-Code-like CLI** for data engineers.  \nChat with your data, recall tables or metrics instantly, and run agentic actions \u2014 all in one terminal.\n\n### \ud83e\udde0 Subagents for Every Domain  \nTurn data domains into **domain-aware chatbots**.  \nEach subagent encapsulates the right context, tools, and rules \u2014 making data access accurate, reusable, and safe.\n\n### \ud83d\udd01 Continuous Learning Loop  \nEvery query and feedback improves the model.  \nDatus learns from success stories and user corrections to evolve reasoning accuracy over time.\n\n\n---\n\n## \ud83e\uddf0 Installation\n\n```bash\npip install datus-agent==0.2.1\n\ndatus-agent init\n```\n\n## \ud83e\udded User Journey\n\n### 1\ufe0f\u20e3 Initial Exploration\n\nA Data Engineer (DE) starts by chatting with the database using /chat.\nThey run simple questions, test joins, and refine prompts using @table or @file.\nEach round of feedback (e.g., \u201cJoin table1 and table2 by PK\u201d) helps the model improve accuracy.\n`datus-cli --namespace demo`\n`/Check the top 10 bank by assets lost @Table duckdb-demo.main.bank_failures`\n\n### 2\ufe0f\u20e3 Building Context\n\nThe DE imports SQL history and generates summaries or semantic models:\n\n`/gen_semantic_model xxx`\n`@subject`\nThey edit or refine models in @subject, combining AI-generated drafts with human corrections.\nNow, /chat can reason using both SQL history and semantic context.\n\n### 3\ufe0f\u20e3 Creating a Subagent\n\nWhen the context matures, the DE defines a domain-specific chatbot (Subagent):\n\n`.subagent add mychatbot`\n\nThey describe its purpose, add rules, choose tools, and limit scope (e.g., 5 tables).\nEach subagent becomes a reusable, scoped assistant for a specific business area.\n\n### 4\ufe0f\u20e3 Delivering to Analysts\n\nThe Subagent is deployed to a web interface:\n`http://localhost:8501/?subagent=mychatbot`\n\nAnalysts chat directly, upvote correct answers, or report issues for feedback.\nResults can be saved via !export.\n\n### 5\ufe0f\u20e3 Refinement & Iteration\n\nFeedback from analysts loops back to improve the subagent:\nengineers fix SQL, add rules, and update context.\nOver time, the chatbot becomes more accurate, self-evolving, and domain-aware.\n\nFor detailed guidance, please follow our [tutorial](https://docs.datus.ai/getting_started/contextual_data_engineering/).\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "AI-powered SQL Agent for data engineering (Compiled Version)",
    "version": "0.2.1",
    "project_urls": {
        "Bug Tracker": "https://github.com/datus-ai/datus-agent/issues",
        "Documentation": "https://github.com/datus-ai/datus-agent#readme",
        "Homepage": "https://datus.ai/",
        "Repository": "https://github.com/datus-ai/datus-agent"
    },
    "split_keywords": [
        "sql",
        " ai",
        " agent",
        " database",
        " nlp",
        " natural-language"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "c430b685a5d175470bfd8cd622d5fe8e8ad21a444cca95f5b3c251aa176a7dba",
                "md5": "86d79378a57a3fcf861e0adb86c4cef6",
                "sha256": "fa300380098fc00b6d7761260552a197ae2d5d9b1396b6197f899bfaa45a3711"
            },
            "downloads": -1,
            "filename": "datus_agent-0.2.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "86d79378a57a3fcf861e0adb86c4cef6",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.12",
            "size": 768914,
            "upload_time": "2025-10-18T15:49:57",
            "upload_time_iso_8601": "2025-10-18T15:49:57.218273Z",
            "url": "https://files.pythonhosted.org/packages/c4/30/b685a5d175470bfd8cd622d5fe8e8ad21a444cca95f5b3c251aa176a7dba/datus_agent-0.2.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "17ea980445154be8b07fd20a0d5ca3b54789973b36ab10c462018175e8f38251",
                "md5": "78e319f8a85c53d29ebd01fac385e662",
                "sha256": "1c46d533c5e7177fa222ccde38dfa9c1fb715ac4243bac3e22b1078285add421"
            },
            "downloads": -1,
            "filename": "datus_agent-0.2.1.tar.gz",
            "has_sig": false,
            "md5_digest": "78e319f8a85c53d29ebd01fac385e662",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.12",
            "size": 672508,
            "upload_time": "2025-10-18T15:49:59",
            "upload_time_iso_8601": "2025-10-18T15:49:59.780836Z",
            "url": "https://files.pythonhosted.org/packages/17/ea/980445154be8b07fd20a0d5ca3b54789973b36ab10c462018175e8f38251/datus_agent-0.2.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-10-18 15:49:59",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "datus-ai",
    "github_project": "datus-agent",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "requirements": [
        {
            "name": "python-dotenv",
            "specs": [
                [
                    "==",
                    "1.0.0"
                ]
            ]
        },
        {
            "name": "pandas",
            "specs": [
                [
                    "==",
                    "2.1.4"
                ]
            ]
        },
        {
            "name": "sqlalchemy",
            "specs": [
                [
                    "==",
                    "2.0.23"
                ]
            ]
        },
        {
            "name": "sqlglot",
            "specs": [
                [
                    ">=",
                    "26.12.0"
                ]
            ]
        },
        {
            "name": "snowflake-connector-python",
            "specs": [
                [
                    ">=",
                    "3.6.0"
                ]
            ]
        },
        {
            "name": "pyyaml",
            "specs": [
                [
                    "==",
                    "6.0.1"
                ]
            ]
        },
        {
            "name": "transformers",
            "specs": [
                [
                    ">=",
                    "4.50.3"
                ]
            ]
        },
        {
            "name": "sentence-transformers",
            "specs": [
                [
                    ">=",
                    "4.0.1"
                ]
            ]
        },
        {
            "name": "pytest",
            "specs": [
                [
                    "==",
                    "8.0.2"
                ]
            ]
        },
        {
            "name": "black",
            "specs": [
                [
                    "==",
                    "23.12.1"
                ]
            ]
        },
        {
            "name": "mypy",
            "specs": [
                [
                    "==",
                    "1.8.0"
                ]
            ]
        },
        {
            "name": "langsmith",
            "specs": [
                [
                    ">=",
                    "0.0.77"
                ]
            ]
        },
        {
            "name": "lancedb",
            "specs": [
                [
                    "==",
                    "0.18.0"
                ]
            ]
        },
        {
            "name": "pylance",
            "specs": [
                [
                    "==",
                    "0.22.0"
                ]
            ]
        },
        {
            "name": "structlog",
            "specs": [
                [
                    ">=",
                    "23.1.0"
                ]
            ]
        },
        {
            "name": "openai",
            "specs": [
                [
                    ">=",
                    "1.95.0"
                ]
            ]
        },
        {
            "name": "httpx",
            "specs": [
                [
                    "==",
                    "0.27.2"
                ]
            ]
        },
        {
            "name": "tantivy",
            "specs": [
                [
                    ">=",
                    "0.22.2"
                ]
            ]
        },
        {
            "name": "aiohttp",
            "specs": [
                [
                    ">=",
                    "3.11.16"
                ]
            ]
        },
        {
            "name": "xlsxwriter",
            "specs": [
                [
                    ">=",
                    "3.2.2"
                ]
            ]
        },
        {
            "name": "tiktoken",
            "specs": [
                [
                    ">=",
                    "0.9.0"
                ]
            ]
        },
        {
            "name": "pytest-asyncio",
            "specs": [
                [
                    ">=",
                    "0.23.8"
                ]
            ]
        },
        {
            "name": "openai-agents",
            "specs": [
                [
                    "==",
                    "0.3.2"
                ]
            ]
        },
        {
            "name": "pydantic",
            "specs": [
                [
                    ">=",
                    "2.11.7"
                ]
            ]
        },
        {
            "name": "Markdown",
            "specs": [
                [
                    "==",
                    "3.8"
                ]
            ]
        },
        {
            "name": "datasets",
            "specs": [
                [
                    "==",
                    "3.5.1"
                ]
            ]
        },
        {
            "name": "pyarrow",
            "specs": [
                [
                    ">=",
                    "15.0.0"
                ],
                [
                    "<",
                    "19.0.0"
                ]
            ]
        },
        {
            "name": "rich",
            "specs": [
                [
                    "==",
                    "14.0.0"
                ]
            ]
        },
        {
            "name": "textual",
            "specs": [
                [
                    "==",
                    "5.1.1"
                ]
            ]
        },
        {
            "name": "prompt-toolkit",
            "specs": [
                [
                    "==",
                    "3.0.51"
                ]
            ]
        },
        {
            "name": "sqlglot",
            "specs": [
                [
                    "==",
                    "26.12.0"
                ]
            ]
        },
        {
            "name": "anthropic",
            "specs": [
                [
                    "==",
                    "0.51.0"
                ]
            ]
        },
        {
            "name": "google-generativeai",
            "specs": [
                [
                    ">=",
                    "0.8.0"
                ]
            ]
        },
        {
            "name": "snowflake-sqlalchemy",
            "specs": [
                [
                    "==",
                    "1.7.3"
                ]
            ]
        },
        {
            "name": "duckdb-engine",
            "specs": [
                [
                    ">=",
                    "0.17.0"
                ]
            ]
        },
        {
            "name": "duckdb",
            "specs": [
                [
                    "<",
                    "1.4.0"
                ],
                [
                    ">=",
                    "1.3.0"
                ]
            ]
        },
        {
            "name": "uv",
            "specs": [
                [
                    ">=",
                    "0.7.19"
                ]
            ]
        },
        {
            "name": "json-repair",
            "specs": [
                [
                    ">=",
                    "0.47.6"
                ]
            ]
        },
        {
            "name": "pymysql",
            "specs": [
                [
                    ">=",
                    "1.1.1"
                ]
            ]
        },
        {
            "name": "fastapi",
            "specs": [
                [
                    ">=",
                    "0.104.0"
                ]
            ]
        },
        {
            "name": "uvicorn",
            "specs": [
                [
                    ">=",
                    "0.24.0"
                ]
            ]
        },
        {
            "name": "pyperclip",
            "specs": [
                [
                    "==",
                    "1.9.0"
                ]
            ]
        },
        {
            "name": "streamlit",
            "specs": [
                [
                    ">=",
                    "1.38.0"
                ]
            ]
        },
        {
            "name": "wcmatch",
            "specs": [
                [
                    ">=",
                    "10.0"
                ]
            ]
        }
    ],
    "lcname": "datus-agent"
}
        
Elapsed time: 0.87860s