Skip to content

Tutorial

Once you have installed and configured Scion, you can start using it to run LLM-based code agents. This brief tutorial will guide you through the basics of starting and managing an agent.

To start an agent, navigate to your project directory (where you ran scion init) and use the scion start command. You provide a name for the agent and the objective you want it to accomplish.

Terminal window
scion start my-first-agent "Write a python script that prints Hello World"

The agent will be launched in the background. If you are in a git repo, it will automatically create a new git worktree and branch for its workspace, ensuring your main working directory remains clean.

You can see all agents currently managed by Scion in your project using the scion list command:

Terminal window
scion list

This will display a table showing the agent’s name, its current status (e.g., STARTING, THINKING, EXECUTING, COMPLETED), and other details like its runtime and the LLM harness it is using.

If you want to see what an agent is doing, you can view its logs:

Terminal window
scion logs my-first-agent

If the agent needs your input or confirmation (its status will be WAITING_FOR_INPUT), you can attach to its terminal session:

Terminal window
scion attach my-first-agent

When you are done interacting, you can detach from the session to leave the agent running in the background. This is done with tmux control keys, Cntrl-b, then d.

See more

You can start and attach to an agent in one go with

Terminal window
scion start --attach my-other-agent

Once the agent has completed its task, you can review the changes it made in its dedicated branch. When you no longer need the agent, you can delete it:

Terminal window
scion delete my-first-agent

This will stop the agent container and clean up its resources. By default, its git branch is removed, so be sure to merge any changes you want to keep before deleting the agent!

This gives you the very basics of the command, you can use scion --help and scion <cmd> --help to learn more about each of the commands in the tool.