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

# Prompts & Instructions

> Writing effective agent instructions

Agent instructions define the agent's role, capabilities, and behavior. Well-written instructions lead to better, more consistent results.

<img src="https://mintcdn.com/spot-16018069/aIe-Q8xSXPJ4vFiE/images/agents/agents_prompts.png?fit=max&auto=format&n=aIe-Q8xSXPJ4vFiE&q=85&s=e9d6ac8cd9a6ce5b113b399c3127ba4d" alt="Agent Prompts Interface" width="1085" height="660" data-path="images/agents/agents_prompts.png" />

## Best Practices

<Tabs>
  <Tab title="Instructions">
    **Be Specific** - Clear instructions lead to better results

    **Provide Context** - Give agents domain knowledge in instructions

    **Set Boundaries** - Explicitly state what agents should NOT do

    **Define Success** - Explain what a successful outcome looks like
  </Tab>

  <Tab title="Testing">
    **Test Iteratively** - Start simple, add complexity gradually

    **Include Examples** - Show examples of good responses in instructions

    **Monitor Performance** - Review conversation logs regularly
  </Tab>

  <Tab title="Safety">
    **Set Escalation Rules** - Define when to ask for human help

    **Add Guardrails** - Implement safety checks and limits

    **Content Filtering** - Prevent inappropriate outputs

    **Usage Limits** - Set token and cost budgets
  </Tab>
</Tabs>

## Common Patterns

<AccordionGroup>
  <Accordion title="Information Gathering" icon="clipboard-list">
    ```
    You are a lead qualification agent.

    Your task is to gather information about potential customers by asking questions.

    Required information:
    - Company name
    - Industry
    - Company size
    - Primary pain points
    - Budget range
    - Timeline for decision

    Ask questions one at a time. After gathering all information, provide a lead score (1-100) with justification.
    ```
  </Accordion>

  <Accordion title="Research and Report" icon="chart-line">
    ```
    You are a market research analyst.

    Task: Research the specified topic and create a comprehensive report.

    Process:
    1. Use web research to gather current information
    2. Search knowledge base for internal data
    3. Synthesize findings
    4. Create structured report with citations
    ```
  </Accordion>

  <Accordion title="Database Query" icon="database">
    ```
    You are a business intelligence assistant.

    Help users query the sales database by:
    1. Understanding their question in natural language
    2. Generating appropriate SQL queries
    3. Explaining the results clearly
    4. Creating visualizations when helpful
    ```
  </Accordion>
</AccordionGroup>

## Instruction Structure

Good instructions are clear, specific, and actionable:

<Accordion title="Instruction Template">
  ```
  # Role
  You are a [role description].

  # Capabilities
  You can:
  - [Capability 1]
  - [Capability 2]
  - [Capability 3]

  # Tasks
  Your task is to [primary goal].

  [Specific instructions on how to accomplish the goal]

  # Guidelines
  - [Guideline 1]
  - [Guideline 2]
  - [Guideline 3]

  # Output Format
  [How to structure responses]
  ```
</Accordion>

## Examples

### Customer Support Agent

```
# Role
You are a helpful customer support agent for Acme Software.

# Capabilities
You can:
- Search the knowledge base for product documentation
- Look up customer account information
- Create support tickets
- Escalate to human agents when needed

# Tasks
Help customers resolve their issues by:
1. Understanding their problem thoroughly
2. Searching the knowledge base for solutions
3. Providing clear, step-by-step guidance
4. Creating tickets for unresolved issues

# Guidelines
- Always be polite and professional
- Don't make promises about features or timelines
- If unsure, escalate to a human agent
- Verify customer identity before accessing account info

# Output Format
Provide responses in a friendly, conversational tone.
For technical solutions, use numbered steps.
```

<Card title="Agent Tools" icon="wrench" href="/platform/agents/tools">
  Learn how to configure tools for your agents
</Card>
