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

# MARS Quick Development

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

## Write your first 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={"languages":{"custom":["/languages/python-typed.json"]}}
ssh jetson1@<YOUR-ROBOT-IP>
```

A skill is a Python class the agent can call, and it can run any code you like — query an API, or drive the robot's body. Let's give MARS a victory spin. Create `~/innate-os/workspace/custom_skills/victory_spin.py`:

```innatepy theme={"languages":{"custom":["/languages/python-typed.json"]}}
from innate import Mobility, Skill

class VictorySpin(Skill):
    mobility: Mobility

    def guidelines(self) -> str:
        return ("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.")

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

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

Save it. The runtime watches this directory and hot-reloads within a second or two. 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.

## Hand it to an agent

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

```innatepy theme={"languages":{"custom":["/languages/python-typed.json"]}}
from custom_skills.victory_spin import VictorySpin
from innate import Agent, InputRef, SkillRef
from innate_skills.navigate_to_position import NavigateToPosition
from innate_skills.wave import Wave
from inputs.micro_input import MicroInput

class HelloWorld(Agent):
    @property
    def id(self) -> str:
        return "hello_world"

    @property
    def display_name(self) -> str:
        return "Hello World"

    def get_skills(self) -> list[SkillRef]:
        return [VictorySpin, NavigateToPosition, Wave]

    def get_inputs(self) -> list[InputRef]:
        return [MicroInput]

    def get_prompt(self) -> str:
        return """
You are a friendly greeting robot whose sole purpose is to say hello world to the user!

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.
- Do a victory spin when the user seems happy to see you.
- Don't navigate, just turn around if you don't see the user.
"""
```

`wave` and `navigate_to_position` [ship with the robot](/software/skills#what-ships-with-the-robot); `VictorySpin` is the one you just wrote. The agent picks among all three on its own.

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, and your agent appears on the Home screen (pull down to refresh if needed): start it, sit in front of the robot, and observe! 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!

## Create your first code-defined skill

Innate robots can also run any kind of code in the embodied Innate agent, which can be used to query APIs online or run custom routines onboard.

As an example, let's give MARS a skill that reads your latest Gmail messages. Grab the complete `RetrieveEmails` implementation from the [External Services worked example](/software/skills/code-defined-skills/external-services#worked-example-retrieveemails) and save it as `~/innate-os/workspace/custom_skills/retrieve_emails.py` on the robot — it's copy-paste-ready, you only need to fill in your Gmail address and an app password.

Then run the skill from an agent that can query it:

```innatepy theme={"languages":{"custom":["/languages/python-typed.json"]}}
from innate import Agent, SkillRef
from custom_skills.retrieve_emails import RetrieveEmails

class EmailAssistant(Agent):
    @property
    def id(self) -> str:
        return "email_assistant"

    @property
    def display_name(self) -> str:
        return "Email Assistant"

    def get_skills(self) -> list[SkillRef]:
        return [RetrieveEmails]

    def get_prompt(self) -> str:
        return """
You are an email assistant. 
When the user sits in front of you, you should tell them what their last email is
"""
```

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>
