Skip to navigation

Get started with your agent

Give a coding agent one prompt and it takes a project from nothing to a working Meadow call: a sandbox command and a model call. This page has the prompt, the docs files made for agents, and a rules snippet for your repository.

Next step: copy the prompt below into Claude Code, Codex, Cursor, or another coding agent that can run shell commands.

To let the agent manage sandboxes, images, keys, and usage through tools, add the MCP server.

Before you start

The agent needs three things that only you can give it:

  • The mdw CLI on your PATH. Run mdw help to check.
  • MEADOW_BASE_URL and MEADOW_API_KEY set in the shell the agent runs in.
  • One model provider key and one sandbox provider key stored with Meadow. See Provider keys. Store them yourself, in your own terminal. Do not paste a provider key into an agent chat.
export MEADOW_BASE_URL="https://api.usemeadow.ai"
export MEADOW_API_KEY="mdw_..."

Give the agent a key with the fewest scopes that work. The prompt below needs models, sandboxes, and admin. admin is needed only for the check in step 2, so you can leave it out and tell the agent that your provider keys are stored. See Authentication.

What you can install today

During the private beta nothing is on a package index. Your Meadow contact sends you the files. Clients has the detail.

ClientTodayLater
mdw CLIA binary from your Meadow contact. Put it on your PATH.Homebrew. Not published yet.
Python clientA wheel from your Meadow contact: pip install ./meadow-0.1.0-py3-none-any.whlmeadow-python on PyPI. Not published yet.
Go SDKThe source of the package, from your Meadow contact.meadow-go. Not published yet.
Node clientNone. Use the OpenAI or Anthropic SDK for model calls and the HTTP API for the rest.meadow-node on npm. Not published yet.

The names in the “Later” column do not work today. Do not run pip install meadow: that name on PyPI belongs to an unrelated project.

Model calls need no Meadow client at all. The official OpenAI and Anthropic SDKs work with two changes, the base URL and the key. The prompt uses them.

The prompt

Copy all of it.

Set up Meadow in this project and prove that it works.
Meadow is one API for model calls and for sandboxes at Daytona or Modal. One
Meadow key (it starts with mdw_) reaches every vendor whose key I stored.
The API is at https://api.usemeadow.ai unless MEADOW_BASE_URL says otherwise.
Rules for the whole task:
- Never print, log, or commit MEADOW_API_KEY or a vendor key. Read keys from
the environment only. Do not ask me to paste a key into this chat.
- Delete every sandbox you create, even when a later step fails. A sandbox
runs in my vendor account and costs money until it ends.
- Use a small, cheap model and max_tokens 32.
- If a step fails, stop and show me the command and the error, with its
request id. Do not work around it.
Steps:
1. Check the setup. Run `mdw help`. If mdw is missing, stop and ask me to
install it. Check both variables without printing the key:
test -n "$MEADOW_API_KEY" && test -n "$MEADOW_BASE_URL" && echo ready
2. Check the stored vendor keys:
mdw provider-keys list
I need one model vendor (anthropic, openai, google, xai, azure, bedrock,
vertex, openrouter, fireworks, or deepseek) and one sandbox vendor (daytona or modal). If one
is missing, stop and ask me to store it in my own terminal:
echo '{"api_key": "..."}' | mdw provider-keys set <vendor>
3. Pick a model:
mdw models list
Pick a small model. The FORMATS column says how to call it:
chat_completions and responses are the OpenAI formats, messages is the
Anthropic format.
4. Create a sandbox and run a command in it:
mdw sandboxes create --image python:3.12-slim --timeout 600 --json
Read "id" from the output and check that "status" is "running". Then:
mdw exec <sandbox id> -- python -c 'print(6 * 7)'
Expect 42.
5. Make one model call with the official SDK, in this project's language.
Change only the base URL and the key. In Python:
OpenAI formats: pip install openai
from openai import OpenAI
client = OpenAI(base_url=os.environ["MEADOW_BASE_URL"] + "/v1",
api_key=os.environ["MEADOW_API_KEY"])
client.chat.completions.create(model=..., messages=[...], max_tokens=32)
Anthropic format: pip install anthropic
from anthropic import Anthropic
client = Anthropic(base_url=os.environ["MEADOW_BASE_URL"],
api_key=os.environ["MEADOW_API_KEY"])
client.messages.create(model=..., messages=[...], max_tokens=32)
The OpenAI base URL ends in /v1. The Anthropic base URL does not.
Print the reply.
6. Clean up:
mdw sandboxes delete <sandbox id>
mdw sandboxes get <sandbox id> --json
Check that "status" is "terminated".
7. Tell me: the model you called and its reply, the output of the sandbox
command, and that the sandbox is terminated.
Docs for you: https://docs.usemeadow.ai/llms.txt lists every page, and each
page has a Markdown copy at its URL plus .md. If you cannot open a page,
ask me to paste it.

