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

# Product Apps

> Build products on Runtools with end-user integrations, tools, agents, and channels

Use this path when you are building a customer-facing product on Runtools, not just an internal agent for your own workspace.

Product apps keep your own app auth. Your end users do not create Runtools accounts. Your backend passes a stable `appId` and `externalUserId`, and Runtools scopes tool credentials, usage, audit, and channel identities to that product user.

```text theme={null}
builder org + appId + externalUserId + tool
```

## What You Build

<CardGroup cols={2}>
  <Card title="Hosted Connect" icon="plug" href="/sdk/hosted-connect">
    Let end users connect Gmail, Stripe, Slack, HubSpot, API-key tools, and other integrations to your product.
  </Card>

  <Card title="Run agents for a product user" icon="robot" href="/sdk/hosted-connect#run-an-agent-with-that-users-connections">
    Start agent runs with `endUser` so tools resolve only that user's app-scoped credentials.
  </Card>

  <Card title="Execute tools directly" icon="wrench" href="/api-reference/tools/execute">
    Call Tool Hub actions with Hosted Connect scope from your backend.
  </Card>

  <Card title="Product channels" icon="signal-bars" href="/features/channels#product-channels">
    Let users chat over Telegram, WhatsApp, Slack, Discord, iMessage, or SMS while tools still use their Hosted Connect credentials.
  </Card>
</CardGroup>

## Product Identity

Your product owns login, billing, permissions, and user records. Runtools only needs stable identifiers:

```typescript theme={null}
const endUser = {
  appId: 'atlas',
  externalUserId: currentUser.id,
};
```

Use the same pair everywhere:

* Hosted Connect sessions
* Agent runs
* Direct tool execution
* Product channel identity links
* Usage and audit exports

## Connect User-Owned Tools

Create a Hosted Connect session from your server:

```typescript theme={null}
const session = await rt.connect.createSession({
  appId: 'atlas',
  externalUserId: currentUser.id,
  email: currentUser.email,
  name: currentUser.name,
  integrations: ['gmail', 'stripe', 'slack'],
  returnUrl: 'https://atlas.example.com/settings/integrations',
});

return Response.json({ connectUrl: session.connectUrl });
```

Open `connectUrl` in the browser. Runtools handles OAuth, API-key collection, refresh, encrypted storage, and reconnect states.

## Run With That User's Credentials

Agents:

```typescript theme={null}
await rt.agent.run('atlas-agent', 'Summarize my revenue and open finance risks.', {
  endUser: {
    appId: 'atlas',
    externalUserId: currentUser.id,
  },
});
```

Tools:

```typescript theme={null}
await rt.tools.execute('gmail', {
  action: 'list_emails',
  params: { max_results: 10 },
  credentialScope: 'end_user',
  endUser: {
    appId: 'atlas',
    externalUserId: currentUser.id,
  },
});
```

If the user has not connected the required integration, the tool returns `connect_required`. It does not fall back to builder Connected Apps, org defaults, or another product user's credentials.

## Product Channels

For chat products, the developer connects the channel once. End users simply message the bot or number. Runtools links the provider sender identity to your product user:

```text theme={null}
appId + externalUserId + channel + provider sender id
```

When that sender messages the product channel, the agent run receives the same Hosted Connect end-user scope as your web app.

## Where To Go Next

<CardGroup cols={2}>
  <Card title="Hosted Connect guide" icon="plug" href="/sdk/hosted-connect">
    Full setup, OAuth policy, direct tool execution, API-key tools, usage, and audit.
  </Card>

  <Card title="Tools API" icon="wrench" href="/api-reference/tools/execute">
    Direct Tool Hub execution, including end-user scope.
  </Card>

  <Card title="Channels SDK" icon="signal-bars" href="/sdk/channels#product-channels">
    Bind product channels and link provider senders to product users.
  </Card>

  <Card title="OAuth & Connected Apps" icon="link" href="/advanced/oauth">
    Internal Runtools-user credentials, and how they differ from Hosted Connect.
  </Card>
</CardGroup>
