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

# Build and Deploy Your First Layest AI Agent From Scratch

> Step-by-step guide to creating your first AI agent on Layest. Name your agent, choose a model, set instructions, and deploy it in minutes.

An agent in Layest is an autonomous AI worker that executes tasks on your behalf — answering questions, processing data, calling integrations, and taking actions without requiring manual intervention for every step. Each agent you create has its own model, instructions, tools, and memory, making it purpose-built for the job you need done. This guide walks you through creating and deploying your very first agent from scratch.

## What is a Layest Agent?

A Layest agent combines a large language model (LLM) with a set of instructions, tools, and integrations to act as a reliable, repeatable worker inside your workspace. Agents can be triggered manually, by an event, or on a schedule — and every run is logged so you can inspect inputs, outputs, and any errors that occurred.

<Info>
  You do not need to write code to create an agent. The Layest dashboard provides a fully visual configuration experience. Code-level customization is available for advanced use cases.
</Info>

## Before You Begin

Make sure you have:

* A Layest account with at least one workspace created
* Access to the **Agents** section in the left-hand navigation
* (Optional) A clear idea of what task your agent will handle

***

## Creating Your First Agent

<Steps>
  <Step title="Navigate to the Agents section">
    In the Layest dashboard, click **Agents** in the left-hand sidebar. This opens your agent list — it will be empty if this is your first time here.

    <Note>
      If you belong to multiple workspaces, confirm you are in the correct workspace before proceeding. The workspace name is displayed in the top-left corner of the dashboard.
    </Note>
  </Step>

  <Step title="Click 'New Agent'">
    Click the **New Agent** button in the top-right corner of the Agents page. A modal will appear prompting you to choose a starting point.
  </Step>

  <Step title="Choose a template or start from blank">
    You have two options:

    * **Agent Library** — browse pre-built templates for common use cases such as customer support, data extraction, and research. Starting from a template gives you a pre-filled set of instructions and tools that you can customize.
    * **Blank Agent** — start with a clean slate and configure everything yourself.

    For this guide, select **Blank Agent** to learn each configuration option step by step.

    <Tip>
      If you already know your use case, check the Agent Library first. A template can save significant setup time and shows you best-practice instruction patterns.
    </Tip>
  </Step>

  <Step title="Configure the name, description, and model">
    Fill in the **Basic Info** fields:

    | Field           | Guidance                                                  |
    | --------------- | --------------------------------------------------------- |
    | **Name**        | A short, descriptive label (e.g., "Support Triage Agent") |
    | **Description** | One sentence explaining what this agent does              |
    | **Avatar**      | Optional — upload an image or choose an emoji icon        |

    Next, select a **Model** from the dropdown. If you are just getting started, the default model is a good choice. You can change this at any time.

    <Warning>
      Different models have different costs and rate limits. Higher-capability models (such as GPT-4o or Claude 3.5 Sonnet) produce better results but consume more credits per run. Review your plan limits before selecting a model for high-volume workflows.
    </Warning>
  </Step>

  <Step title="Write your system instructions">
    The **Instructions** field is where you define your agent's persona, role, and behavior. This is the system prompt that the model receives before every conversation or task.

    A clear, specific instruction set leads to much better agent behavior. Here is a simple example:

    ```text theme={null}
    You are a friendly customer support agent for Acme Corp. Your job is to:
    - Answer questions about our product features and pricing
    - Help users troubleshoot common issues using the knowledge base
    - Escalate unresolved issues by creating a support ticket

    Always respond in a professional, empathetic tone. If you do not know
    the answer, say so honestly and offer to escalate.
    ```

    <Note>
      Keep your instructions focused. Overly long or contradictory instructions can confuse the model and lead to inconsistent behavior. Start simple and iterate.
    </Note>
  </Step>

  <Step title="Save and activate your agent">
    Click **Save Agent** at the bottom of the configuration panel. Your agent is now created in a **Draft** state.

    To make it available for runs and triggers, toggle the status from **Draft** to **Active** using the switch in the agent header.

    <Info>
      Draft agents can be tested manually from the dashboard but will not respond to external triggers or scheduled runs. Activate your agent only when you are satisfied with its configuration.
    </Info>
  </Step>
</Steps>

***

## Testing Your Agent

Once your agent is active, you can send it a test message directly from the dashboard:

1. Open your agent from the Agents list.
2. Click the **Test** tab in the agent panel.
3. Type a message in the chat input and press **Send**.
4. Review the agent's response and inspect the run log for details.

The test panel shows the full input/output alongside any tool calls the agent made, making it easy to debug instructions before connecting your agent to live workflows.

***

## Next Steps

Now that your agent is running, explore these topics to unlock its full potential:

<CardGroup cols={2}>
  <Card title="Agent Configuration" icon="sliders" href="/agents/agent-configuration">
    Deep-dive into every configuration option — models, memory, tools, and behavior settings.
  </Card>

  <Card title="Agent Library" icon="books" href="/agents/agent-library">
    Browse pre-built templates to find a starting point for common use cases.
  </Card>

  <Card title="Run Workflows" icon="play" href="/agents/run-workflows">
    Learn how to run your agent manually, via triggers, or on a schedule.
  </Card>

  <Card title="Observability" icon="chart-line" href="/observability/overview">
    Monitor agent runs, inspect logs, and track performance over time.
  </Card>
</CardGroup>