What a run looks like

We ran the commands of steps 2 to 6 on the hosted beta on 2026-11-28 (UTC), with a Google key, an Anthropic key, and a Daytona key stored. The Python scripts are the two snippets of step 5 with the model ID and one message filled in.

mdw sandboxes create --image python:3.12-slim --timeout 600 --json
mdw exec sbx_00000f3c -- python -c 'print(6 * 7)'
python openai_call.py # model gemini-3.1-flash-lite-preview
python anthropic_call.py # model claude-haiku-4-5-20251001
mdw sandboxes delete sbx_00000f3c
mdw sandboxes get sbx_00000f3c --json
42
Hello, it is nice today.
Hello, how are you doing today?
deleted sbx_00000f3c

The create printed the sandbox as JSON with "status": "running" and "provider": "daytona", and the last command printed it with "status": "terminated". The SDK versions were openai 3.60.0 and anthropic 2.14.0.

Not run: the prompt as a whole inside a coding agent. The commands were run by hand, in order.

Give your agent the docs

The docs site serves files made for agents:

AddressWhat it is
https://docs.usemeadow.ai/llms.txtThe index: one line per page, in the llms.txt format.
Any page address plus .mdThat page as Markdown.
https://docs.usemeadow.ai/openapi.yamlThe API contract, OpenAPI 3.1.

Since 2026-11-28 the docs site needs no login, so an agent can fetch these addresses itself. On 2026-11-28 all three answered 200 without a login: /llms.txt as text, /get-started/quickstart.md as Markdown, and /openapi.yaml as YAML.

Two other ways to hand over the docs:

  • The “Copy page” button at the top of each page copies the page as Markdown. Paste it into the agent.
  • Ask your Meadow contact for llms-full.txt and the OpenAPI file, and put them in your repository where the agent can read them. llms-full.txt is every page of these docs in one Markdown file, about 400 KB. The docs site does not serve it.

Rules for your repository

Coding agents read a rules file at the start of every session. Add this block to the one your agent reads:

AgentFile
Codex, Cursor, and other agents that follow agents.mdAGENTS.md in the repository root
Claude CodeCLAUDE.md in the repository root
Cursor project rules.cursor/rules/meadow.mdc
## Meadow
This project calls models and runs sandboxes through Meadow (https://docs.usemeadow.ai).
- Read `MEADOW_BASE_URL` and `MEADOW_API_KEY` from the environment. Never hardcode, print, log, or commit a key. A Meadow key starts with `mdw_`.
- Model calls use the official OpenAI or Anthropic SDK with the base URL and key changed. OpenAI SDK: base URL `$MEADOW_BASE_URL/v1`. Anthropic SDK: base URL `$MEADOW_BASE_URL`, no `/v1`. The key is the Meadow key, never a vendor key.
- Model ids are Meadow's. Run `mdw models list` or `GET /v1/models` before you use an id from a vendor's docs.
- Sandboxes cost money until they end. Set `timeout_seconds` on every create and delete every sandbox you create, also when a step fails.
- A non-zero exit code from a sandbox command is still HTTP 200. Read `exit_code`.
- Every error body has `error.type`, `error.message`, and `request_id`. Report the request id with a failed call. Retry only when the docs say the call is safe to repeat.
- Do not mint, revoke, or change API keys or stored vendor keys unless asked. A key's secret is shown once.
- The docs index for agents is https://docs.usemeadow.ai/llms.txt, and the API contract is https://docs.usemeadow.ai/openapi.yaml. If you cannot open them, ask for the page.

For a Cursor rule file, put this above the block:

---
description: How this project uses Meadow for model calls and sandboxes
alwaysApply: true
---

The file locations come from each tool’s own docs. We have not tested how each agent loads them.

Next

Operations used on this page: listProviderKeys, listModels, createSandbox, execInSandbox, createChatCompletion, createMessage, deleteSandbox, getSandbox.