> For the complete documentation index, see [llms.txt](https://docs.lleverage.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.lleverage.ai/run-operations/agent/tips-and-best-practices.md).

# Working well with the Agent

Practical guidance for getting dependable operational work from the Agent and improving repeated work without relying on prompt tricks.

Good Agent use is less about clever prompting and more about **clear outcomes, trustworthy sources, visible boundaries and reusable corrections**.

## 1. Start with the business outcome

Describe the job in the language the operation uses.

Prefer:

> Check which open purchase orders are missing a confirmed delivery date and prepare the supplier follow-up.

over:

> First call tool A, then query table B, then loop over every row, then...

Specify the sequence only when the sequence itself is a business requirement.

## 2. Make source authority explicit

Operational sources often disagree.

If one source should win, state that rule or capture it durably in the Skill or maintained setup.

Examples:

* ERP owns the current order quantity.
* The signed policy outranks an old presentation.
* A customer-specific product mapping outranks generic industry guidance.
* A remembered preference does not outrank a current system record.

## 3. Ask for evidence, not confidence

For important work, ask the Agent to make the basis of the result inspectable.

Useful evidence can be:

* the records it checked;
* the document or page supporting a value;
* the calculation behind a recommendation;
* the file it produced;
* the system change that now exists;
* the unresolved item that still needs a person.

A fluent answer is not itself proof.

## 4. Make the human boundary clear

When ambiguity or authority matters, the Agent should surface it rather than invent a resolution.

Tell it what it may decide, what it may prepare and what still needs a person.

Some boundaries can also be enforced through action approvals, Workflow Requests or the structure of a Skill.

## 5. Give correction feedback that can be acted on

When an output is wrong, include:

* **what is wrong**;
* **where it appears**;
* **which source or example should have been used**;
* **what you expected instead**.

For generated documents, inspect the document itself. Check the operational values, structure, formatting and any term or commitment that will leave the organisation.

## 6. Separate one-off exceptions from recurring rules

If this run should intentionally differ from the normal method, state the exception for this task.

If the same exception keeps returning, improve the maintained setup.

Repeated corrections belong in the narrowest durable layer that owns them:

* Skill;
* Table or source data;
* Knowledge;
* Memory;
* Project description;
* Workflow;
* Connection or approval policy.

## 7. Use Skills for recurring methods

A Skill is the right place for a reusable way of doing work without turning the whole task into a rigid Workflow.

Let the Agent use available Skills when they fit. If the route is ambiguous or one method must be followed, invoke the Skill deliberately.

Builders can test reviewed Skill changes on representative cases before publishing them.

## 8. Use Workflows for stable background paths

When the path is known and repeatability matters, move that part into a Workflow.

That does not mean abandoning the Agent. A common pattern is:

**Agent investigation → Workflow execution → human Request if needed → Workflow continues → result back to the operator**

## 9. Keep one session scoped to one outcome

Continue when the work is still the same job. Start a new session for a genuinely new outcome.

Project context, Skills and Memory are the durable layer. The transcript is not.

## 10. Improve from real use

Session feedback, repeated corrections, failed cases and recurring manual intervention are useful evidence.

Use that evidence to improve the configuration and regression-test what changed. Do not turn every bad result into another sentence in a giant prompt.

## When something goes wrong

Diagnose the layer before changing the setup or retrying repeatedly.

* If the **answer or output is wrong**, inspect the source evidence, tool activity and result in the [Session workspace](/run-operations/agent/session-workspace.md).
* If a **system action is unavailable or blocked**, check Project scope, the relevant Connection and [Access and approvals](/run-operations/agent/agent-context/access-and-approvals.md).
* If the **same mistake keeps recurring**, correct the durable layer that owns the rule and test the changed Skill or Workflow on representative cases.
* If a **response fails**, use **Try again** when it is safe to repeat the Agent response. Do not repeat consequential external actions blindly.
* If the problem needs deeper diagnosis, continue with [Troubleshooting and support](/reference/troubleshooting-and-support.md).

For consequential work, verify the resulting state in the system or maintained source that owns it.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.lleverage.ai/run-operations/agent/tips-and-best-practices.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
