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

# Quickstart

> Install Meerkat and run your first agent. Single binary, any provider.

## Install

<Tabs>
  <Tab title="Rust crate">
    ```toml Cargo.toml theme={null}
    [dependencies]
    meerkat = { version = "0.6.6", features = ["anthropic", "jsonl-store"] }
    meerkat-store = "0.6.6"
    meerkat-tools = "0.6.6"
    tokio = { version = "1", features = ["full"] }
    ```
  </Tab>

  <Tab title="Python">
    ```bash theme={null}
    pip install meerkat-sdk
    ```

    <Note>
      The SDK resolves `rkat-rpc` automatically by default and downloads it when needed. Install the standalone binary only if you want to manage it yourself.
    </Note>
  </Tab>

  <Tab title="TypeScript">
    ```bash theme={null}
    npm install @rkat/sdk
    ```

    <Note>
      The SDK resolves `rkat-rpc` automatically by default and downloads it when needed. Install the standalone binary only if you want to manage it yourself.
    </Note>
  </Tab>

  <Tab title="CLI">
    ```bash theme={null}
    cargo install rkat
    ```
  </Tab>
</Tabs>

<Note>
  Before your first run, set up provider credentials. The fastest path is environment variables; for realm-scoped bindings and OAuth flows, see [Auth](/guides/auth) and [Providers](/concepts/providers).
</Note>

## Run an agent

<Tabs>
  <Tab title="Rust">
    ```rust theme={null}
    use std::sync::Arc;
    use meerkat::{AgentBuilder, AgentFactory, AnthropicClient, JsonlStore};
    use meerkat_store::StoreAdapter;

    let api_key = std::env::var("ANTHROPIC_API_KEY")?;
    let store_dir = std::env::current_dir()?.join(".rkat").join("sessions");
    std::fs::create_dir_all(&store_dir)?;

    let factory = AgentFactory::new(store_dir.clone());
    let client = Arc::new(AnthropicClient::new(api_key)?);
    let llm = factory.build_llm_adapter(client, "claude-sonnet-4-6").await;
    let store = Arc::new(JsonlStore::new(store_dir));
    store.init().await?;
    let store = Arc::new(StoreAdapter::new(store));
    let tools = Arc::new(meerkat_tools::EmptyToolDispatcher);

    let mut agent = AgentBuilder::new()
        .model("claude-sonnet-4-6")
        .system_prompt("You are a helpful assistant. Be concise in your responses.")
        .max_tokens_per_turn(1024)
        .build(Arc::new(llm), tools, store)
        .await?;

    let result = agent
        .run("What is the capital of France? Answer in one sentence.".into())
        .await?;
    println!("Response: {}", result.text);
    ```
  </Tab>

  <Tab title="Python">
    ```python theme={null}
    from meerkat import MeerkatClient

    client = MeerkatClient()
    await client.connect()
    result = await client.create_session(prompt="What is the capital of France?")
    print(result.text)
    await client.close()
    ```
  </Tab>

  <Tab title="TypeScript">
    ```typescript theme={null}
    import { MeerkatClient } from "@rkat/sdk";

    const client = new MeerkatClient();
    await client.connect();
    const result = await client.createSession("What is the capital of France?");
    console.log(result.text);
    await client.close();
    ```
  </Tab>

  <Tab title="CLI">
    ```bash theme={null}
    export ANTHROPIC_API_KEY=sk-...
    rkat run "What is the capital of France?"
    ```
  </Tab>
</Tabs>

<Note>
  To share state across processes/surfaces, pass the same explicit realm (`--realm` for CLI, `realm_id`/`realmId` for SDK clients). See [realms](/concepts/realms).
</Note>

## Switch providers

Same code, different model. The provider is resolved from the model registry:

```bash theme={null}
rkat run --model claude-sonnet-4-6 "Explain monads"
rkat run --model gpt-5.5 "Explain monads"
rkat run --model gemini-3-flash-preview "Explain monads"
```

## Add tools

Register an MCP server and its tools are available to the agent immediately:

```bash theme={null}
rkat mcp add filesystem -- npx -y @modelcontextprotocol/server-filesystem /tmp
rkat run "List the files in /tmp"
```

## Enforce budgets

Cap token usage, wall-clock time, or tool calls:

```bash theme={null}
rkat run --max-tokens 10000 --max-duration 30s --max-tool-calls 5 "Analyze this codebase"
```

The agent completes its current turn when a limit is hit, then stops.

## What's next

* [Examples gallery](/examples/gallery) -- the central real-code hub after your first successful run
* [Sessions example](/examples/sessions) -- the best next stop if you want the core multi-turn flow first
* [Auth](/guides/auth) -- environment vars, realms, bindings, and OAuth flows
* [Providers](/concepts/providers) -- model tables and provider parameters
* [Rust SDK](/rust/overview) / [Python SDK](/sdks/python/overview) / [TypeScript SDK](/sdks/typescript/overview) -- full API reference

<Note>
  For a maintained repository starter, see the Rust example in the Meerkat repository under `meerkat/examples/simple.rs`.
</Note>
