Hand off a task
Choose what an agent works on and write a first message it can finish without guessing.
A Kliff agent works on its own computer in the cloud. It clones your repositories there, reads and changes code, runs commands, and keeps its files between messages. You do not have to watch it, which is the point, but it also means your first message has to carry what you would otherwise explain as you went. This lesson covers the choices you make when you start an agent and how to write a message it can finish.
Choose what it works on
Open Agents. Before you type, look at the chips in the composer.
- Works on sets the code. Choose one repository, a project (which brings up to ten repositories), or No repository for work that needs no code, such as research. If no repository is listed, select Connect GitHub or Connect GitLab there first.
- Machine sets the size of the agent's computer: Small, Standard, Large, or Extra large. Standard is the default. A larger computer uses more credits for each hour it is awake, so pick one only when the work needs it, such as a big build.
- Permission mode sets how freely the agent acts. It starts on Auto. A later lesson covers Plan and Ask.
Choosing a project instead of a list of repositories brings the project's instructions and files along. The next lesson covers what that adds. You can also start from a project's own page.
Write a message it can finish
The agent reads your message, then works through it step by step without you. The more of these it can find in the message, the less it has to guess:
- The outcome. What should be true when it is done.
- Where to look. A file, a folder, a page, or an error message.
- Constraints. What not to touch, which approach you prefer, what must keep working.
- How to check. A test to run, a command to try, a page to load.
- What to hand back. An explanation, a list of findings, or a draft pull request.
Compare these two:
The agent is named after the first line of your message, so a short first line that says what the task is makes it easy to find later. A message can be up to 20,000 characters.
Add what words cannot carry
Some things are faster to show than to describe. Select Add files and context in the composer to:
- Upload file: attach up to 5 files, each up to 10 MB. Images can be PNG, JPEG, GIF, or WebP. Plain text files work too, such as a log or a spec.
- Take a screenshot of what you are looking at.
- Mention a file or doc, or type
@in the message, to point at a repository or a file in it.
A screenshot of a broken layout or a pasted stack trace saves the agent several steps of searching.
Follow along and step in
Press Return or select Send message. The agent starts its computer, clones the repositories, and gets to work. Its output streams in as it goes.
While it works, the agent shows as Working. When it is waiting for your next message, it shows Ready. After 10 minutes with nothing to do, it goes to sleep, and its computer stops using credits. Send a message to wake it, and it picks up where it left off.
To change course, stop the current turn with the stop button in the composer, then send your correction. A short follow-up such as "Leave the tests in place, only change the query" is usually all it takes. See Agent statuses for what each status means and why a turn can stop on its own.
Key points
- Works on decides the code the agent clones: one repository, a project of up to ten, or none.
- A good first message names the outcome, where to look, the constraints, how to check, and what to hand back.
- Attach screenshots, logs, or files when they explain the problem faster than words.
- The agent sleeps after 10 idle minutes and wakes when you message it, with its files intact.