> ## Documentation Index
> Fetch the complete documentation index at: https://innateinc-docs-skills-0-7-interface.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# MARS Quick Development

Learn to write your first code-defined skill, hand it to your first agent, train your first manipulation model, and put the pieces together

## Create your first code-defined skill

Now that you know the basics, you can start building for MARS with the SDK. On the app, go to **Configuration** -> **WiFi** and read the IP of the robot.

All your code lives and runs **on the robot**, so the comfortable way to work is to open your editor (VSCode, Cursor, Windsurf, ...) directly on MARS over Remote SSH — full file tree, search, and terminal, as if the robot's filesystem were local. [Development Setup](/software/development-setup) gets you there in a few minutes. In a hurry? A plain terminal works too:

```bash theme={null}
ssh jetson1@<YOUR-ROBOT-IP>
```

Skills are Python classes the agent can call, and they can run any code you want — query an API online, or drive the robot's own body. Let's give MARS a victory spin. Create `~/innate-os/workspace/custom_skills/victory_spin.py`:

```python theme={null}
from innate import Mobility, Skill


class VictorySpin(Skill):
    """Spin the robot in place to celebrate. Use when something goes well
    and the robot should show it — spins is how many full turns, 1 to 3."""

    mobility: Mobility

    def execute(self, spins: int = 1):
        for _ in range(2 * min(int(spins), 3)):
            self.mobility.rotate(3.14)  # half turn, blocking; two = one spin
        return "Spun with joy"
```

Three things come from that class with no boilerplate: the **class name** is the skill name (`victory_spin`), the **docstring** is what the agent reads to decide when to call it, and the **`execute()` signature** is the parameter schema. `mobility: Mobility` is the whole wiring for the base.

Save the file — the runtime watches this directory and hot-reloads it within a second or two (the same goes for any later edits). Open the app's **Skills** tab and run `victory_spin` ([manual triggering](/software/skills/manual-triggering)) to watch it move, with no agent involved yet.

Skills can also reach off the robot: for one that queries an external API, see the [`RetrieveEmails` worked example](/software/skills/code-defined-skills/external-services#worked-example-retrieveemails), a copy-paste-ready skill that reads your latest Gmail messages.

## Create your first agent

Skills get interesting when an agent decides on its own to use them. Next door in `~/innate-os/workspace/custom_agents/`, create a `cheerful_greeter.py` agent file:

```python theme={null}
from innate import Agent, InputRef, SkillRef
from custom_skills.victory_spin import VictorySpin

class CheerfulGreeter(Agent):
    @property
    def id(self) -> str:
        return "cheerful_greeter"

    @property
    def display_name(self) -> str:
        return "Cheerful Greeter"

    def get_skills(self) -> list[SkillRef]:
        return [
            VictorySpin,
            "innate-os/navigate_to_position",
            "innate-os/wave",
        ]
    def get_inputs(self) -> list[InputRef]:
        return ["micro"]

    def get_prompt(self) -> str:
        return """
You are a friendly greeting robot whose sole purpose is to welcome the user and celebrate with them!

Your personality:
- You are a nice and cheerful robot.

Instructions:
- When you see a user in front of you, say "hello world" and wave at the user.
- When they tell you good news, celebrate it physically with a victory spin.
- Don't navigate, just turn around if you don't see the user.
"""
```

"*wave*" and "*navigate\_to\_position*" are basic skills that come already created for the robot; `VictorySpin` is the one you just wrote. Naming the class is preferred — your editor catches a rename or a typo before the robot does. Full ID strings work too (`"local/victory_spin"`), prefixed by where the skill comes from: your own skills are `local/<name>`, shipped ones are `innate-os/<name>`.

Agents hot-reload the same way skills do. Open the app, and your agent appears on the Home screen (pull down to refresh if needed): start it, sit in front of the robot, and observe! Tell it in chat that you just merged a big PR, and it should decide on its own that the situation calls for a victory spin. If it ever doesn't show up, `innate service restart` is the reliable fallback.

<iframe width="100%" height="420" src="https://www.youtube.com/embed/b7cNKEcER24" title="Run your first agent demo" frameBorder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" allowFullScreen />

This is the same agent structure dissected method-by-method in the reference docs:

<Card title="Anatomy of an Agent" icon="robot" href="/software/agents/definitions">
  Every method explained, plus a copy-paste template for new agents.
</Card>

## Train your first manipulation model for a skill

Innate Robots arms can be trained using state-of-the-art manipulation AI models, running straight on the onboard computer. For MARS, we developed an improved version of ACT (Action Chunking with Transformers) with a reward model — see the [training overview](/training/overview) for details.

To train it, you can use the app to collect episodes of data for imitation learning. I.E. you will be repeatedly performing the task with the robot for a given amount of repetitions to make sure it learns it the way you want.

In the app, go to Skills -> Physical, create a new skill, name it, and press "Add Episodes".

You demonstrate the task with the **leader arm** — a teleoperation controller that MARS mirrors; if you're unsure what it is or why it has no camera and a trigger instead of a gripper, see [What the leader arm is](/robots/mars/control-and-connectivity#what-the-leader-arm-is-and-isnt).

Then, arm the arm and press record to collect an episode. Ideally, all episodes should start in a similar position and end in a similar position, following roughly the same movement. Start with very similar trajectories to accomplish the goal while making sure that the arm camera has the objective of motion relatively in sight. More guidelines on training can be found in [Data Collection](/training/data-collection).

Below, an example of training the arm to pick up a cherry.

<iframe width="100%" height="420" src="https://www.youtube.com/embed/dr1TuHpc_94" title="Train your first manipulation model" frameBorder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" allowFullScreen />

Once you collected around 50 episodes, you can start considering stopping data collection. We can easily train your dataset for you if you go to the Training tab and press Train with whole dataset. You can also use the episodes for yourself by ssh-ing in the robot and getting them there.

Once the model is trained (which takes up to 4 hours), you can get it back on your robot and then trigger it from Manual Control Screen!

To learn more about the Skills SDK and go further:

<CardGroup cols={2}>
  <Card title="Skills" icon="wrench" href="/software/skills">
    See policy-defined and code-defined skills with interface references.
  </Card>

  <Card title="Advanced Development" icon="code" href="/software/advanced-development">
    Modify ROS2 packages, recompile, and take full control of MARS.
  </Card>
</CardGroup>
