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

# Start building with Foil

> Detect AI agents, headless browsers, and automation with Foil. Verify sealed sessions on your backend and let developers sign up from the terminal with Gate.

Foil provides two products for the age of AI agents:

<CardGroup cols={2}>
  <Card title="Foil Detection" icon="shield" href="/quickstart">
    Detect AI-controlled browsers, automation frameworks, and anti-detect tools. 350+ signals, server-side scoring, zero user friction.
  </Card>

  <Card title="Foil Gate" icon="door-open" href="/gate/what-is-gate">
    Let developers sign up for your product from their terminal. One command, browser consent, API keys delivered to `.env`.
  </Card>
</CardGroup>

## Foil Detection

Add Foil to your frontend in two lines. Verify on your backend with any of our 5 server SDKs.

```html theme={"dark"}
<script type="module">
  const Foil = await import("https://cdn.usefoil.com/t.js");
  const tw = await Foil.start({ publishableKey: "pk_live_..." });
</script>
```

<CodeGroup>
  ```bash Node.js theme={"dark"}
  npm install @abxy/foil-server
  ```

  ```bash Python theme={"dark"}
  pip install foil-server
  ```

  ```bash Go theme={"dark"}
  go get github.com/abxy-labs/foil-server-go
  ```

  ```bash Ruby theme={"dark"}
  gem install foil-server
  ```

  ```bash PHP theme={"dark"}
  composer require abxy/foil-server
  ```
</CodeGroup>

<CardGroup cols={3}>
  <Card title="Quickstart" icon="zap" href="/quickstart">
    5-minute integration guide
  </Card>

  <Card title="How it works" icon="cog" href="/how-it-works">
    The detection pipeline
  </Card>

  <Card title="Server verification" icon="shield-check" href="/server-verification">
    Verify on your backend
  </Card>
</CardGroup>

## Foil Gate

Developers run `npx signup yourproduct` and get API keys without filling out a form.

```bash theme={"dark"}
npx signup foil
```

You implement one webhook. Gate handles consent, bot detection, and credential delivery.

<CardGroup cols={3}>
  <Card title="What is Gate?" icon="door-open" href="/gate/what-is-gate">
    Product overview
  </Card>

  <Card title="Add Gate" icon="plus" href="/gate/add-gate">
    Integration guide
  </Card>

  <Card title="CLI reference" icon="terminal" href="/gate/cli-reference">
    All commands and flags
  </Card>
</CardGroup>

## Server SDKs

| Language | Package             | Install                                      |
| -------- | ------------------- | -------------------------------------------- |
| Node.js  | `@abxy/foil-server` | `npm install @abxy/foil-server`              |
| Python   | `foil-server`       | `pip install foil-server`                    |
| Go       | `foil-server-go`    | `go get github.com/abxy-labs/foil-server-go` |
| Ruby     | `foil-server`       | `gem install foil-server`                    |
| PHP      | `abxy/foil-server`  | `composer require abxy/foil-server`          |

## Common use cases

<CardGroup cols={3}>
  <Card title="Signup" icon="user-plus" href="/use-cases/signup">
    Block automated account creation at the source.
  </Card>

  <Card title="KYC fraud" icon="id-card" href="/use-cases/kyc">
    Stack with your KYC vendor to catch identity farming.
  </Card>

  <Card title="Login" icon="key-round" href="/use-cases/login">
    Stop credential stuffing without trapping real users.
  </Card>

  <Card title="Checkout" icon="credit-card" href="/use-cases/checkout">
    Add Foil signal to your payments fraud stack.
  </Card>

  <Card title="User-generated content" icon="messages-square" href="/use-cases/user-generated-content">
    Catch LLM-written spam at the composer.
  </Card>

  <Card title="API abuse" icon="server" href="/use-cases/api-abuse">
    Block LLM scrapers; keep legitimate crawlers.
  </Card>

  <Card title="Promo & trial abuse" icon="ticket-percent" href="/use-cases/promo-abuse">
    Catch repeat claims across account rotations.
  </Card>
</CardGroup>
