Skip to main content

dex-agents-builtin-cli

dex-agents-builtin-cli provides the dex-agents-builtin command. It runs the Dex built-in agent loop as a durable Dex agent session and chats with it in your terminal. No agent framework is involved: the session's own RunModel Step makes one model call through LiteLLM, and every tool call runs in its own Dex tool Step. The shared CLI core, dex-agents-cli-core, starts or reuses dexcli dev, connects the connectors MCP server, and runs the Worker. This package only builds the built-in loop agent with the core's LiteLLM model client.

Running it

The command needs Python 3.11 or later and a key for the model's provider:

export OPENAI_API_KEY=sk-...
uvx --from dex-agents-builtin-cli dex-agents-builtin

The first run asks the init questions and writes ~/.dex/agents/builtin.yaml. Then type a message at the > prompt. Approve or reject tool calls with y or n, answer the agent's questions, and press Ctrl-D to exit. The session stays in Dex, and the command prints the --resume line that continues it. See the CLI core README for every subcommand and option, and agents/cli for the configuration file.

LiteLLM reads each provider's standard environment variables, such as OPENAI_API_KEY and OPENAI_BASE_URL for openai/ models and ANTHROPIC_API_KEY for anthropic/ models. The command never prints or stores a key.

Configuration

The model defaults to openai/gpt-5.2; set model in the file or pass --model to change it. It is a LiteLLM model name, <provider>/<model>, such as anthropic/claude-opus-5-5. A session's settings may change the model and the instructions; each model call uses the values of its turn. system_prompt replaces the default instructions. The builtin section has no options yet, and any key in it is a configuration error.

Tools

The agent's tools are the CLI core's: its local tool source and the connector tools of the connectors MCP server. Every call runs in its own Dex tool Step, with the CLI core's policy. Reads run at once, file writes and shell commands wait for approval unless the shell allow list has the command, and the file tools stay in the workspace. See the CLI core README for the local tools.

The agent also has two built-in tools that the session runs itself:

  • ask_user asks you a question, and the turn waits for your answer.
  • write_todos replaces the session's plan, a short task list, with no approval.

Plan mode is on. Use it through the terminal UI (dexcli agents-tui) or the session API, not the plain chat, which sends /plan and /run as ordinary messages. In the terminal UI, /plan <message> starts a planning turn: the agent drafts a plan with write_todos and uses no other tool. /run approves the draft, and the agent runs it with every tool.

The names ask_user and write_todos are reserved, so a connector or local tool with one of these names fails the turn. This is a breaking change for such a tool: rename the conflicting connector or local tool, or use another harness.

Development

Develop with uv 0.12.2. The package resolves dex-agents and the CLI core from this repository by path. uv.lock pins litellm to the version the core's lock pins, and ci.sh checks that. ci.sh installs the locked dependencies, checks lint and types, and runs the tests against a private dexcli dev:

cd agents/cli/python/builtin
DEXCLI=/path/to/dexcli ./ci.sh

The tests run the command in a pseudo-terminal with a private home and an allow-listed environment. LiteLLM sends openai/ models to the scripted Responses API of ../testing; a refused proxy stops any other request. A fake connectors MCP server serves a connector read and write. The tests cover a chat turn and --resume, read_file without approval and write_file after approval, a connector read and an approved connector write that runs once, session settings that change the model, and a key in the builtin section. They also cover a system_prompt set in the session settings, which reaches the next model request, and a rejected file write and connector write, which never run.

Metadata

Release files for dex-agents-builtin-cli 0.6.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 dex-agents-builtin-cli 0.6.0
File Size Uploaded Provenance Actions
dex_agents_builtin_cli-0.6.0.tar.gz 7.2 kB Without provenance Details for dex_agents_builtin_cli-0.6.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for dex-agents-builtin-cli 0.6.0
File Interpreter ABI Platform Actions
dex_agents_builtin_cli-0.6.0-py3-none-any.whl Python 3 none any Details for dex_agents_builtin_cli-0.6.0-py3-none-any.whl

Total release size: 16.6 kB

Release files / dex_agents_builtin_cli-0.6.0.tar.gz

Download URL dex_agents_builtin_cli-0.6.0.tar.gz
Size 7.2 kB
Tags Source
SHA-256 checksum
How to use checksums
34b2f2c75151fa0da40f7776f5368cd503217d8c2dbb6cf75747e173d376de5e
BLAKE2b-256 checksum
How to use checksums
c54335fb8e11ee66d2b43a57f73bd0632d6f71f70340e4b74519ea00aff8023f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.12.2 {"installer":{"name":"uv","version":"0.12.2","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / dex_agents_builtin_cli-0.6.0-py3-none-any.whl

Download URL dex_agents_builtin_cli-0.6.0-py3-none-any.whl
Size 9.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ba9a4d4646d0a74b313bae739b7f054ad7fa0776641f73dd4c94bbb7997bd9b4
BLAKE2b-256 checksum
How to use checksums
6c9b5339993f3f680d1c1afc0b22b8cce9cbf797d5de085d8a74ef2b5d7bd8b0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.12.2 {"installer":{"name":"uv","version":"0.12.2","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Security for dex-agents-builtin-cli 0.6.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.

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