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

# Quickstart

> Get Squasher running with an SDK or log drain in a few minutes.

Pick the setup path that matches how you want to send data into Squasher.

## Workspace model

Squasher is organized as:

* Organization: the customer workspace, such as ACME Corp.
* Members: users inside the organization with owner, admin, developer, billing, or member roles.
* Projects: service-level ingest boundaries. Each project usually maps to one production service or app.
* Owner teams and services: incident-routing metadata inside a project. Link monitors, status components, repositories, runbooks, and service aliases to an owner team so incidents route to the right responders.

Most SDKs and log drains use both an API key and a project ID because telemetry is scoped to a service project. The API key is already tied to one project on Squasher's servers, so Squasher can resolve the project from the key. Keeping `SQUASHER_PROJECT_ID` in env still matters for setup clarity and safety: SDK routes, replay, source maps, dashboard links, MCP/CLI operations, and OAuth-backed ingest flows are project-scoped, and ingest can reject a key/project mismatch instead of silently sending data to the wrong project.

For plain OTLP exporters that only support endpoint plus headers, `SQUASHER_API_KEY` is enough; Squasher resolves the project from the key.

## Dashboard setup flow

Open **Setup** in the target project. The page resumes at the first incomplete stage:

1. **Create** — create one project ingest credential. Squasher shows the secret only once.
2. **Connect** — choose a runtime or telemetry path. Use the **Coding agent** tab to copy a
   project-scoped plan, or use **Manual** for the exact commands. The copied plan does not contain
   the ingest key; give the agent `SQUASHER_API_KEY` through your secret store.
3. **Verify** — send one real application signal and wait for Squasher to confirm receipt. Source
   maps and other improvements appear only after the first signal is active.

The **Connect** stage shows the project id and data region. Use **Integrations** after activation
when you need an OAuth provider, alert source, notification destination, or managed log connector.

## Agent setup brief

Use this when you are asking an AI coding agent to install Squasher:

```text theme={null}
Install Squasher for this project. If Squasher skills or MCP are not configured in this agent environment, run `bash <(curl -fsSL https://squasher.ai/install.sh) --agents -y`. Then read https://skills.squasher.ai/squasher-onboard/SKILL.md, map every runnable app/service/worker/frontend/agent in the repo, choose the matching Squasher SDK, log drain, OTLP, or Agent SDK path, initialize with SQUASHER_API_KEY and SQUASHER_PROJECT_ID from environment variables, send one real verification event, and report the files changed plus the verification step. Do not hardcode or reveal real API keys.
```

For live project inspection, use [MCP](/integrations/mcp). For terminal setup or verification, use [CLI Integration Setup](/integrations/cli-oauth). For custom ingestion, use [API reference](/api-reference/introduction).

<Tabs>
  <Tab title="AI workflows">
    <Steps>
      <Step title="Install the agent SDK">
        ```bash theme={null}
        bun add @squasher-ai/agent @ai-sdk/openai ai
        ```
      </Step>

      <Step title="Initialize telemetry">
        ```typescript src/agent.ts theme={null}
        import { init } from "@squasher-ai/agent";

        init({
          apiKey: process.env.SQUASHER_API_KEY!,
          projectId: process.env.SQUASHER_PROJECT_ID!,
          endpoint: process.env.SQUASHER_ENDPOINT,
          environment: process.env.NODE_ENV,
          agentId: "support-bot",
          workflowId: "support-chat",
        });
        ```
      </Step>

      <Step title="Send your first generation">
        Use the [Agent SDK guide](/sdks/agent) or the [OpenRouter integration](/integrations/openrouter) to emit sessions, generations, and tool calls.
      </Step>

      <Step title="Verify in the dashboard">
        Open **AI -> Dashboard** and **AI -> Requests** in your project to confirm the generation shows up with tokens, latency, and cost.
      </Step>
    </Steps>

    <Card title="Agent SDK guide" href="/sdks/agent" icon="sparkles">
      Capture sessions, generations, and tool calls for agents and chat workflows.
    </Card>
  </Tab>

  <Tab title="Next.js">
    <Steps>
      <Step title="Install">
        ```bash theme={null}
        bun add @squasher-ai/nextjs
        ```
      </Step>

      <Step title="Initialize">
        ```typescript instrumentation.ts theme={null}
        import { init } from "@squasher-ai/nextjs";

        export async function register() {
          init({
            apiKey: process.env.SQUASHER_API_KEY!,
            projectId: process.env.SQUASHER_PROJECT_ID!,
            environment: process.env.NODE_ENV,
          });
        }
        ```
      </Step>

      <Step title="Verify">
        Trigger a test error, then confirm it appears under **Issues** in your Squasher project.
      </Step>
    </Steps>

    <Card title="Full Next.js guide" href="/sdks/nextjs" icon="react">
      Add middleware, route wrappers, error boundaries, and source maps.
    </Card>
  </Tab>

  <Tab title="Node.js">
    <Steps>
      <Step title="Install">
        ```bash theme={null}
        bun add @squasher-ai/node
        ```
      </Step>

      <Step title="Initialize">
        ```typescript src/index.ts theme={null}
        import { init } from "@squasher-ai/node";

        init({
          apiKey: process.env.SQUASHER_API_KEY!,
          projectId: process.env.SQUASHER_PROJECT_ID!,
          environment: process.env.NODE_ENV,
        });
        ```
      </Step>

      <Step title="Verify">
        Send one captured error and confirm it appears under **Issues** in your Squasher project.
      </Step>
    </Steps>

    <Card title="Full Node.js guide" href="/sdks/node" icon="terminal">
      Capture errors from frameworks, workers, and scripts.
    </Card>
  </Tab>

  <Tab title="Log drains">
    <Steps>
      <Step title="Choose a provider">
        Use the [Vercel guide](/integrations/vercel), the [Railway guide](/integrations/railway), or a [cloud log drain](/log-drains/aws-cloudwatch).
      </Step>

      <Step title="Add your drain URL">
        Configure the provider to send logs to the Squasher project-specific drain endpoint.
      </Step>

      <Step title="Verify">
        Trigger a deployment or runtime error and confirm Squasher creates an issue.
      </Step>
    </Steps>
  </Tab>
</Tabs>

## Before you ship

* Use [source maps](/sdks/source-maps) for readable production stack traces.
* Review **Project settings → Response policy** before you enable automatic triage or fixes.
* Set up [notification routing](/features/alerts) so incidents reach the right channel.
* Give coding agents the [Agent DX](/agents) page or `https://docs.squasher.ai/llms.txt`.
* Check [troubleshooting](/troubleshooting) if events are missing.
