dust-sdk (unofficial)
An unofficial Python client for the Dust API.
Dust ships an official JavaScript/TypeScript SDK, but has no official Python client - despite Python being the dominant language for the data science, ML engineering, and automation teams that make up a large part of Dust's target audience (their own marketing highlights Data & Analytics as a core use case).
This project closes that gap.
Installation
pip install conversational-agent-client
Quickstart
from dust_sdk.client import DustClient
client = DustClient(
api_key="your-dust-api-key",
workspace_id="your-workspace-id",
base_url="https://eu.dust.tt", # or https://dust.tt — see note below
)
# List agents available in your workspace
agents = client.list_agents()
for agent in agents:
print(agent["sId"], "-", agent["name"])
# Talk to an agent
conversation = client.create_conversation(
message_content="What can you help me with?",
agent_sid="dust",
)
answer = client.get_last_agent_message_text(conversation)
print(answer)
⚠️ base_url is required, no default
Dust hosts separate regional infrastructure (https://dust.tt for US,
https://eu.dust.tt for EU). Using the wrong one doesn't 404 — it
returns a misleading invalid_api_key_error, making it look like your
key is wrong when it's actually a region mismatch. Check which region
your workspace lives in (visible in your workspace URL) before making
your first call.
What's implemented
21 methods, covering agents, spaces, data sources, apps, skills, conversations, feedback, and analytics.
| Method | Operation | Verified against |
|---|---|---|
list_agents() |
GET agent list | ✅ Live API call |
get_agent(sid) |
GET single agent | ✅ Live API call |
search_agents_by_name(query) |
GET agent search | ✅ Live API call |
export_agent_as_yaml(sid) |
GET agent as YAML | ✅ Live API call |
import_agent(...) |
POST create agent | ✅ Live API call |
update_agent_configuration(...) |
PATCH update agent | ✅ Live API call ⚠️ admin-scope key |
archive_agent(sid) |
DELETE (soft) agent | ✅ Live API call |
list_spaces() |
GET spaces | ✅ Live API call |
list_data_sources(space_id) |
GET data sources | ✅ Live API call |
list_documents(space_id, ds_id) |
GET documents | 📄 Official docs |
get_tables(space_id, ds_id) |
GET tables | ✅ Live API call |
search_data_source(...) |
GET semantic search | 📄 Official docs |
list_apps(space_id) |
GET apps in space | ✅ Live API call |
create_app_run(...) |
POST run a Dust App | 📄 Official docs |
list_skills() |
GET custom skills | ✅ Live API call |
list_data_source_views(space_id) |
GET data source views | ✅ Live API call |
create_conversation(...) |
POST new conversation | ✅ Live API call |
get_conversation(cid) |
GET conversation | ✅ Live API call |
get_feedbacks_for_conversation(cid) |
GET feedback entries | 📄 Official docs ⚠️ no API-key access |
parse_mentions_in_markdown(text) |
POST parse @mentions | ✅ Live API call |
export_workspace_analytics(...) |
GET analytics export | ✅ Live API call ⚠️ admin-scope key |
"Live API call" means the response schema was confirmed against a real request during development. "Official docs" means it's based on Dust's published documentation but hasn't been round-tripped against a live response, usually because that requires resources (a configured Dust App, a connected data source) that weren't available in the development workspace. "Admin-scope key" means the call needs an API key created with the admin access scope (Admin > API Keys).
Known limitations
Access restrictions (found through live testing)
Four categories of API restriction were found while building this SDK. Dust's support team confirmed the explanations below.
- Programmatic credit gating. Endpoints that invoke a model
(
create_conversationwith an agent mention) return429 rate_limit_errorunless the workspace has programmatic credits. Programmatic calls draw only from the workspace credit pool, never from a person's individual seat credits, and there is no free baseline. The pool exists on the Business plan after an admin tops it up (a workspace made up entirely of Free seats is still on the Business plan). Without a top-up there is no programmatic model access. - Public vs. private endpoints. Some documented endpoints are
session-only and return a misleading
401 not_authenticatedeven with a valid API key, because they're internal to the web app rather than part of the public API. - API key scope.
update_agent_configurationandexport_workspace_analyticsreturn403 workspace_auth_error("Only admin users can perform this action") when called with a key that lacks the admin scope, even for harmless actions. Create a key with the admin access option (Admin > API Keys) to use them. Both were verified live with such a key. Not mentioned per endpoint in the official docs. - User-bound endpoints.
get_feedbacks_for_conversationreturns401 user_authentication_requiredwith any workspace API key: feedback is tied to a specific user and an API key is not tied to anyone, so this endpoint can't currently be used with an API key.
Notes on specific methods
update_agent_configuration:user_favoriteis accepted (HTTP 200) but had no visible effect when called with an API key. Changingdescriptionwas verified live;handle,instructionsandeditorswere not tested live.export_workspace_analytics: dates use theYYYY-MM-DDformat. Only theusage_metricstable was verified live.search_agents_by_name: on 2026-10-02 this endpoint omitted global agents (dust,helper) and returned nothing for an agent's exact full name. Dust confirmed the global-agent omission as a bug. Neither behavior reproduced on 2026-10-08. If results look incomplete, filter the output oflist_agents()instead.
Documentation inaccuracies found
GET /spacesis shown at/api/w/{wId}/spaces(missing/v1/) on one reference page — using that exact path returns a misleading401instead of a 404. The correct path is/api/v1/w/{wId}/spaces.agent.avatar_urlis required in practice forimport_agent, marked optional in the spec.editorsmust be an array of email strings, not objects as shown in the import-agent spec.generation_settings.reasoning_effortis required but easy to miss.- Response shapes aren't fully consistent across endpoints — most
list endpoints wrap results in an object (e.g.
{"data_sources": [...]}), while a few return bare arrays. This SDK normalizes both into consistent Python return types.
Several of these findings were reported to Dust directly; some
(like the tables response shape) have already been fixed
server-side and confirmed by their engineering team, and Dust has
acknowledged the missing per-endpoint role/scope notes.
Development
git clone https://github.com/Zaymerstone/dust-python-sdk.git
cd dust-python-sdk
python -m venv venv
venv\Scripts\Activate.ps1 # Windows
pip install -e .
pip install pytest requests-mock
pytest -v
Tests run entirely against recorded fixtures (tests/fixtures/) —
no live API calls or credits are required to run the test suite.
Status
21 methods implemented and tested, covering agents, spaces, data sources, apps, skills, conversations, feedback, and analytics. The full Dust API surface is larger than this; some endpoints remain out of reach due to the access restrictions noted above. Contributions and feedback welcome.
License
MIT
Metadata
Release files for conversational-agent-client 0.2.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| conversational_agent_client-0.2.1.tar.gz | 12.1 kB | Without provenance | Details for conversational_agent_client-0.2.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| conversational_agent_client-0.2.1-py3-none-any.whl | Python 3 | none | any | Details for conversational_agent_client-0.2.1-py3-none-any.whl |
Total release size: 23.0 kB
Release files / conversational_agent_client-0.2.1.tar.gz
| Download URL | conversational_agent_client-0.2.1.tar.gz |
|---|---|
| Size | 12.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b4691a9fe844a74a0ba2e83f80bc3e462ac4d280083d536af913f345d059839e
|
|
BLAKE2b-256 checksum How to use checksums |
0969c012d59165ad8a0112a4cdaa9e5e1c7eb5e60e96a9021abfb09a1a91ec67
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.10.7
|
Release files / conversational_agent_client-0.2.1-py3-none-any.whl
| Download URL | conversational_agent_client-0.2.1-py3-none-any.whl |
|---|---|
| Size | 10.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
2fba4ac21720edfed2f17877d45c515887207194823a506b77f6757c70aacdd6
|
|
BLAKE2b-256 checksum How to use checksums |
c23b2c058ef59ca189164b795ca6e640e164e395d08e439c44d9098fb0eed7ab
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.10.7
|
Security for conversational-agent-client 0.2.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.