Skip to main content

Agent Data Toolkit

An open source toolkit that provides modular connectors for AI agents to interact with diverse data systems. It standardizes connection and query patterns, handles configuration and errors, and delivers results in a consistent format. Designed to be reused by other projects, it enables frameworks like MCP servers or custom agent implementations to define tools on top of a common abstraction layer for seamless data access.


Current Data Connectors

Connector Status Extras name Notes
PostgreSQL ✅ Ready postgresql Supports queries, schema introspection, DataFrame helpers
Azure Monitor Logs / Sentinel Ready azure-monitor Workspace KQL queries, retained source response, explicit partial-result handling, DataFrames
Elasticsearch 🚧 Planned elasticsearch Query and aggregation support (future)
MongoDB 🚧 Planned mongodb Basic CRUD and aggregation pipelines
Neo4j 🚧 Planned neo4j Cypher query support (future)
Splunk 🚧 Planned splunk Search/query API support (future)

Installation

From PyPI

The easiest way is to install the package directly from PyPI:

# With uv (recommended)
uv pip install agent-data-toolkit

# Or with pip
pip install agent-data-toolkit

To enable a specific connector, install with extras. For example, PostgreSQL:

uv pip install "agent-data-toolkit[postgresql]"
# or
pip install "agent-data-toolkit[postgresql]"

From Source

If you want to work with the latest code from GitHub:

git clone https://github.com/Cyb3rWard0g/agent-data-toolkit.git
cd agent-data-toolkit

# Create a virtual environment
uv venv .venv
source .venv/bin/activate

# Install in editable/dev mode
uv pip install -e ".[dev]"
# or
pip install -e ".[dev]"

You can still add extras here, e.g.:

uv pip install -e ".[dev,postgresql]"

Quick Example

Using the PostgreSQL connector:

from agent_data_toolkit.postgresql import PostgresClient

# Create client from environment variables (PG_DSN / POSTGRES_DSN / DATABASE_URL)
pg = PostgresClient.from_env()

rows = pg.query_rows("SELECT 1 AS ok")
print(rows)

pg.close()

Azure Monitor Logs and Microsoft Sentinel

Install agent-data-toolkit[azure-monitor] in the environment that executes the queries. For Jupyter, that is the kernel environment, which may be remote. The connector uses Azure Monitor's Logs query API for the workspace's tables; it does not manage Sentinel incidents, rules or workspace permissions.

For local development, authenticate with Azure CLI and configure the kernel:

az login
export AZURE_LOGS_WORKSPACE_ID="<workspace-guid>"
export AZURE_LOGS_AUTH=azure-cli

For an Azure-hosted workload, set AZURE_LOGS_AUTH=managed-identity and optionally AZURE_CLIENT_ID for its explicitly selected user-assigned identity. There is no automatic developer-credential fallback. The runtime identity needs query access to the intended workspace/tables. An injected synchronous Azure TokenCredential is also supported through from_env(credential=...) or from_info(info, credential).

from datetime import UTC, datetime
from agent_data_toolkit.azure_monitor import AzureMonitorLogsClient

logs = AzureMonitorLogsClient.from_env()
result = logs.query(
    "SecurityEvent | take 100",
    timespan=(
        datetime(2026, 1, 1, tzinfo=UTC),
        datetime(2026, 1, 2, tzinfo=UTC),
    ),
    max_rows=1000,
)
print(result.metadata())
events = result.to_dataframe()
# Keep logs and events in the notebook kernel for follow-up cells.
# Close the reusable client when finished:
logs.close()

query() retains every result table's names/types, the query/window, source partial status, request ID and exact response bytes (raw_response) when received through the SDK pipeline. metadata() exposes their hashes without rows or tokens. An empty successful table retains its columns. to_dataframe() and query_df() reject partial or client-truncated data by default; explicitly use allow_partial=True after inspecting the result. A PartialResultError retains its structured result for inspection without repeating the query.

max_rows caps retained rows across all tables after the response arrives. It does not cap server scanning, network bytes or the retained native response. Service limits, query design and server_timeout (1–600 seconds) remain separate limits. complete describes successful API collection without client truncation; it does not establish ingestion health or investigation coverage.

