# Coding Agents

> Give a coding agent the menlo-sdk skill and the docs, so the scripts it writes use the SDK the way it expects.

- Page: https://docs.menlo.ai/sdk/coding-agents
- Section: Python SDK
- Previous: [Without the SDK](https://docs.menlo.ai/sdk/without-the-sdk.md)
- Next: [Examples](https://docs.menlo.ai/sdk/examples.md)

A coding agent writes better scripts for Asimov when it knows how the SDK behaves: which
command does what, what the robot must be doing first, and that guards are the script's job.
Two things give it that: the **menlo-sdk skill**, a usage guide the agent loads when you ask
it for robot code, and the docs as plain text in **llms.txt**.

> [!WARNING]
>
> **The agent drives a real robot**
>
> A script an agent writes moves the robot like any other script. Read it before you run it,
> and follow [Safety](https://docs.menlo.ai/sdk/safety.md): support the robot, hanging from its gantry hook or seated
> on a stool or bench, and keep the E-Stop in Asimov Manager open, or be ready to cut power at
> the battery unit.

## Install the Skill

The skill is in the [skills/menlo-sdk](https://github.com/menloresearch/menlo-sdk/tree/main/skills/menlo-sdk)
folder of the SDK repository, in the Agent Skills format, so most coding agents can load it.

### Claude Code

Add the repository as a plugin marketplace, then install the plugin:

```text
/plugin marketplace add menloresearch/menlo-sdk
/plugin install menlo-sdk@menlo
```

`/plugin` then lists `menlo-sdk@menlo`, and the skill is `menlo-sdk:menlo-sdk`. To get a
newer version later, run `/plugin update menlo-sdk@menlo`.

### Codex, pi, oh-my-pi and Other Agents

Install it with the `skills` installer:

```bash
npx skills add menloresearch/menlo-sdk
```

It copies the skill to `~/.agents/skills/menlo-sdk`, the folder Codex, pi and oh-my-pi read,
and links it for the other agents it finds on your computer. Add `-g -y` to skip the
questions.

### By Hand

Copy the `skills/menlo-sdk` folder from the repository into the skills folder your agent
reads: `~/.agents/skills/` for Codex, pi and oh-my-pi, or `~/.claude/skills/` for Claude
Code.

## Try It

Ask your agent for a script, for example:

```text
Using menlo-sdk, walk my Asimov forward at 0.3 m/s for 3 s and end balancing in place.
```

With the skill, the answer uses the SDK's own calls:

```python
robot.set_velocity(vx=0.3, duration=3.0)  # walks for 3 s, then sends zero velocity
robot.balance()                           # stays in MOVE, balancing in place
```

## What the Skill Teaches

- How to connect in each [connection mode](https://docs.menlo.ai/sdk/connection-modes.md) and what each one carries.
- The commands, what each waits for, and the errors they raise.
- That the SDK does not refuse a command because of what the robot reports, so a script
  writes its own guard from `robot.get_state()`, as
  [guard.py](https://docs.menlo.ai/sdk/safety.md#write-your-own-guard) does.
- The order to bring the robot up and down: support it before MOVE to STAND and before DAMP.
- Where the full documentation is.

## Give an Agent the Docs

For an agent without the skill, or for questions the skill does not cover, point it at the
docs as plain text:

| File | What it holds |
| - | - |
| [llms.txt](https://docs.menlo.ai/llms.txt) | An index of every docs page, one line each, with a short glossary; the SDK pages are under "Python SDK" |
| [sdk/llms-full.txt](https://docs.menlo.ai/sdk/llms-full.txt) | The full text of every SDK page in one file |
| [llms-full.txt](https://docs.menlo.ai/llms-full.txt) | The full text of every docs page in one file |

Each page is also available as Markdown: add `.md` to its URL, for example
[sdk/quickstart.md](https://docs.menlo.ai/sdk/quickstart.md). Other sections with more
than one page have their own `llms-full.txt` under the section's URL, and llms.txt links to
each one.

## Related

- [Quickstart](https://docs.menlo.ai/sdk/quickstart.md): the first walk, step by step
- [Safety](https://docs.menlo.ai/sdk/safety.md): what to check before a script moves the robot, and writing a guard
- [Examples](https://docs.menlo.ai/sdk/examples.md): the scripts the skill points to
