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

# Llama Stack

> Llama Stack is a framework from Meta AI for building Agentic applications.

AgentOps integrates with Llama Stack via its python [client](https://github.com/meta-llama/llama-stack-client-python) to provide observability into applications that leverage it.

Llama Stack has comprehensive [documentation](https://llama-stack.readthedocs.io/) available as well as a great [quickstart](https://llama-stack.readthedocs.io/en/latest/getting_started/index.html) guide. You can use this guide to setup the Llama Stack server and client or alternatively use our Docker [compose](https://github.com/AgentOps-AI/agentops/blob/main/examples/llama_stack_client_examples/docker-compose.yml) file.

[YouTube video player](https://www.youtube.com/embed/OZgTN4SdQ2Y)

## Adding AgentOps to Llama Stack applications

**1. Install the AgentOps SDK**

```bash pip  theme={null}
pip install agentops
```

```bash poetry theme={null}
poetry add agentops
```

**2. Install the Llama Stack Client**

```bash pip theme={null}
pip install llama-stack-client
```

```bash poetry theme={null}
poetry add llama-stack-client
```

**3. Add 3 lines of code**

> [!NOTE]
>
> Make sure to call `agentops.init` before calling any `openai`, `cohere`, `crew`, etc models.

```python python theme={null}
import agentops
agentops.init(<INSERT YOUR API KEY HERE>)
```

> [!TIP]
>
> Set your API key as an `.env` variable for easy access.

```python .env theme={null}
AGENTOPS_API_KEY=<YOUR API KEY>
```

Read more about environment variables in [Advanced Configuration](https://docs.agentops.ai/v1/usage/advanced-configuration.md)

**4. Run your 🦙🥞 application**

Execute your program and visit [app.agentops.ai/drilldown](https://app.agentops.ai/drilldown) to observe your waterfall! 🕵️

> [!TIP]
>
> After your run, AgentOps prints a clickable url to console linking directly to your session in the Dashboard

## Examples

An example notebook is available [here](https://github.com/AgentOps-AI/agentops/blob/main/examples/llama_stack_client_examples/notebook.ipynb) to showcase how to use the Llama Stack client with AgentOps.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.