This guide covers everything you need to know about creating and improving AI agents on Mieza.

## Prerequisites

Before you begin, ensure you have:
- A Mieza account ([Sign up here](https://mieza.ai/signup))
- A clear idea of what you want your agent to do

## Understanding Your Agent's Purpose

Start by clearly defining what you want your agent to accomplish. A well-defined purpose is crucial for success.

### Key Questions to Answer:
- **What specific task** should the agent perform?
- **Who will use** the agent?
- **What inputs** will the agent receive?
- **What outputs** do you expect?

### Example Purpose Statement
"Create an agent that explains game theory concepts to non-experts, using real-world examples from business, sports, and everyday life to make abstract concepts concrete and actionable."

## Creating Your Agent

1. Log into your Mieza dashboard
2. Click **"Create New Agent"** button
3. Fill in the required fields:

### Basic Information
- **Name**: A short, memorable name (max 20 characters)
- **Tagline**: Brief one-line description (max 50 characters)  
- **Description**: Detailed explanation of what your agent does (min 500 characters)
- **Avatar**: Upload an image to represent your agent (max 2MB)

### Writing Instructions

Your instructions are the foundation of your agent's behavior. Great agents start with great instructions.

#### Structure Your Instructions

Organize your instructions with:
- **Primary Goal**: What the agent should accomplish
- **Constraints**: What it should avoid
- **Behavior Guidelines**: How it should interact
- **Knowledge Scope**: What it knows about

#### Good Instructions Example
```
You are a game theory professor with expertise in strategic reasoning and decision-making. Your students come from diverse backgrounds, some with mathematical training and others without.

When explaining concepts:
- Start with an intuitive explanation using everyday examples
- Build up to more formal definitions only when needed
- Use concrete scenarios (like business negotiations, auctions, or games) to illustrate abstract ideas
- If asked about mathematical aspects, first explain the intuition, then introduce formulas

Your tone should be patient and encouraging. Remember that game theory can seem intimidating at first, so make it approachable. When someone seems confused, try explaining the same concept from a different angle.

Focus on helping people understand how strategic thinking applies to their real-world decisions, not just academic theory.
```

#### What Makes Instructions Effective

**Do:**
- Be specific about the agent's expertise
- Define clear boundaries for its knowledge
- Include examples of desired behavior
- Specify the tone and style

**Avoid:**
- Vague language ("be helpful")
- Contradictory instructions
- Unrealistic expectations
- Over-complicated rules

### Suggested Prompts

Add up to three example prompts that showcase what your agent can do:
- Suggestion 1: "What is Nash Equilibrium?"
- Suggestion 2: "Explain the prisoner's dilemma"
- Suggestion 3: "How does game theory apply to business?"

### Configuration Options

- **Model**: Currently supports GPT-4o (default)
- **Tools**: Enable image generation if your agent needs to create visuals
- **Visibility**: 
  - Public: Discoverable by everyone
  - Unlisted: Accessible via direct link only
  - Private: Only you can access

## Testing Your Agent

Before making your agent public:

1. **Test Core Functionality**: Verify it handles its primary purpose well
2. **Try Edge Cases**: See how it responds to unexpected inputs
3. **Check Consistency**: Ensure similar questions get consistent answers
4. **Validate Boundaries**: Confirm it stays within its defined scope

### Example Test Scenarios
- Basic query: "What is game theory?"
- Complex request: "Explain how auction theory relates to mechanism design"
- Out of scope: "Write me a poem about flowers"

## Improving Your Agent

Creating an agent is just the beginning. Here's how to make it better:

### Iterative Refinement

1. **Start Simple**: Begin with basic instructions
2. **Observe Performance**: Note where the agent struggles
3. **Identify Patterns**: Find common issues or misunderstandings
4. **Update Instructions**: Refine based on actual usage
5. **Test Changes**: Verify improvements don't break existing functionality

### Common Improvements

**If responses are too generic:**
- Add more specific examples in instructions
- Define the agent's unique perspective
- Include domain-specific knowledge

**If the agent goes off-topic:**
- Add clearer boundaries
- Specify what topics to avoid
- Include redirect phrases for out-of-scope queries

**If responses are inconsistent:**
- Simplify complex instructions
- Remove contradictory guidance
- Focus on core behaviors

### Advanced Techniques

**Role Definition**: Give your agent a clear identity and context
```
You are an experienced financial advisor who specializes in retirement planning. You've helped hundreds of families prepare for retirement over your 15-year career. You understand both the mathematical aspects of financial planning and the emotional challenges people face when thinking about their future.
```

**Conditional Responses**: Adapt to different situations
```
When someone asks about investment options:
- If they mention they're new to investing, start with basic concepts like "What is a stock?" and "What is a bond?"
- If they demonstrate knowledge of financial terms, you can discuss more sophisticated strategies like asset allocation and tax optimization
- Always check their risk tolerance before making any suggestions
```

**Output Structure**: Create consistent, well-organized responses
```
When analyzing a financial situation:
1. Acknowledge what the person has told you
2. Identify the key factors affecting their situation
3. Present 2-3 options with clear pros and cons
4. Recommend a specific path forward with reasoning
5. Suggest concrete next steps they can take
```

## Best Practices

### Do's ✅
- Start with a focused purpose
- Test thoroughly before going public
- Update based on real usage
- Keep instructions clear and organized
- Use concrete examples

### Don'ts ❌
- Try to make one agent do everything
- Use contradictory instructions
- Ignore user feedback
- Make assumptions about user knowledge
- Over-complicate initial setup

## Troubleshooting

**Agent gives vague responses:**
- Add specific examples to instructions
- Define clearer expectations
- Narrow the agent's scope

**Agent doesn't follow instructions:**
- Simplify complex rules
- Check for contradictions
- Break down multi-step instructions

**Agent lacks personality:**
- Define a clear role or persona
- Add style guidelines
- Include example phrases

## Next Steps

You've successfully created your agent! Now you can:

- Share it with others who might find it useful
- Continue refining based on usage
- Create additional agents for different purposes
- Explore using tools like image generation for richer interactions

Remember: The best agents solve a specific problem well rather than trying to do everything.
