Using crew-dcs with an AI agent¶
An AI agent (Claude Code, Cursor, ChatGPT, or anything similar) can write crew-dcs scripts for you, if it reads the docs first. This page shows how to hand it the docs in a form it reads well, and gives you an instruction block to paste.
Point the agent at the docs¶
This site publishes two plain-text files written for agents:
/llms.txtis a short index: one line per page, each with a link. An agent reads it first and then opens only the pages it needs./llms-full.txtis the same pages joined into one file, so an agent with a large context window (the amount of text it can hold in mind at once) can take everything in one read. It covers the guides and the reference entry points, not every module in the reference.
Every page listed in llms.txt also has a Markdown copy. Add index.md to the
page's address: /getting-started/install/ becomes
/getting-started/install/index.md. Markdown is easier for an agent to read than
the HTML you see in the browser.
How to give these to your tool:
- Claude Code or Cursor: tell it the address in your first message, for example "Read https://domolibrary.datacrew.space/llms.txt before you write any crew-dcs code." Both can fetch a web page.
- ChatGPT: ask it to open the same address. If your plan has no browsing, open
llms-full.txtyourself, copy the text and paste it into the chat. Paste only the docs, never your.envfile.
An instruction block to paste¶
Copy this into your agent's first message, or into the file your tool reads for
standing instructions (CLAUDE.md for Claude Code, .cursor/rules for Cursor).
You are helping me write Python scripts that automate Domo with the crew-dcs
library. Read https://domolibrary.datacrew.space/llms.txt first, then open the
pages you need from it.
Rules:
- Install: crew-dcs is a private package. Follow
https://domolibrary.datacrew.space/getting-started/install/index.md. It needs
Python 3.13 or newer and uv, and a package index set up in pyproject.toml.
- Credentials: read them from a .env file or environment variables
(DOMO_INSTANCE, DOMO_ACCESS_TOKEN), loaded with python-dotenv. Never write a
token, password or client secret into code, into a command, or into this chat.
If a value is missing, tell me which variable to set and stop.
- Auth: use DomoTokenAuth from crew_dcs.auth for scripts. Before anything bigger,
run auth.who_am_i() once to confirm the credential works.
- Routes first: prefer the route functions in crew_dcs.routes, such as
get_dataset_by_id(dataset_id, auth), over the classes in crew_dcs.classes.
Each route makes one Domo API call and returns a response whose .response
holds what Domo sent back. Use a class only when I ask for one.
- Async: every call is async. Put calls inside "async def main()" and start it
with asyncio.run(main()). In a notebook, use await directly.
- Errors: catch the specific error a route raises, such as DatasetNotFoundError
for a missing DataSet, or InvalidCredentialsError for a bad token. All of them
derive from DomoError. Do not catch a bare Exception around a Domo call.
- Safety: start with read-only calls. Before any call that creates, changes or
deletes something in Domo, show me what it will do and wait for my yes.
- If a route, class or argument is not in the docs, say so. Do not guess a name.
What an agent cannot do for you¶
- It cannot get the package without your token. crew-dcs is on a private
package index. Installing it needs your own
dc_token from datacrew.space, set as an environment variable on your machine. See Install. An agent that runs on a remote service, with no access to your terminal, cannot install the package at all. - It cannot see your Domo. It knows only what the docs and your files say. Give it real DataSet ids and your instance name, and let it run read-only calls to look.
- It should not hold your credentials. Create the
.envfile yourself, as in Authenticating to Domo. The agent's script reads it at run time, and the token never enters the conversation.
Point the agent at How crew-dcs is organised for the route and class layout, and at Errors for what to catch.
For the full list of routes and classes, the agent can open the reference entry
points: crew_dcs.routes,
crew_dcs.auth and
crew_dcs.classes.