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

# Quick Start

> Send your first agent trace to AgentVista in under 5 minutes.

Get your first trace into the dashboard by following these steps.

<Steps>
  <Step title="Sign up">
    Create your account at [agentvista.dev](https://agentvista.dev). The free tier gives you 3 agents and 500 runs per month — no credit card required.
  </Step>

  <Step title="Create an API key">
    In the dashboard, go to **Settings → API Keys → Create Key**. Give it a name (e.g., `dev`) and select the `write` scope.

    <Warning>
      Copy the key immediately — it is shown only once and cannot be retrieved later.
    </Warning>

    Your key will look like `av_a1b2c3d4...` (64 hex characters after the prefix).
  </Step>

  <Step title="Install the SDK">
    <CodeGroup>
      ```bash Base theme={null}
      pip install agentvista
      ```

      ```bash With Anthropic theme={null}
      pip install agentvista[anthropic]
      ```

      ```bash With OpenAI theme={null}
      pip install agentvista[openai]
      ```
    </CodeGroup>
  </Step>

  <Step title="Initialize at startup">
    Call `agentvista.init()` once when your application starts — before any agents run.

    ```python theme={null}
    import agentvista

    agentvista.init(api_key="av_a1b2c3d4...")
    # Or from an environment variable:
    # agentvista.init(api_key=os.environ["AGENTVISTA_API_KEY"])
    ```
  </Step>

  <Step title="Instrument your agent">
    Add the `@agentvista.trace_agent` decorator to any function that runs your agent logic. Every call becomes a trace in the dashboard.

    ```python theme={null}
    import agentvista

    agentvista.init(api_key="av_a1b2c3d4...")

    @agentvista.trace_agent
    def classify_support_ticket(ticket: str) -> str:
        # Your existing agent code — no other changes needed
        response = call_your_llm(ticket)
        return response

    # Call it normally
    classify_support_ticket("Customer can't log in")
    ```

    <Note>
      If AgentVista is unreachable, your agent continues normally. The SDK drops events silently — it never blocks or crashes your application.
    </Note>
  </Step>

  <Step title="View your trace">
    Open the AgentVista dashboard and navigate to **Agents**. Your agent appears automatically — click it to see the trace waterfall, timing, and status.
  </Step>
</Steps>

## Set an outcome

Tell AgentVista whether a run succeeded. Use the `run()` context manager for explicit control:

```python theme={null}
import agentvista

agentvista.init(api_key="av_a1b2c3d4...")

def classify_support_ticket(ticket: str) -> dict:
    with agentvista.run("support-classifier") as r:
        result = call_your_llm(ticket)
        r.set_outcome(success=result["resolved"], outcome=result["category"])
        return result
```

Outcomes appear as a **Success Rate** chart per agent in the dashboard.

## Next steps

<CardGroup cols={2}>
  <Card title="Tracing" icon="diagram-project" href="/sdk/tracing">
    Explore decorators, context managers, child spans, and distributed tracing.
  </Card>

  <Card title="Anthropic Adapter" icon="robot" href="/integrations/anthropic">
    Auto-capture token counts and cost from Claude responses.
  </Card>

  <Card title="OpenAI Adapter" icon="microchip" href="/integrations/openai">
    Auto-capture token counts and cost from OpenAI responses.
  </Card>

  <Card title="OpenTelemetry" icon="satellite-dish" href="/sdk/opentelemetry">
    Send infrastructure metrics and logs alongside your agent traces.
  </Card>
</CardGroup>
