Ai Agents 5 min read

How to build ordering agents with DoorDash dd-cli

Learn how to configure the new DoorDash dd-cli to enable autonomous food ordering and real transaction processing for your AI workflows.

DoorDash recently launched dd-cli, a command-line interface tool designed to let developers and AI agents interact directly with the company’s core ordering infrastructure. This release transitions the platform from a human-centric graphical interface to an agentic action surface. The tool supports end-to-end ordering, allowing scripts and language models to search for restaurants, compare deals, populate a cart, and complete the checkout process from a terminal environment.

This guide covers the technical architecture of the CLI, system prerequisites for beta access, and how to structure your agent workflows to handle real financial transactions.

System Prerequisites and Beta Access

The tool is currently in a limited beta phase with specific regional and hardware requirements. Access is restricted to developers located in the United States and Canada running macOS.

To use the interface, you must apply through the official waitlist. The application requires documentation of your intended use case, confirmation of your macOS development environment, and a link to a verified social account. Because the CLI processes live financial transactions rather than simulated sandbox requests, the vetting process limits immediate availability. If your application relies on Linux containers or Windows environments for deployment, you will need to proxy commands through a macOS host or wait for broader OS support.

Architectural Context

The command-line interface is built on top of the DoorDash Assistant Architecture, a framework detailed by the engineering team shortly before the CLI launch. This architecture utilizes a shared Model Context Protocol (MCP) layer to expose business functions like catalog search and checkout directly to external models.

By leveraging MCP, the CLI bypasses the need for fragile web-scraping or vision-based UI automation. Earlier approaches to autonomous ordering required models to guess DOM element locations or interpret visual browser states. The CLI provides explicit parameters, structured responses, and clearly defined failure states. When a model attempts to add an unavailable item or encounters a payment decline, it receives a standard terminal error stream that it can programmatically parse and resolve.

This structured approach builds upon earlier integrations, including the in-app Ask DoorDash conversational assistant and earlier official third-party connectors for models like ChatGPT and Claude. The current CLI unifies these capabilities into a single executable binary.

Integrating with Target Models

The CLI is model-agnostic, meaning any system capable of executing shell commands and parsing standard output can use it. However, the initial launch demonstrations highlighted integration with Anthropic’s ecosystem, specifically showing Claude Code performing complete orders without human intervention.

When designing agents to interact with the CLI, you must account for sequential task execution. The agent needs to query restaurant availability based on a location, retrieve menu data, map the menu items to specific command parameters, and string those commands together to build a cart. The output of the menu search command dictates the valid inputs for the cart addition command. Your agent prompt must enforce strict adherence to the exact identifiers returned by the CLI, as hallucinated menu item IDs will result in immediate API rejection.

For production workflows, you can wrap the CLI execution within autonomous AI agents that respond to specific business triggers. Common architectural patterns include triggering catering orders when a specific system KPI is met, or routing commands through internal chat applications like Slack where a bot translates natural language into direct CLI arguments.

Handling Real Transactions

Unlike standard developer APIs that default to test mode, this CLI supports real financial transactions against production infrastructure. This capability presents distinct security and logic requirements for developers.

You must implement hard limits on transaction counts and total spend within your agent scaffolding. Because an LLM dictates the cart contents and initiates the final checkout command, a logic loop or prompt injection attack could theoretically result in excessive unauthorized orders. Your orchestration layer should intercept the final checkout command to verify the total cost against a predefined budget before allowing the subprocess to execute.

Authentication relies on developer credentials bound to a valid payment method. Ensure these credentials remain out of version control and are injected at runtime via secure environment variables. If you are evaluating AI agents in a continuous integration environment, isolate the agent logic from the execution environment to prevent automated test suites from executing live orders.

Structuring Error Recovery

Agentic workflows fail frequently when real-world constraints change between steps. A restaurant might close, a delivery window might expire, or an item might go out of stock while the agent is processing the order logic.

Your application code must pipe standard error outputs directly back into the language model’s context window. Instruct the model to read error codes, adjust the parameters, and retry. If a specific menu item returns an out-of-stock error, the agent needs instructions on whether to cancel the entire order, select a substitute item based on similar metadata, or query a human operator for override instructions.

Review the DoorDash waitlist portal to submit your use case, verify your hardware compatibility, and begin testing the integration patterns in your local macOS environment.

Get Insanely Good at AI

Get Insanely Good at AI

The book for developers who want to understand how AI actually works. LLMs, prompt engineering, RAG, AI agents, and production systems.

Keep Reading