Trusted Python hosts may pass an Azure SDK HttpTransport to AzureMonitorLogsClient.from_info(info, credential, transport=...). The SDK client owns that transport's lifetime and disables automatic request retries; a capture host can mediate one request without giving the kernel an Azure token. timespan=None explicitly adds no API time filter, for a compiled query that already owns its occurrence-time predicates. Its metadata window is then null; an absolute UTC tuple keeps the existing additional API time filter.

The SDK caches/renews tokens while the client is reused. No raw token is accepted or written into notebook cells. Caller-injected credentials remain caller-owned; close() releases SDK resources and credentials created by from_env(). Cloud overrides use trusted AZURE_LOGS_ENDPOINT and AZURE_LOGS_AUDIENCE settings. Any Python running in a kernel with an Azure identity can use that identity: notebook tool arguments alone are not an authorization boundary.

Offline connector tests, including a controlled Azure SDK transport, need no source identity. Live qualification is explicit:

ADT_AZURE_LIVE=1 pytest -q -m azure_live

This live probe verifies authentication and workspace query permission; it does not qualify a particular security table, mapping or MATCH investigation outcome.


Release Process

To publish a new release to PyPI:

  1. Install dev dependencies
    uv pip install -e ".[dev]"
    
  2. Ensure all changes are committed and tests pass:
    uv run pytest tests/
    
  3. Create and push an annotated tag for the release:
    git tag -a v0.1.0 -m "Release 0.1.0"
    git push origin v0.1.0
    
  4. Checkout the tag to ensure you are building exactly from it:
    git checkout v0.1.0
    
  5. Clean old build artifacts:
    rm -rf dist
    rm -rf build
    rm -rf src/*.egg-info
    
  6. Upgrade build and upload tools:
    uv pip install --upgrade build twine packaging setuptools wheel setuptools_scm
    
  7. Build the package:
    uv run python -m build
    
  8. (Optional) Check metadata:
    uv run twine check dist/*
    
  9. Upload to PyPI:
    uv run twine upload dist/*
    

Notes:

  • Twine ≥ 6 and packaging ≥ 24.2 are required for modern metadata support.
  • Always build from the tag (git checkout vX.Y.Z) so setuptools_scm resolves the exact version.
  • git checkout v0.1.0 puts you in detached HEAD mode; that’s normal. When done, return to your branch with:
    git switch -
    
  • If you’re building in CI, make sure tags are fetched:
    git fetch --tags --force --prune
    git fetch --unshallow || true
    

Metadata

Release files for agent-data-toolkit 0.4.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for agent-data-toolkit 0.4.0
File Size Uploaded Provenance Actions
agent_data_toolkit-0.4.0.tar.gz 97.0 kB With provenance Details for agent_data_toolkit-0.4.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for agent-data-toolkit 0.4.0
File Interpreter ABI Platform Actions
agent_data_toolkit-0.4.0-py3-none-any.whl Python 3 none any Details for agent_data_toolkit-0.4.0-py3-none-any.whl

Total release size: 136.9 kB

Release files / agent_data_toolkit-0.4.0.tar.gz

Download URL agent_data_toolkit-0.4.0.tar.gz
Size 97.0 kB
Tags Source
SHA-256 checksum
How to use checksums
68a869ec2753a5b82812807b31a027f88abdf3bc6195c77116f6b5d56636781f
BLAKE2b-256 checksum
How to use checksums
f79347c7e1eda41ff071e478ff31cb92f813c590300fa8292c38414438770c2d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 22, 2026.

Transparency log

Release files / agent_data_toolkit-0.4.0-py3-none-any.whl

Download URL agent_data_toolkit-0.4.0-py3-none-any.whl
Size 39.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
20596dd5a876161da6a80678517cb23f99151c5f867c8b807f3469fe63dd08aa
BLAKE2b-256 checksum
How to use checksums
6f0ae8008a16d185a92aed58d8f91071631c77d15ac69a57ca8b1198ce05de5f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 22, 2026.

Transparency log

Security for agent-data-toolkit 0.4.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for agent_data_toolkit-0.4.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 22, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page