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

# Your first workflow

> Build a chat pipeline from an empty canvas: Chat Trigger, AI Agent, Console

<Info>
  About 10 minutes. You need OpenCompany [installed](/installation) and one AI key added (or a local model) — see [Add your AI key](/add-api-keys). If you have not run the ready-made example yet, [Your first chat](/first-chat) is a faster win.
</Info>

You will build the same pipeline the AI Assistant example uses, from scratch: a **Chat Trigger** that receives your message, an **AI Agent** that thinks, and a **Console** that prints the answer.

```
[Chat Trigger] --> [AI Agent] --> [Console]
```

## Build it

<Steps>
  <Step title="Create a new workflow">
    Open `http://localhost:5678`, then click **File** in the top toolbar and choose **New Workflow**.
    An empty canvas appears with the component palette on the left.
  </Step>

  <Step title="Switch the palette to Dev mode">
    In the top toolbar, find the **Mode:** toggle and click **Dev**.
    More sections appear in the palette.

    <Info>
      The palette's **Normal** mode shows only the AI sections. The Chat Trigger and Console nodes live in the **Utilities** section, which is visible in **Dev** mode. Nothing else changes — Dev is just "show me everything."
    </Info>
  </Step>

  <Step title="Add the three nodes">
    Drag these from the palette onto the canvas, left to right:

    1. **Chat Trigger** — in **Utilities** (or type "chat" in the palette search box)
    2. **AI Agent** — in **AI Agents**
    3. **Console** — in **Utilities**

    Three boxes now sit on your canvas.
  </Step>

  <Step title="Connect them">
    Drag from the small circle on the right edge of **Chat Trigger** to the circle on the left edge of **AI Agent**.
    A line appears between them. Repeat from **AI Agent**'s right edge to **Console**'s left edge.
  </Step>

  <Step title="Pick the agent's model">
    Click the **AI Agent** node.
    Its settings panel opens. Choose your **provider** (the one you added a key for) and a **model** from the dropdowns.

    Leave the **prompt** field empty — the agent automatically answers whatever message flows in from the trigger.

    <Note>
      Model dropdown empty? Your key is missing: click the key icon (**API Credentials**) in the toolbar and [add one](/add-api-keys).
    </Note>
  </Step>

  <Step title="Save and start">
    Press **Save** in the top toolbar, then press the green **Start** button.
    **Start** changes to **Stop**, and the Chat Trigger begins a gentle pulse — it is listening.
  </Step>

  <Step title="Talk to it">
    Open the **Chat / Console** panel at the bottom. Type a message into **Type a message...** and press **Send**.
    Then click the **Console** tab on the right — the AI's reply appears there.
  </Step>
</Steps>

<Check>
  Your own three-node workflow answered you. That is the core loop of everything in OpenCompany: trigger, think, deliver.
</Check>

## Make it remember the conversation

Right now the agent forgets everything between messages. Give it memory:

1. In the palette, drag **Simple Memory** (in **AI Tools**) onto the canvas.
2. Connect Simple Memory's top handle to the **left-side memory handle** on the AI Agent (the middle connector on its left edge).
3. Press **Save**, then **Stop** and **Start** to restart the workflow.

Now ask a question, then a follow-up — the agent remembers what you said.

## Make it yours

* Click the AI Agent and write a **system message** like "Answer in pirate speak" — then chat again.
* Swap the model from the dropdown and compare answers.
* Add a **DuckDuckGo Search** node (in **AI Tools**) and connect it to the agent's tools handle — the agent can now search the web when it needs to. See [Web Search](/nodes/search).

<Accordion title="Advanced: trigger it over HTTP instead of chat">
  Prefer to call your workflow from other software? Replace the Chat Trigger with a **Webhook Trigger** (in **Utilities**) configured with path `hello`, keep the AI Agent and Console, and press **Start**. Then send a request from the terminal:

  ```bash theme={null}
  curl -X POST http://localhost:5678/webhook/hello -H "Content-Type: application/json" -d "{\"message\": \"Hello!\"}"
  ```

  The agent's reply prints in the **Console** tab, exactly like the chat version. To return the reply to the caller instead, add a **Webhook Response** node after the agent. See [Webhooks & HTTP](/nodes/webhooks).
</Accordion>

## What's next

<CardGroup cols={2}>
  <Card title="Telegram bot in 10 minutes" icon="paper-plane" href="/tutorials/telegram-bot">
    Put this same pipeline behind a real messaging app — free.
  </Card>

  <Card title="AI Agent deep-dive" icon="robot" href="/tutorials/ai-agent-workflow">
    Memory, tools, and how agents decide what to do.
  </Card>

  <Card title="The canvas" icon="pen-ruler" href="/canvas">
    Modes, panels, shortcuts, and everything on screen.
  </Card>

  <Card title="Node catalog" icon="cubes" href="/nodes/overview">
    Every node you can drag onto the canvas.
  </Card>
</CardGroup>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.