> ## Documentation Index
> Fetch the complete documentation index at: https://docs.aihubmix.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Write effective tasks

> Practical tips for giving tasks to the Agent: state the goal and definition of done, provide context, split large tasks, choose the right permissions, automate repeated work, and have the Agent open a PR.

When your task is clear, the Agent takes fewer wrong turns and stops to ask you less often. The tips below apply to most sessions.

## State the goal, scope, and definition of done

Tell the Agent what to achieve, where to make changes, and how to tell when it is done. Compare:

* "Fix the login page."
* "Fix the misaligned input fields on the login page in Safari. Only change the login page styles and leave other pages alone. When you're done, run the existing tests and add a test that covers Safari."

The second version gives the goal, the boundaries, and how to verify the result. The Agent does not have to guess, and it knows when to stop and hand the work back to you.

## Provide relevant files and links

* **Choose the right project first** so the Agent works in the correct code and environment.
* Name the relevant files, folders, error messages, or documentation links in the task.
* For UI issues, attach a screenshot or use **Take a screenshot** in the input box. Send logs, design files, and similar material as attachments. See [Start a session](https://docs.aihubmix.com/en/cloud/sessions/start-a-session.md).
* Save any secrets the Agent will need to the project's secrets and environment variables in advance, so it does not have to stop and ask you for them. See [Projects and environment setup](https://docs.aihubmix.com/en/cloud/environments/projects.md).

## Split large tasks

A session usually works best when it focuses on one thing. Split a large request into several sessions, for example ask the Agent to research options first, then start the implementation based on its findings.

* When parts of a task are independent, say which parts can run in parallel. For complex tasks, the Agent can start [subagents](https://docs.aihubmix.com/en/cloud/sessions/subagents.md) to work on them at the same time and combine the results automatically when they all finish.
* To try a different approach, **Fork** a new session from a reply. The original session is not affected.
* When the Agent goes off track, you do not have to wait for it to finish. Use **Steer** to correct it right away, or edit an earlier message and run it again. See [Work with the Agent](https://docs.aihubmix.com/en/cloud/sessions/work-with-agent.md).

## Choose the right permissions

New sessions default to **Full access**, so the Agent does not ask you about each step. This suits tasks you want it to complete on its own on the cloud server. Sessions on the cloud server never touch your computer.

Switch to **Ask for approval** or **Approve for me** in these cases:

* The session runs on your own computer and involves important files or system settings.
* The project has secrets you do not want the Agent to use freely. With Full access, the Agent can read all secrets in the project.
* The task connects to external services or websites, and you want to confirm before it acts.

## Use scheduled tasks for repeated work

For work that needs to happen regularly, such as "Check for dependency updates every weekday at 9 AM", tell the Agent in plain language in a session. It drafts a scheduled task, which takes effect only after you click **Create**. For follow-ups tied to the current session, such as "Check the deployment again in 30 minutes", ask the Agent to set a session timer. Scheduled tasks run on the cloud server and keep running when your computer is off. See [Scheduled tasks](https://docs.aihubmix.com/en/cloud/automation/scheduled-tasks.md).

## Have the Agent open a PR

When the changes are done, ask the Agent in the session to commit, push, or create a PR, for example "Create a PR once the tests pass, with a title that describes the fix." The default behavior comes from the ship behavior in project settings: create a PR, push a branch, or commit following a prompt you write. For uploaded projects without a linked remote repository, changes are delivered as a patch. To review changes and deliver results, see [Review and deliver results](https://docs.aihubmix.com/en/cloud/sessions/review-and-deliver.md).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.