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

# Working with Personas

> Learn how to create, manage, and utilize AI personas in Hyperleap AI

Personas are AI personalities that you can configure and integrate into your applications. They provide consistent interaction styles and behaviors by maintaining specific personality traits, expertise levels, and communication patterns. With Personas, you can ensure your AI interactions align with your brand voice and communication goals across all touchpoints.

## Working with Personas

Simple 4 step process to start using Personas:

<Steps>
  <Step title="Design Your Experience">
    Design your product's conversational interface in our API Console.

    * Define personality traits, expertise, and communication style or import pre-configured Persona from Persona library
    * Add Sources to provide context
    * Select an AI model that fits your use case
    * Fine tune the Persona configuration

    <Card title="Detailed Guide: Create Persona" icon="user-plus" href="/guides/personas/create-persona">
      Learn the step-by-step process of designing your first persona
    </Card>
  </Step>

  <Step title="Test in Playground">
    Test your Persona using various models and configurations to determine the
    optimal setup. Refine the responses and behaviors to ensure seamless
    integration with your application. Preview conversations as they will appear
    to users.
  </Step>

  <Step title="Integrate & Deploy">
    Integrate conversations into your application using straightforward REST API calls. Send user messages and context as JSON payloads, allowing our infrastructure to manage the complexities. This approach is compatible with any programming language or framework.

    ```javascript theme={null}
    // Example API integration using Javascript
    const response = await fetch('https://api.hyperleapai.com/conversations/persona', {
      method: 'POST',
      headers: {
        'x-hl-api-key': 'your_api_key_here',
        'Content-Type': 'application/json'
      },
      body: JSON.stringify({
        persona_id: 'your_persona_id',
        persona_version_id: 'your_persona_version_id',
        replacements: {
          variable_name: 'variable_value'
          ...
        }
      })
    });
    ```

    <Note>
      For detailed API specifications and more examples, check out our [Conversations API Reference](/api-reference/conversations/overview).
    </Note>
  </Step>

  <Step title="Monitor & Scale">
    Ensure consistent conversations that adapt to user needs. Monitor performance metrics and adjust configurations without code deployments. Audit logs for each interaction are accessible, allowing for effective tracking and scaling as your product grows.
  </Step>
</Steps>

## How Personas Work

Understand how Personas work in Hyperleap AI under the hood

<CardGroup cols={2}>
  <Card title="System Initialization" icon="gear">
    The Persona's core characteristics and behavioral parameters are loaded into the AI system, establishing its base personality.
  </Card>

  <Card title="Context Processing" icon="brain">
    When interacting, the Persona processes inputs through its knowledge base and
    configured Sources, maintaining context awareness.
  </Card>

  <Card title="Response Generation" icon="reply">
    The AI generates responses by combining personality traits, contextual
    understanding, and configured behavioral rules.
  </Card>

  <Card title="Memory Management" icon="database">
    Conversation history and key information are maintained in a dynamic memory system, enabling coherent, contextual dialogues.
  </Card>
</CardGroup>

## Common Use Cases

<CardGroup cols={2}>
  <Card title="Customer Support">
    Create support agents with consistent tone and knowledge
  </Card>

  <Card title="Educational Tutors">
    Design personas that can teach and explain concepts
  </Card>

  <Card title="Brand Representatives">
    Maintain consistent brand voice across AI interactions
  </Card>

  <Card title="Expert Consultants">
    Create specialized personas for specific domains
  </Card>
</CardGroup>

## Sharing & Permissions

Personas can be shared with your team through **Workspaces**, with role-based access control to manage what each team member can do.

### Permission Matrix

| Action              | Owner | Admin | Contributor | Reader | Guest |
| ------------------- | ----- | ----- | ----------- | ------ | ----- |
| Chat with Persona   | ✓     | ✓     | ✓           | ✓      | ✓     |
| View Configuration  | ✓     | ✓     | ✓           | ✓      | ✗     |
| Edit Persona        | ✓     | ✓     | ✓           | ✗      | ✗     |
| Delete              | ✓     | ✓     | ✗           | ✗      | ✗     |
| Activate/Deactivate | ✓     | ✓     | ✓           | ✗      | ✗     |

For more details on workspace roles, see [Managing Workspaces](/guides/workspace).

## Troubleshooting

<AccordionGroup>
  <Accordion title="Inconsistent Responses">
    **Issue**: Persona responses don't maintain consistent style or knowledge.

    **Solutions**:

    * Review personality configuration
    * Check knowledge base completeness
    * Adjust response parameters
    * Test in different scenarios
  </Accordion>

  <Accordion title="Knowledge Gaps">
    **Issue**: Persona unable to answer domain-specific questions.

    **Solutions**:

    * Update Sources - Set clear domain boundaries
  </Accordion>

  <Accordion title="Tone Misalignment">
    **Issue**: Persona's tone doesn't match intended personality.

    **Solutions**:

    * Adjust Behaviour
    * Review communication style
    * Test with various inputs
  </Accordion>
</AccordionGroup>

## Next Steps

<CardGroup cols={3}>
  <Card title="Persona Library" icon="users" href="https://studio.hyperleapai.com/persona-library">
    Access our Persona library and use pre-configured Personas
  </Card>

  <Card title="API Reference" icon="code" href="/api-reference/conversations/overview">
    Learn how to integrate Personas programmatically
  </Card>

  <Card title="Hyperleap AI Studio" icon="browser" href="https://studio.hyperleapai.com">
    Manage your Personas through our intuitive web interface
  </Card>
</CardGroup>

## Need Help?

* Check our [FAQ](/guides/faq)
* Contact [Support](mailto:support@hyperleap.ai)
