import { CodeBlock } from '../views/docs/CodeBlock';
import { LanguageTabs } from '../views/docs/CodeTabs';
import { Callout, NextLink, Prose } from '../views/docs/prose';

## Quickstart (SDK-Only)

<Callout>
The recommended way to build Guava voice agents is using the [Guava CLI](./quickstart), which bootstraps projects and installs the SDK.
This guide explains how to install the SDK directly if you’d prefer not to use the CLI.
</Callout>

### Create an account

Sign up for an account at [app.goguava.ai](https://app.goguava.ai).

### Install the SDK

Guava provides SDKs for Python and TypeScript. Choose your language and package manager.

<LanguageTabs
  pythonContent={<>
    <CodeBlock code={
`uv add guava-sdk      # Install using uv (Recommended)
pip install guava-sdk # Install using pip
poetry add guava-sdk  # Install using poetry`} language="bash" />
  </>}
  typescriptContent={<>
    <CodeBlock code={
`npm install @guava-ai/guava-sdk # Install using npm
yarn add @guava-ai/guava-sdk    # Install using yarn
pnpm add @guava-ai/guava-sdk    # Install using pnpm`} language="bash" />
  </>}
/>

### Set Environment Variables

The SDK reads credentials from the environment automatically. Set these before running any Guava scripts.

<CodeBlock code={`export GUAVA_API_KEY="gva-..." # Set to your API key.
export GUAVA_AGENT_NUMBER="+15551234567" # Used by SDK examples. Set to your purchased number.`} filename=".env" language="bash" />

Create an API key using the [API Keys](https://app.goguava.ai/dashboard/api-keys) page. Purchase a phone number using the [Phone Numbers](https://app.goguava.ai/dashboard/phone-numbers) page.


### Add the coding agent starter kit

Download the Guava coding agent starter kit into your project. It contains plain-text API docs sized for AI coding assistants.

<CodeBlock code={`curl -o guava-docs.md https://goguava.ai/docs/coding-agent-starter.md`} language="bash" />

### Run an Example

<LanguageTabs
  pythonContent={<>
    <Prose>Examples can be run directly from the Python SDK. You can browse the examples <a href="https://github.com/goguava-ai/python-sdk/tree/main/guava/examples">on GitHub</a>.</Prose>
    <CodeBlock code={
`# Outbound call example. Use your own phone number and name to receive a call.
python -m guava.examples.scheduling_outbound +1... "John Doe"

# Inbound example. Dial your agent's number while the script is running.
python -m guava.examples.restaurant_waitlist`} language="bash" />
  </>}
  typescriptContent={<>
    <Prose>Examples can be run directly from the TypeScript SDK. You can browse the examples <a href="https://github.com/goguava-ai/typescript-sdk/tree/main/examples">on GitHub</a></Prose>
    <CodeBlock code={
`# Outbound call example. Use your own phone number and name to receive a call.
npx @guava-ai/guava-sdk scheduling-outbound +15556667777

# Inbound example. Dial your agent's number while the script is running.
npx @guava-ai/guava-sdk restaurant-waitlist`} language="bash" />
  </>}
/>

<NextLink section="inbound-rag-example" label="Inbound Example w/ RAG" />