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

# Quickstart

> Create and run your first workflow in minutes from the dashboard or CLI.

Prefer to run Lark from an AI coding agent? See [MCP](/mcp-quickstart) for Claude Code, Cursor, and other agent integrations.

## Create your first workflow

<Tabs>
  <Tab title="Dashboard">
    <img src="https://mintcdn.com/lark/pj0aAas-bZqXcdS0/images/workflow_creation.png?fit=max&auto=format&n=pj0aAas-bZqXcdS0&q=85&s=1e656729d1d03d63b9904c5367a0e3c2" alt="Screenshot showing how to create a testing workflow in dashboard." style={{ borderRadius: '0.5rem', maxWidth: '400px', height: 'auto'}} width="1132" height="1171" data-path="images/workflow_creation.png" />

    <Steps>
      <Step title="Open the workflows page">
        In the [dashboard](https://dashboard.getlark.ai/workflows), go to **Workflows**. Click **Create workflow** to add a new one.
      </Step>

      <Step title="Describe what you want to test">
        Write your test in plain English. For example, "Log in and verify the dashboard loads" or "Call the API and check the response." No code required.
      </Step>

      <Step title="Choose how the workflow runs">
        * **Deterministic (i.e. scripted)** - The AI writes a script that runs the same steps every time. Lark keeps the test updated as your product changes (e.g. UI updates).
        * **AI-driven** - The AI performs the test from scratch each run, deciding how to achieve the goal. Best for complex flows like "follow the integration quickstart and verify it works."
      </Step>

      <Step title="Add secrets if needed">
        If the test needs credentials (API keys, login credentials, etc.), attach a [secret context](/testing/secrets). Otherwise you can skip this.
      </Step>

      <Step title="Run the workflow">
        Hit **Run**. The workflow runs in a sandbox environment. When it finishes, you'll see the result and any artifacts (screenshots, videos, logs).
      </Step>
    </Steps>
  </Tab>

  <Tab title="CLI">
    Make sure you have Node.js 18+ and your API key set:

    ```bash theme={null}
    export GETLARK_API_KEY=your-api-key
    ```

    <Steps>
      <Step title="Create a workflow">
        ```bash theme={null}
        npx -y @getlark/cli workflows create \
          --name "New User Signup" \
          --description "Go to dashboard url and verify that you can sign up as a new user." \
          --mode deterministic
        ```

        Pick a name, describe what to test in plain English, and choose a mode:

        * **Deterministic** — The AI writes a script that runs the same steps every time. Lark keeps the test updated as your product changes (e.g. UI updates).
        * **AI-driven** (default) — The AI performs the test from scratch each run, deciding how to achieve the goal. Best for complex flows.

        See the [CLI reference](/testing/cli) for all options.
      </Step>

      <Step title="Add secrets if needed">
        If the test needs credentials, create a [secret context](/testing/secrets) in the dashboard and attach it with `--secret-contexts`:

        ```bash theme={null}
        npx -y @getlark/cli workflows create \
          --name "User Login" \
          --description "Go to the dashboard and verify you can login to the dashboard." \
          --mode deterministic \
          --secret-contexts dashboard_login
        ```
      </Step>

      <Step title="Run the workflow">
        ```bash theme={null}
        npx -y @getlark/cli workflows invoke --all --wait
        ```

        The `--wait` flag blocks until the run finishes. When it completes you'll see the result in your terminal.
      </Step>
    </Steps>
  </Tab>
</Tabs>

## View results

After the run completes, open it in the dashboard to see:

* **Summary** - Pass/fail and high-level outcome
* **Steps** - What the agent did (and, for AI-driven runs, how it chose to do it)
* **Logs** - Detailed agent output
* **Artifacts** - Screenshots, recordings, and other generated files

<img src="https://mintcdn.com/lark/pj0aAas-bZqXcdS0/images/workflow_execution_result.png?fit=max&auto=format&n=pj0aAas-bZqXcdS0&q=85&s=4b0d2043de4c96b0b296b55d6b595175" alt="Screenshot showing the result of a workflow execution in dashboard." style={{ borderRadius: '0.5rem', maxWidth: '400px', height: 'auto'}} width="1729" height="1039" data-path="images/workflow_execution_result.png" />

Next, run the same workflow [from CI](/testing/ci) so it runs on every PR or deploy, or drive workflows directly via [MCP](/mcp-quickstart) from Claude Code, Cursor, and other agents.
