Skip to main content

Datagusto SDK for LangChain / LangGraph / DeepAgents

datagusto-sdk connects agents built with LangChain's create_agent or DeepAgents' create_deep_agent to Datagusto.

Requirements

  • Python 3.10 or later
  • langchain 1.3+, langchain-core 1.4+, langgraph 1.2+
  • deepagents 0.3+ if you use create_deep_agent
  • A Datagusto server URL and an agent API key

Installation

pip install datagusto-sdk

Usage

Add DatagustoSafetyMiddleware to your agent's middleware.

With create_agent

from langchain.agents import create_agent
from langgraph.checkpoint.memory import InMemorySaver
from datagusto_langgraph import DatagustoSafetyMiddleware

agent = create_agent(
    model=model,
    tools=tools,
    middleware=[
        DatagustoSafetyMiddleware(
            server_url="https://your-datagusto-server.example.com",
            api_key="your-api-key",
        )
    ],
    checkpointer=InMemorySaver(),
)

agent.invoke(
    {"messages": [{"role": "user", "content": "Summarize today's tickets."}]},
    config={"configurable": {"thread_id": "thread-1"}},
)

With create_deep_agent

from deepagents import create_deep_agent
from datagusto_langgraph import DatagustoSafetyMiddleware

agent = create_deep_agent(
    tools=tools,
    system_prompt="You are a careful research assistant.",
    middleware=[
        DatagustoSafetyMiddleware(
            server_url="https://your-datagusto-server.example.com",
            api_key="your-api-key",
        )
    ],
)

Use the same thread_id for every turn of a conversation.

Configuration

Instead of passing server_url and api_key, you can set environment variables:

export DATAGUSTO_SAFETY_SERVER_URL="https://your-datagusto-server.example.com"
export DATAGUSTO_SAFETY_API_KEY="your-api-key"
DatagustoSafetyMiddleware()

License

MIT — see the LICENSE file.

Metadata

Release files for datagusto-sdk 1.0.1

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

Source distribution (sdist)

Source distribution for datagusto-sdk 1.0.1
File Size Uploaded Provenance Actions
datagusto_sdk-1.0.1.tar.gz 19.9 kB Without provenance Details for datagusto_sdk-1.0.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for datagusto-sdk 1.0.1
File Interpreter ABI Platform Actions
datagusto_sdk-1.0.1-py3-none-any.whl Python 3 none any Details for datagusto_sdk-1.0.1-py3-none-any.whl

Total release size: 42.3 kB

Release files / datagusto_sdk-1.0.1.tar.gz

Download URL datagusto_sdk-1.0.1.tar.gz
Size 19.9 kB
Tags Source
SHA-256 checksum
How to use checksums
ca3f7583ccb932a3e4817010d11e9bf0b23741dae6f4731f1c988ecddd246ec8
BLAKE2b-256 checksum
How to use checksums
304da903094fa033359f1fb9fe9874ab28f4edad8dfd20d60c58a9535c616ad7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.3

Release files / datagusto_sdk-1.0.1-py3-none-any.whl

Download URL datagusto_sdk-1.0.1-py3-none-any.whl
Size 22.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f46317bbc99077bf622d604ef61d7c9f51184c5158c80ec8ca546071f5057083
BLAKE2b-256 checksum
How to use checksums
787a0fe8406010d810326ed01e7cc52408a7cdeb0ca283990a109ddf50227542
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.3

Security for datagusto-sdk 1.0.1

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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

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