> ## Documentation Index
> Fetch the complete documentation index at: https://langchain-5e9cc07a-preview-cbdocs-1784230442-77c063c.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Quickstart

> Build an agent from a template

In this quickstart, you use the prebuilt **Executive Assistant** [template](/langsmith/fleet/templates) that manages your inbox, calendar, and daily brief.

<Callout icon="message" color="#8B5CF6" iconType="regular">
  You'll interact with your agent through chat, just like texting a helpful assistant.
</Callout>

## Before you start

You'll need:

* A LangSmith account ([sign up here](https://smith.langchain.com/agents?skipOnboarding=true\&utm_source=docs\&utm_medium=cta\&utm_campaign=langsmith-signup\&utm_content=langsmith-fleet-quickstart)).
* A Gmail account.
* A Google calendar.
* An OpenAI or Anthropic API key (Step 1 will show you how to get one).

## 1. Get your model API key

Your agent needs an API key to connect to an AI model. The AI model is what allows your agent to understand and respond to your requests.

<Tabs>
  <Tab title="OpenAI (ChatGPT)">
    1. Go to [platform.openai.com/api-keys](https://platform.openai.com/api-keys).
    2. Click **Create new secret key**.
    3. Give it a name like "Fleet".
    4. Copy the key (it starts with `sk-`).
    5. Save it somewhere safe, you'll need it in Step 2.
  </Tab>

  <Tab title="Anthropic (Claude)">
    1. Go to [console.anthropic.com/settings/keys](https://console.anthropic.com/settings/keys).
    2. Click **Create Key**.
    3. Give it a name like "Fleet".
    4. Copy the key (it starts with `sk-ant-`).
    5. Save it somewhere safe, you'll need it in Step 2.
  </Tab>
</Tabs>

<Warning>
  Both services charge based on usage.
</Warning>

## 2. Add your API key to LangSmith

Now you'll add your API key to LangSmith so your agents can use it:

<Steps>
  <Step title="Open Settings">
    1. Go to [smith.langchain.com](https://smith.langchain.com?utm_source=docs\&utm_medium=cta\&utm_campaign=langsmith-signup\&utm_content=langsmith-fleet-quickstart).
    2. Click the <Icon icon="settings" /> **Settings** icon in the bottom left.
  </Step>

  <Step title="Go to Secrets">
    Click the **Secrets** tab at the top.
  </Step>

  <Step title="Add your key">
    1. Click **Add secret**.
    2. For **Key**, enter:
       * `OPENAI_API_KEY` (if using OpenAI)
       * `ANTHROPIC_API_KEY` (if using Anthropic)
    3. For **Value**, paste the API key you copied in Step 1.
    4. Click **Save secret**.
  </Step>
</Steps>

<Callout type="success" icon="check" color="#10B981" iconType="regular">
  Your agent now has access to an AI model to understand and respond to your requests. Next, you'll create your agent.
</Callout>

## 3. Create your agent

<Steps>
  <Step title="Navigate to Fleet">
    1. In the [LangSmith UI](https://smith.langchain.com?utm_source=docs\&utm_medium=cta\&utm_campaign=langsmith-signup\&utm_content=langsmith-fleet-quickstart), click <Icon icon="pointer" /> **Switch to Fleet** at the top of the left-hand navigation.
  </Step>

  <Step title="Choose a template">
    1. Select **Templates** in the left-hand navigation, or click **+** in **My Agents** and select **From template**.
    2. Select the **Executive Assistant** template to create your agent.

    <Tip>
      If you do not want to start with a template, choose **Build with AI** when you create an agent and describe the agent you want. The agent configures itself and pauses at key points for your input.
    </Tip>
  </Step>

  <Step title="Authorize accounts">
    Your agent will ask you to connect your Google accounts:

    1. Click **Connect**.
    2. Sign in with your Google account.
    3. Review permissions and click **Allow**.
    4. You'll be redirected back to LangSmith where your agent will be created.
  </Step>
</Steps>

<Info>
  Your agent only accesses your accounts when working on tasks you give it. You can revoke access anytime in your Google account settings.
</Info>

## 4. View the agent template

<Steps>
  <Step title="View and customize the template">
    At this point, you can review the template instructions for the Executive Assistant. If needed, you can make adjustments to the instructions.

    If you made any changes, click **Save changes**.
  </Step>

  <Step title="Start a test chat">
    In the agent chat, try out the Executive Assistant, for example:

    > *Apply a "Review" label to emails that I receive, which require some kind of review from me*
  </Step>

  <Step title="Agent starts working">
    Your agent will start work and provide a **Continue** option for each step that requires your approval.

    <img className="block dark:hidden" src="https://mintcdn.com/langchain-5e9cc07a-preview-cbdocs-1784230442-77c063c/09J8HG7sdNHOcb9g/langsmith/images/agent-builder-response.png?fit=max&auto=format&n=09J8HG7sdNHOcb9g&q=85&s=891fe58af077b671d40b11654281bc86" alt="Test chat output view with response including approvals for Gmail tool." width="670" height="974" data-path="langsmith/images/agent-builder-response.png" />

    <img className="hidden dark:block" src="https://mintcdn.com/langchain-5e9cc07a-preview-cbdocs-1784230442-77c063c/09J8HG7sdNHOcb9g/langsmith/images/agent-builder-response-dark.png?fit=max&auto=format&n=09J8HG7sdNHOcb9g&q=85&s=b931f5b2df0a159e6bf4e9d37d79d53b" alt="Test chat output view with response including approvals for Gmail tool." width="659" height="973" data-path="langsmith/images/agent-builder-response-dark.png" />

    As you test out the agent, you can make edits to the instructions, or add tools that you may need. Click **Save changes** when you are happy with the results.
  </Step>
</Steps>

## Edit your agent

You may want to update your agent's instructions or include more tools. You can chat with your agent directly to ask for updates, or configure it from the [agent sidebar](/langsmith/fleet/essentials#agent-sidebar):

* Add integrations and tools in the **Connections** drawer, and set each tool to run automatically or [ask for approval](/langsmith/fleet/essentials#human-in-the-loop). See [Tools](/langsmith/fleet/tools).
* Connect [Slack](/langsmith/fleet/slack-app), [Gmail](/langsmith/fleet/channels#add-a-gmail-channel), or [Microsoft Teams](/langsmith/fleet/teams-app) in the **Channels** drawer.
* Run your agent on a [schedule](/langsmith/fleet/schedules) in the **Schedule** drawer.
* Change the [model](/langsmith/fleet/manage-agent-settings#change-the-model) in the **Advanced settings** drawer.

## Next steps

Now that you've created your first agent, here's what to explore:

<CardGroup cols={2}>
  <Card title="Try more templates" icon="layout-grid" href="/langsmith/fleet/templates">
    Explore prebuilt agents for common tasks
  </Card>

  <Card title="Add automation" icon="bolt" href="/langsmith/fleet/essentials#channels">
    Run your agent automatically with channels (Slack, email, schedules)
  </Card>

  <Card title="Connect more tools" icon="puzzle" href="/langsmith/fleet/tools">
    Add Slack, GitHub, Linear, and more
  </Card>

  <Card title="Build complex agents" icon="sitemap" href="/langsmith/fleet/essentials#sub-agents">
    Use sub-agents to break down big tasks
  </Card>
</CardGroup>

***

<div className="source-links">
  <Callout icon="terminal-2">
    [Connect these docs](/use-these-docs) to Claude, VSCode, and more via MCP for real-time answers.
  </Callout>

  <Callout icon="edit">
    [Edit this page on GitHub](https://github.com/langchain-ai/docs/edit/main/src/langsmith/fleet/quickstart.mdx) or [file an issue](https://github.com/langchain-ai/docs/issues/new/choose).
  </Callout>
</div>
