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

# Creating an Agent

> This guide shows you how to build an agent. We will use an example of an onboarding agent, but the steps and considerations can be used with any use case.

<Info>
  For inspiration and ready-to-use templates, check out our [Agent Templates](/en/using-langdock/agents/agent-templates) collection.
</Info>

## Getting Started

<Steps>
  <Step title="Access the Agent Builder">
    Navigate to the [agent overview](https://app.langdock.com/agents) page and click **"Create agent"**.

    This opens the agent configurator with configuration options on the left and a testing panel on the right.
  </Step>

  <Step title="Plan Your Agent">
    Before diving into configuration, consider these key questions:

    <Accordion title="Planning Questions">
      * **Purpose**: What specific task should this agent help with?
      * **Process**: What are the steps to achieve this task?
      * **Resources**: Do you need to attach files or connect to knowledge sources?
      * **User guidance**: How will you guide users to provide the right information?
      * **Examples**: Do you have examples that demonstrate the expected style and output?
    </Accordion>

    For our onboarding agent, we want to:

    Help new employees get familiar with the company and their role
    Guide users through the onboarding process
    Ask for missing information when needed
    Never assume information that wasn't provided
  </Step>
</Steps>

## Basic Configuration

### Icon, Name, and Description

<Frame>
  <img src="https://mintcdn.com/langdock-34/gFYR8AeiskmT5wUA/images/building-agents-1.png?fit=max&auto=format&n=gFYR8AeiskmT5wUA&q=85&s=cebce77bcd292f416a53bacff4964b84" alt="Agent configuration: Give the agent a Icon, Name, and Description" width="2142" height="1408" data-path="images/building-agents-1.png" />
</Frame>

<Steps>
  <Step title="Upload an Icon">
    Choose an emoji or upload a custom icon that represents your agent's purpose.
  </Step>

  <Step title="Set Name and Description">
    * **Name**: `Onboarding Agent`
    * **Description**: `Helps new team members to get started in the company by answering frequently asked questions.`
  </Step>
</Steps>

## Writing Instructions

<Frame>
  <img src="https://mintcdn.com/langdock-34/gFYR8AeiskmT5wUA/images/building-agents-2.png?fit=max&auto=format&n=gFYR8AeiskmT5wUA&q=85&s=9c45e179f083e9ee8c3f205c32fbe37e" alt="Agent configuration: Write the instructions the model has to adhere to" width="1780" height="1374" data-path="images/building-agents-2.png" />
</Frame>

The instructions are the most critical part of your agent configuration. Use the [prompt engineering guide](/en/using-langdock/prompt-engineering/basics/prompt-elements) to craft effective instructions using the PTCF framework (Persona, Task, Context, Format).

<Info>
  **Automatic Saving:** Your agent saves automatically as you make changes, no manual saving required.
</Info>

<Steps>
  <Step title="Persona">
    Define who your agent is:

    ```text theme={null}
    You are a friendly and helpful onboarding agent dedicated to guiding new employees as they familiarize themselves with Langdock and their specific roles.
    ```
  </Step>

  <Step title="Tasks">
    Specify what the agent should do and how:

    ```text theme={null}
    Your primary objective is to support new joiners in understanding Langdock's mission, the company processes and teams, their job responsibilities, and key resources available to them, ensuring a seamless transition into the company.
    ```
  </Step>

  <Step title="Context">
    Provide relevant background information:

    ```text theme={null}
    Direct employees to specific resources, such as sections in the handbook, or key contacts for further assistance. Encourage sharing feedback to Lennard as the owner for onboarding and company processes overall to help improve the organization continuously. Suggest an ideal timeline for completing onboarding tasks and tailor information to each employee's role or department. Ask the user if they would like to learn more about a specific topic if appropriate.

    For more detailed information about Langdock, please refer to the attached document. The different sections in the handbook are:
    Chapter 1: Getting Started
    Chapter 2: Strategy
    Chapter 3: How we got here
    Chapter 4: Sales & Marketing
    Chapter 5: Customer Success
    Chapter 6: Product & Engineering
    Chapter 7: Business Model
    Chapter 8: Team & Stakeholders
    Chapter 9: How We Work, Values, and Principles
    Chapter 10: Business Operations
    Chapter 11: Meetings, and Feedback
    Chapter 12: Hiring
    ```
  </Step>

  <Step title="Format">
    Specify the expected output structure:

    ```text theme={null}
    Maintain an empathetic and engaging tone while providing concise and clear information. Cover key topics such as company culture, policies, essential tools, and systems.
    ```
  </Step>
</Steps>

<Tip>
  Click the expand button in the bottom right corner of the instruction field to enlarge it for easier editing.
</Tip>

## Advanced Configuration

### Conversation Starters

<Frame>
  <img src="https://mintcdn.com/langdock-34/gFYR8AeiskmT5wUA/images/building-agents-3.png?fit=max&auto=format&n=gFYR8AeiskmT5wUA&q=85&s=7bf5350c60343b3d77204fdb4df362dc" alt="Agent configuration: Add conversation starters to make the first message easier when using an agent" width="2278" height="1632" data-path="images/building-agents-3.png" />
</Frame>

Conversation starters help users get started quickly and reduce friction. Use them for:

<Accordion title="When to Use Conversation Starters">
  <AccordionGroup>
    <Accordion title="Multiple Tasks">
      If your agent can perform different tasks, let users choose:

      * *I want to write a new text*
      * *I want to correct a text I have written*
    </Accordion>

    <Accordion title="Common Prompts">
      For frequently asked questions or common use cases:

      * *How do I request holidays?*
      * *Who do I contact for tech support questions?*
    </Accordion>

    <Accordion title="Testing">
      Use conversation starters to quickly test your agent during development instead of retyping the same prompts.
    </Accordion>
  </AccordionGroup>
</Accordion>

### Knowledge Integration

<Frame>
  <img src="https://mintcdn.com/langdock-34/gFYR8AeiskmT5wUA/images/building-agents-4.png?fit=max&auto=format&n=gFYR8AeiskmT5wUA&q=85&s=b11966dc012ea8214c6457a5361351bb" alt="Agent configuration: Add knowledge to the Agent as additional knowledge and source " width="1802" height="1254" data-path="images/building-agents-4.png" />
</Frame>

Upload documents directly from your computer via drag and drop, or select files from connected integrations like in chat.

### Capabilities

Enable additional tools your agent can use:

<CardGroup cols={3}>
  <Card title="Web Search" icon="globe">
    Access real-time information from the internet
  </Card>

  <Card title="Data Analysis" icon="chart-line">
    Analyze data and create visualizations
  </Card>

  <Card title="Image Generation" icon="image">
    Create images based on text descriptions
  </Card>

  <Card title="Canvas" icon="pen">
    Dedicated editing screen alongside your chat
  </Card>
</CardGroup>

For detailed information about these capabilities, see our [chat tools guide](/en/_internal/product/chat/plain-model).

<Note>
  By default, agents are created without any capabilities enabled. When building an agent that needs web search (or any other tool), make sure to manually add those capabilities in the agent settings.
</Note>

### Agent Actions

<Frame>
  <img src="https://mintcdn.com/langdock-34/gFYR8AeiskmT5wUA/images/building-agents-5.png?fit=max&auto=format&n=gFYR8AeiskmT5wUA&q=85&s=33b815f35301c76c9b22d6f261af5c25" alt="Agent configuration: Give access to integrations to start to automise your processes" width="1720" height="1148" data-path="images/building-agents-5.png" />
</Frame>

Actions enable your agent to interact with external tools and APIs. They can:

* Retrieve information from other systems
* Update, delete, or create entries in external tools
* Automate workflows across platforms

<Info>
  Learn more about setting up actions in our [integrations guide](/en/using-langdock/guides/integrations/using-integrations).
</Info>

### Model Selection & Creativity

<Frame>
  <img src="https://mintcdn.com/langdock-34/gFYR8AeiskmT5wUA/images/building-agents-6.png?fit=max&auto=format&n=gFYR8AeiskmT5wUA&q=85&s=86a5a164a853b3b5ce8c355b33ae0a54" alt="Agent configuration: Select a model for your Agent and set the creativity to the level of your likes" width="1722" height="1224" data-path="images/building-agents-6.png" />
</Frame>

Choose the AI model that best fits your use case:

<Info>
  See our [models page](https://langdock.com/models) to choose the best model for your use case.
</Info>

### Creativity (Temperature)

Adjust the creativity level to control response variability:

* **Lower creativity**: More focused, consistent responses
* **Higher creativity**: More varied, creative responses

## Testing and Iteration

<Frame>
  <img src="https://mintcdn.com/langdock-34/gFYR8AeiskmT5wUA/images/building-agents-7.png?fit=max&auto=format&n=gFYR8AeiskmT5wUA&q=85&s=90cbb10e09ca1a9b095c026a7c5f3c7b" alt="Agent configuration: Test the agent in the preview window on the right side" width="1434" height="1008" data-path="images/building-agents-7.png" />
</Frame>

<Warning>
  Always test your agent thoroughly before sharing it with others. Try different scenarios, edge cases, and intentionally leave out information to test the agent's ability to ask clarifying questions.
</Warning>

Use the testing panel on the right side of the Agent Builder to:

* Test different conversation flows
* Verify the agent asks for missing information
* Ensure output format consistency
* Check response quality across various inputs

## Sharing Your Agent

<Frame>
  <img src="https://mintcdn.com/langdock-34/gFYR8AeiskmT5wUA/images/building-agents-8.png?fit=max&auto=format&n=gFYR8AeiskmT5wUA&q=85&s=794e961e80d144e40bc6aa6dadbefacf" alt="Agent configuration: Share the agent to groups and colleagues" width="1612" height="1166" data-path="images/building-agents-8.png" />
</Frame>

<Steps>
  <Step title="Share with Others" stepNumber={1}>
    Click the **Share** button in the upper right corner to control access:

    Sharing options might be restricted in your workspace based on your admin's security settings.

    <Tabs>
      <Tab title="Workspace">
        Share with your entire workspace for broad access.
      </Tab>

      <Tab title="Link Sharing">
        Copy a direct link to share with specific people.
      </Tab>

      <Tab title="Groups & Individuals">
        Grant access to specific groups or individuals with either:

        * **User access**: Can use the agent
        * **Editor access**: Can modify the agent configuration
      </Tab>
    </Tabs>
  </Step>

  <Step title="Additional Options" stepNumber={2}>
    Use the agent configuration to:

    * **Duplicate**: Create a copy for experimentation
    * **Delete**: Remove the agent
    * **Analytics and Feedback**: View usage data and user feedback
  </Step>
</Steps>

## Best Practices

<Tip>
  **Monitor Usage**: Use Analytics and Feedback to understand how your agent is being used and identify areas for improvement. Learn more in [Agent Usage Insights](/en/using-langdock/agents/usage-insights).
</Tip>

### Iterative Improvement

1. **Start Simple**: Begin with basic functionality and add complexity gradually
2. **Test Extensively**: Try various scenarios and edge cases
3. **Gather Feedback**: Monitor usage insights and collect user feedback
4. **Refine Instructions**: Update based on real-world usage patterns

### Common Pitfalls to Avoid

<Warning>
  * **Over-engineering**: Don't try to handle every possible scenario initially
  * **Assuming Information**: Always instruct the agent to ask for missing details
  * **Ignoring Edge Cases**: Test what happens when users provide incomplete information
</Warning>

## Next Steps

Now that you've created your agent, consider:

* [Setting up integrations](/en/using-langdock/integrations/introduction) to connect with your existing tools
* [Creating prompt templates](/en/using-langdock/chat/prompt-library) for common use cases

<CardGroup cols={2}>
  <Card title="Agent Templates" icon="books" href="/en/using-langdock/agents/agent-templates">
    Explore ready-to-use agent templates for common business use cases
  </Card>

  <Card title="Prompt Engineering" icon="wand-magic-sparkles" href="/en/using-langdock/prompt-engineering/basics/prompt-elements">
    Master the art of writing effective prompts and instructions
  </Card>
</CardGroup>
