# Tips & Best Practices

### Writing Effective Prompts

The agent responds to natural language, but how you phrase your request makes a real difference.

**Be specific about the task:**

| Instead of...       | Try...                                                                                                 |
| ------------------- | ------------------------------------------------------------------------------------------------------ |
| "Process this file" | "Extract all line items from this PDF and create a CSV with columns for SKU, quantity, and unit price" |
| "Check this email"  | "Read this email and draft a reply confirming we can deliver by the requested date"                    |
| "Analyse this data" | "Compare Q1 and Q2 revenue by product category and highlight anything that changed by more than 10%"   |

**Provide context upfront:**

* Upload all relevant files with your first message
* Mention which systems or data sources are involved
* Specify the output format you want (CSV, email draft, summary, etc.)

**Iterate naturally:**

The agent remembers everything in the current session. You can:

* Ask it to revise: *"Change the date format to DD/MM/YYYY"*
* Build on previous work: *"Now do the same for the March data"*
* Redirect: *"Actually, focus on the top 10 by revenue instead"*

### Understanding the Agent's Output

#### Narration

While working, the agent shows short status messages describing each step. This is useful for:

* **Knowing it's still working** on longer tasks
* **Catching mistakes early** — if the narration shows it's headed in the wrong direction, you can interrupt
* **Understanding the approach** the agent took, which helps you refine future requests

#### Todo List

For complex tasks, the agent creates a visible todo list showing its plan. Items are checked off as they're completed, giving you a clear picture of progress.

#### Skill Cards

When the agent invokes a skill, a card appears in the chat. Skill cards show:

* The skill name
* Execution progress
* Results when complete

Cards appear immediately in a loading state and update in place — nothing shifts around or disappears.

### When to Use the Agent vs. a Workflow

**Use the agent when:**

* The task is **ad-hoc or one-off** — you won't repeat it the same way every time
* The task needs **judgement or reasoning** — interpreting documents, drafting responses, comparing data
* You want to **explore or investigate** — "What's in this file?", "How does this compare to last month?"
* The task involves **multiple steps that depend on what's found** — the agent adapts as it goes

**Use a workflow when:**

* The process is **repeatable and structured** — it runs the same way every time
* You need **scheduled or triggered execution** — process every incoming email, run every morning at 9am
* **Volume is high** — processing hundreds of orders, invoices, or documents per day
* You need **deterministic, auditable results** — every run follows the exact same logic

**Use both together:**

* Use the agent to **prototype and test** a process, then convert it to a workflow once it's proven
* Use workflows for the **high-volume automation** and the agent for **exception handling and edge cases**
* Use skills to **bridge the gap** — a skill created in the agent can encode a process that runs reliably every time

### Common Pitfalls

* **Being too vague.** The agent will try its best, but vague instructions lead to generic results. Specificity wins.
* **Not uploading files upfront.** If the agent needs data, give it the data in your first message rather than making it ask.
* **Expecting workflow-level determinism.** The agent makes decisions — it might take a different approach to the same task on a different day. If you need consistency, use a workflow.
* **Ignoring the narration.** The narration tells you what the agent is doing. If it's going wrong, catch it early and redirect.


---

# Agent Instructions: 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:

```
GET https://docs.lleverage.ai/operator-agent/tips-and-best-practices.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
