> Source: https://builder-docs.ema.ai/getting-started/first-ai-employee
> Title: Create Your First AI Employee

# Create Your First AI Employee

This quickstart walks you through building a simple AI Employee from scratch using the Generative Workflow Engine (GWE). By the end, you will have a working chat-based AI Employee that answers questions from uploaded documents -- a basic RAG (Retrieval-Augmented Generation) workflow.

**Time estimate:** 20--30 minutes.

## Prerequisites

-   An Ema account with **admin** privileges (non-admins cannot create AI Employees).
-   A sample document to use as a knowledge source (PDF, DOCX, TXT, or PPT). If you do not have one handy, any publicly available PDF works.

## Two Ways to Start

You can create an AI Employee in two ways:

-   **Manual creation** -- Select a template or start from a blank workflow. Follow the step-by-step guide below.
-   **Autopilot (Ask Ema)** -- Describe what you need in natural language and let Ema generate a draft workflow for you. This is especially useful for quick prototyping or when you are unsure which template to use. You can always refine the generated workflow manually afterward.

The rest of this guide covers the manual creation path.

## Step 1: Create a New AI Employee

1.  Navigate to the **AI Employees** page.
2.  Click **Create** to open the Templates screen.
3.  Browse by category or search by keyword to find a suitable template.
4.  Click **\+ Create** on a template card, or select **Custom AI Employee** to start from a blank workflow.
5.  Enter a name for your AI Employee (e.g., "Compliance Analyst").
6.  Click **Create**.

You are now taken to the GWE canvas -- the visual workflow builder.

## Step 2: Configure Shared Resources

The GWE canvas opens to the **Shared Configuration** view. This is where you set up resources available to all agents in the workflow.

### Add Data Sources

1.  In the shared configuration panel, locate the **Data Sources** section.
    
2.  Click **Add Folder** to create a new data source folder.
    
3.  Choose one of two folder types:
    
    -   **File upload** -- Upload documents from your local machine or a connected file storage app.
    -   **Web scraping** -- Provide URLs for Ema to scrape. Ema follows links up to two levels deep and downloads any documents it encounters.
4.  Upload your sample document (or provide a URL).
    

> Ema currently supports these file formats: **PDF, DOCX, TXT, PPT**. Web scraping can take a few minutes to complete. Files uploaded from linked storage apps refresh with up to a 10-minute delay.

### Configure EmaFusion™ (Optional)

EmaFusion is Ema's proprietary Mixture-of-Experts model configuration. The default settings work well for most use cases. You can adjust them later at the individual agent level.

## Step 3: Build a Simple Agentic Workflow

Start with the simplest possible workflow -- a single agent that responds using an LLM.

1.  Click **Save** to return to the blank workflow canvas.
2.  Open the **Agent Library** and navigate to **Frequently Used Agents**.
3.  Select **Respond to a Query** and drag it onto the canvas.
4.  Click the **Query** input on the Respond to a Query agent.
5.  From the dropdown, connect it to the **User Query** output from the workflow trigger.

At this point, you have a working (but basic) workflow: user asks a question, the LLM generates a response. However, it has no access to your documents yet.

## Step 4: Add Document Search (RAG)

To ground the AI Employee's responses in your uploaded documents:

1.  From the Agent Library, add a **File Search** agent to the canvas.
2.  Connect the File Search agent's **Query** input to the **User Query** from the trigger.
3.  In the File Search agent's configuration panel (right side), assign the data source folders you created in Step 2.
4.  Remove the Respond to a Query agent (it was a placeholder).
5.  Add a new **Respond to a Query** agent.
6.  Connect its **Query** input to the **User Query** from the trigger.
7.  Connect its **Search Results** input to the **Results** output of the File Search agent.

Your workflow now follows the standard RAG pattern:

```
User Query --> File Search --> Respond to a Query --> Output
```

## Step 5: Configure Agent Instructions

1.  Click on the Respond to a Query agent to open its configuration panel.
2.  In the **Instructions** field, add any specific directives. For example:
    -   "Respond in a professional tone."
    -   "Include source citations in your responses."
    -   "Use bullet points for lists."

These instructions guide how the LLM agent processes the search results and formats its response.

## Step 6: Set the Workflow Output

1.  Click on the Respond to a Query agent's output.
2.  Select **Publish as Workflow Output**.

> Only certain output types can be published as workflow output. Raw search results cannot be published directly -- they must pass through an LLM agent first.

## Step 7: Save and Publish

1.  Click **Save** in the toolbar.
2.  Click **Publish** to make the workflow active.

## Step 8: Enable the AI Employee

1.  Navigate back to the AI Employee configuration page (click **Go to AI Employee Config**).
2.  Toggle the **Enable** switch to turn on the AI Employee.

## Step 9: Test Your AI Employee

1.  Open the chat interface for your AI Employee.
    
2.  Ask a question related to your uploaded document. For example: "What is a DPO?"
    
3.  The AI Employee will:
    
    -   Search through your connected documents.
    -   Generate a response grounded in the search results.
    -   Include source citations (page numbers and paragraphs).
4.  Click **Show Work** to review the step-by-step execution trace, including which documents were searched and how the response was assembled.
    

## What to Do Next

You now have a working AI Employee with a basic RAG workflow. From here, you can:

-   **Add intent classification** to branch your workflow based on query type. See the [Conditionals](/legacy-docs/core-concepts/conditionals) section for branching patterns.
-   **Connect external applications** to give your AI Employee access to live data from tools like Salesforce, Zendesk, or SharePoint.
-   **Configure permissions** to control which users can interact with or modify this AI Employee.
-   **Set up evaluation** to measure response quality and track accuracy over time.
-   **Review version history** to track workflow changes over time and restore earlier configurations if needed.

For a deeper understanding of the different AI Employee types and when to use each one, see [AI Employee Types](/legacy-docs/getting-started/ai-employee-types).
