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

# Quickstart

> Install the SDK, configure a project key, declare a tool, and run your first Sikaru-managed agent with Experience capture for continual learning.

This guide takes a product server from zero to one Sikaru-managed agent run. The example defines a `support` agent with a local CRM tool, sends a user request, and records the completed Experience so Sikaru can learn from production outcomes, failures, feedback, and eval evidence over time.

## Prerequisites

* A Sikaru project.
* A project-scoped API key stored on your server.
* Python 3.10+ or Node.js 18+.

<Warning>
  Do not expose `SIKARU_API_KEY` in browser bundles, mobile apps, or customer-controlled code.
</Warning>

## 1. Install the SDK

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

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

## 2. Configure the server environment

```bash theme={null}
export SIKARU_API_KEY="sk_sikaru_..."
export SIKARU_PROJECT_ID="proj_..."
```

Optional override for non-production environments:

```bash theme={null}
export SIKARU_API_URL="https://api.sikaru.ai"
```

## 3. Create a project client

<Tabs>
  <Tab title="Python">
    ```python theme={null}
    from sikaru_sdk import Sikaru, tool

    sikaru = Sikaru(project="proj_123")
    ```
  </Tab>

  <Tab title="TypeScript">
    ```ts theme={null}
    import { createSikaru, tool } from "@sikaru/sdk";

    const sikaru = createSikaru({
      apiKey: process.env.SIKARU_API_KEY!,
      project: process.env.SIKARU_PROJECT_ID!,
      baseUrl: process.env.SIKARU_API_URL,
    });
    ```
  </Tab>
</Tabs>

## 4. Declare a product-owned tool

Local tools run in your process. Sikaru sees the declared capability name and the returned result, not your internal credentials.

<Tabs>
  <Tab title="Python">
    ```python theme={null}
    @tool("crm.search", description="Search CRM account records.")
    def search_crm(account_id: str):
        return {"risk": "legal review", "account_id": account_id}
    ```
  </Tab>

  <Tab title="TypeScript">
    ```ts theme={null}
    const searchCrm = tool({
      capability: "crm.search",
      description: "Search CRM account records.",
      inputSchema: { type: "object" },
      execute: async ({ accountId }) => {
        return { risk: "legal review", accountId };
      },
    });
    ```
  </Tab>
</Tabs>

## 5. Run the agent

<Tabs>
  <Tab title="Python">
    ```python theme={null}
    support = sikaru.agent("support", tools=[search_crm])

    result = support.respond(
        messages=[{"role": "user", "content": "Find renewal risk for Acme."}],
        user="user_123",
        conversation="conv_123",
        tenant="tenant_123",
    )

    print(result.output)
    ```
  </Tab>

  <Tab title="TypeScript">
    ```ts theme={null}
    const support = sikaru.agent("support", {
      tools: { searchCrm },
    });

    const result = await support.respond({
      messages: [{ role: "user", content: "Find renewal risk for Acme." }],
      user: "user_123",
      conversation: "conv_123",
      tenant: "tenant_123",
    });

    console.log(result.output);
    ```
  </Tab>
</Tabs>

`respond(...)` starts a managed run, streams events back to the SDK, executes local tools when requested, records the final experience, and returns the final output.

## What happens next

After the first run, Sikaru has a managed run record and a captured Experience. As you add more traces, feedback, corrections, and eval rubrics, Sikaru can identify recurring misses and propose reviewed improvements.

<CardGroup cols={2}>
  <Card title="Stream and resume runs" icon="terminal" href="/docs/agents">
    Use lower-level run control when your app needs event-by-event rendering or recovery.
  </Card>

  <Card title="Record your own executions" icon="route" href="/docs/experience">
    Use `Experience` when your product already ran the agent behavior itself.
  </Card>
</CardGroup>
