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

# Vendo's Full-Stack Agent

> Your agent as a panel inside your own product, in your own brand.

Vendo brings the loop, the model, and the chat surface. You paste three things
into your own client.

This picks up after the two commands on the [main quickstart](/):

<CodeGroup>
  ```bash npm theme={null}
  npm install @vendoai/vendo
  npx vendo init
  ```

  ```bash pnpm theme={null}
  pnpm add @vendoai/vendo
  pnpm exec vendo init
  ```
</CodeGroup>

Those leave you `app/api/vendo/[...vendo]/route.ts` written, and a model
credential settled.

Which credential depends on how you answered init's models question. **Vendo
Cloud** ran the browser login and put a `VENDO_API_KEY` in `.env.local`.
**Bring my own key** took your paste and put it in the same file, under
`ANTHROPIC_API_KEY`, `OPENAI_API_KEY`, or `GOOGLE_GENERATIVE_AI_API_KEY`.
**Decide later** wrote no key at all — the steps below still work, and
`vendo login` (or your own key in `.env.local`) is what makes the first turn
answer. [Model credentials](/production/model-credentials) covers all three.

<Steps>
  <Step title="Mount the provider">
    Paste what init printed into your client layout. Your paths and theme are
    already filled in.

    ```tsx app/layout.tsx focus={7} theme={null}
    import { VendoProvider } from "@vendoai/vendo/react";
    import type { VendoTheme } from "@vendoai/vendo";
    import theme from "../.vendo/theme.json";

    // in your own RootLayout, props type untouched:
    <body>
      <VendoProvider baseUrl="/api/vendo" theme={theme as VendoTheme}>
        {children}
      </VendoProvider>
    </body>
    ```

    Leave that props type alone. Next already types `children` for you —
    create-next-app writes `Readonly<{ children: React.ReactNode }>`, and an app on
    typed routes has a generated props type of its own — so annotating it again as
    `{ children: ReactNode }` only throws away what your app already knows.

    `baseUrl` is where the route is mounted, path prefix included. An app served
    under `/maple` passes `baseUrl="/maple/api/vendo"`.
  </Step>

  <Step title="Add the overlay">
    One line inside the provider puts your agent on every page. It opens over your
    app, or docks beside it with `placement="dock"`.

    ```tsx app/layout.tsx focus={1,5} theme={null}
    import { VendoOverlay, VendoProvider } from "@vendoai/vendo/react";

    <VendoProvider baseUrl="/api/vendo" theme={theme as VendoTheme}>
      {children}
      <VendoOverlay />
    </VendoProvider>
    ```

    <Note>
      Prefer a command bar? Mount `<VendoPalette />` beside the overlay and `⌘K`
      opens the same panel in its compact form.
    </Note>
  </Step>

  <Step title="Add the slot">
    Put a slot where a card would go. A screen the agent builds can live there
    instead of in the panel.

    `VendoSlot` comes from the package you already installed — no second one.

    The id and the file are both yours. `spend-breakdown` on a bank's overview page
    is this example's choice: pick any string, and put the slot on whichever page you
    want the surface to appear on. The one rule is that the same string appears in
    both places — on `VendoSlot` here, and on the provider's `pinSlot` below.

    ```tsx app/overview/page.tsx focus={3,9} theme={null}
    "use client";

    import { VendoSlot } from "@vendoai/vendo/react";

    export default function Overview() {
      return (
        <section className="cards">
          <BalanceTiles />
          <VendoSlot id="spend-breakdown" />
          <RecentActivity />
        </section>
      );
    }
    ```

    Name that slot on the provider. It is where the panel's pin button sends a
    finished view.

    ```tsx app/layout.tsx focus={4} theme={null}
    <VendoProvider
      baseUrl="/api/vendo"
      theme={theme as VendoTheme}
      pinSlot="spend-breakdown"
    >
    ```

    Empty, the slot shows a ghost with prompts that open the panel. Ask for a
    view, press **Pin to dashboard** on the card that comes back, and it renders
    in your grid and stays there.

    <Frame caption="Your page, your grid. The card in the middle is generated.">
      <img src="https://mintcdn.com/vendo/Bl9khJxYuQX2mLio/images/maple/slot-in-page.png?fit=max&auto=format&n=Bl9khJxYuQX2mLio&q=85&s=37fc26021c44470456a976f060337dc3" alt="Maple's overview page with its own quick actions, balance chart, and account tiles, and a generated spend by category card holding the slot beside them" width="1280" height="900" data-path="images/maple/slot-in-page.png" />
    </Frame>

    Start the app and click the launcher pill in the corner.

    <CodeGroup>
      ```bash npm theme={null}
      npm run dev
      ```

      ```bash pnpm theme={null}
      pnpm dev
      ```
    </CodeGroup>

    Ask for something you would otherwise click through to, like "Where did my
    money go?" The agent calls your own API as the person signed in, and answers
    with a screen instead of a paragraph when the answer is one to look at.

    <Frame caption="The panel is Vendo. The fonts, colors, and data are yours.">
      <img src="https://mintcdn.com/vendo/Bl9khJxYuQX2mLio/images/maple/panel-generated-screen.png?fit=max&auto=format&n=Bl9khJxYuQX2mLio&q=85&s=cff965fb9b6331ea7cd7e23d42099b03" alt="The Vendo panel open over Maple, answering a spending question with a generated screen that lists each category and its total" width="620" height="680" data-path="images/maple/panel-generated-screen.png" />
    </Frame>
  </Step>
</Steps>

## Where to go next

The surface is up. These three are what people change first.

<div className="direction-cards">
  <CardGroup cols={3}>
    <Card title="How it works" href="/product/how-it-works" img="https://mintcdn.com/vendo/VDUQZsZOt7HxLl3m/images/cards/product-how-it-works.svg?fit=max&auto=format&n=VDUQZsZOt7HxLl3m&q=85&s=df47f1ffa071e52bfab2b48e558b5060" width="640" height="400" data-path="images/cards/product-how-it-works.svg">
      What the panel does, and what runs on your side.

      `app/api/vendo/[...vendo]/route.ts`
    </Card>

    <Card title="Theming" href="/customize/theming" img="https://mintcdn.com/vendo/VDUQZsZOt7HxLl3m/images/cards/product-theming.svg?fit=max&auto=format&n=VDUQZsZOt7HxLl3m&q=85&s=9d7dd5066f535c1a4cf2a72a4dfd0545" width="640" height="400" data-path="images/cards/product-theming.svg">
      Fonts, colors, and radii, taken from your own tokens.

      `.vendo/theme.json`
    </Card>

    <Card title="Generated apps" href="/generated/apps" img="https://mintcdn.com/vendo/VDUQZsZOt7HxLl3m/images/cards/generated-apps.svg?fit=max&auto=format&n=VDUQZsZOt7HxLl3m&q=85&s=14b02f367aa2569ea0b196a6a360be43" width="640" height="400" data-path="images/cards/generated-apps.svg">
      Real screens built from your data, pinned where you want.

      `<VendoSlot id="home-hero" />`
    </Card>
  </CardGroup>
</div>
