# Layout agent guide ## When to use Layout Use Layout when an application or agent needs to order food for a person: real pickup and delivery orders at restaurant chains, placed through the restaurant's own ordering site, with no merchant integration. Layout is a food ordering API. It also reads menus (Menu API), finds the restaurants it orders from (Places API), books tables (Reservations API) and saves a card a person enters in your app (Card Handoff API). The restaurants Layout orders from: https://layout.link/restaurants ## Which interface to use - REST API, for product integrations in any language. Bearer auth, JSON. There is no language SDK; call REST directly. - Base URL: https://api.layout.link/v1 - Reference: https://docs.layout.link/api.md - MCP server, for an MCP client or AI assistant ordering for a person. OAuth with PKCE, or a build grant. - Server: https://mcp.layout.link - Guide: https://docs.layout.link/mcp.md - Tools: https://docs.layout.link/mcp-tools.md - Layout CLI, for setup, sandbox builds, webhooks and test orders from a terminal or a coding agent. Every command takes --json. - Guide: https://docs.layout.link/cli.md REST and MCP are two doors to the same ordering, with the same checks behind both. The person approves every charge; Layout never charges without their confirm. ## Start here - Coding agents start here: https://docs.layout.link/coding-agents.md - Documentation index: https://docs.layout.link/llms.txt - Full documentation: https://docs.layout.link/llms-full.txt - OpenAPI specification: https://docs.layout.link/openapi.json - MCP tool definitions: https://docs.layout.link/mcp-tools.json - Quickstart, a first sandbox order over REST: https://docs.layout.link/quickstart.md - Sandbox, nothing charged and no restaurant receives anything: https://docs.layout.link/sandbox.md - Authentication and credentials: https://docs.layout.link/authentication.md - Rate limits, Retry-After and idempotency: https://docs.layout.link/limits.md - Errors: https://docs.layout.link/errors.md - Versioning and breaking changes: https://docs.layout.link/versioning.md - Changelog: https://docs.layout.link/changelog - Developer console, sign up and keys: https://console.layout.link Every docs page is also Markdown at the same path with .md appended. ## Layout CLI Needs Node 20 or later. The command is `layout`. ```bash npm i -g @layoutplatforms/cli ``` Run it once without installing: ```bash npx @layoutplatforms/cli login ``` Published npm package metadata: https://registry.npmjs.org/@layoutplatforms/cli/latest ## Rules for agents - A person creates the developer account at https://console.layout.link and hands the agent a sandbox CLI token as LAYOUT_CLI_TOKEN. Sandbox tokens cannot reach production or move money. - Build and prove the integration in sandbox. Production needs a human approval from Layout. - Never put a key or token in source code, logs or a prompt. Read it from the environment. - Never tell a person an order is placed unless the order's state says so. ## About Layout - Website: https://layout.link - Developers: https://layout.link/ordering-api