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

# Creating Effective Agents

> A comprehensive guide to designing powerful AI agents in Demiurg

## Agent design fundamentals

Creating an effective agent requires thoughtful consideration of purpose, knowledge, and personality. The quality of your agent depends significantly on the clarity and specificity of your description.

<Info>
  Demiurg interprets your instructions literally, so precision matters.
</Info>

## Essential elements

<CardGroup cols={2}>
  <Card title="Clear purpose" icon="bullseye">
    **Effective:** "A financial analyst specialized in cryptocurrency market trends"\
    **Less effective:** "An agent that knows about money and investing"
  </Card>

  <Card title="Knowledge domains" icon="brain">
    **Effective:** "Knowledgeable about SEO, content marketing, and social media analytics"\
    **Less effective:** "Knows about marketing"
  </Card>

  <Card title="Personality" icon="user">
    **Effective:** "Professional but approachable, uses simple language to explain complex concepts"\
    **Less effective:** "Nice and helpful"
  </Card>

  <Card title="Core capabilities" icon="gears">
    **Effective:** "Able to analyze financial statements, identify trends, and suggest investments based on risk tolerance"\
    **Less effective:** "Can help with finances"
  </Card>
</CardGroup>

## Crafting your description

<AccordionGroup>
  <Accordion title="1. Define the role" icon="id-badge" defaultOpen>
    "I need an AI research assistant specialized in biomedical literature analysis."
  </Accordion>

  <Accordion title="2. Specify knowledge areas" icon="book">
    "Should be knowledgeable about recent advancements in immunology, vaccine development, and clinical trial methodologies."
  </Accordion>

  <Accordion title="3. Define communication style" icon="comments">
    "Should communicate professionally while making complex concepts accessible, ask clarifying questions, and provide balanced perspectives."
  </Accordion>

  <Accordion title="4. List core capabilities" icon="list-check">
    "Should be able to:

    * Summarize research papers and extract key findings
    * Compare methodologies across studies
    * Identify gaps in the literature
    * Suggest research directions
    * Format citations in various styles"
  </Accordion>

  <Accordion title="5. Set boundaries" icon="circle-exclamation">
    "Should acknowledge when information may be outdated and avoid predicting specific research outcomes or providing medical advice."
  </Accordion>
</AccordionGroup>

## Specialized agent types

<CardGroup cols={2}>
  <Card title="Customer service" icon="headset">
    * Define common issues
    * Specify tone
    * Include troubleshooting steps
    * Set escalation criteria
  </Card>

  <Card title="Creative assistant" icon="paintbrush">
    * Define stylistic preferences
    * Specify formats
    * Include output examples
    * Set creativity parameters
  </Card>

  <Card title="Research assistant" icon="magnifying-glass">
    * Define methodologies
    * Specify interpretation approaches
    * Include citation formats
    * Set evidence standards
  </Card>

  <Card title="Educational tutor" icon="graduation-cap">
    * Define teaching approach
    * Specify explanation depth
    * Include assessment methods
    * Set progression strategies
  </Card>
</CardGroup>

## Refinement process

1. Test extensively with various queries
2. Identify knowledge or capability gaps
3. Note misconceptions or incorrect assumptions
4. Revise your description accordingly
5. Consider the Code Editor for precise control

<Warning>
  Create a new version when revising rather than overwriting your original to compare performance.
</Warning>

## Best practices and pitfalls

| Best Practices                      | Common Pitfalls                   |
| ----------------------------------- | --------------------------------- |
| Focus on a specific purpose         | Creating overly broad agents      |
| Use clear, unambiguous language     | Using vague instructions          |
| Include examples of desired outputs | Assuming unstated capabilities    |
| Test with edge cases                | Overlooking communication style   |
| Gather user feedback                | Failing to test various scenarios |

<Tip>
  Agent creation is iterative. Continuous refinement based on actual usage leads to better performance.
</Tip>

## Next steps

<CardGroup cols={2}>
  <Card title="Prompt Engineering Tips" icon="wand-magic-sparkles" href="/agents/prompt-tips">
    Advanced techniques for crafting effective agent descriptions
  </Card>

  <Card title="Code Editor" icon="code" href="/agents/code-editor">
    Precise control over your agent's behavior and capabilities
  </Card>
</CardGroup>
