# Integrating the Opik Platform with Your Agent

This guide helps you integrate the Opik platform with your existing Agent. The goal of this guide is to help you log your first traces and start tracking your prompts and agent configuration in Opik.

## Prerequisites

Before you begin, you’ll need to choose how you want to use Opik:

- **Opik Cloud**: Create a free account at [comet.com/opik](/content/signup?from=llm&utm_source=opik&utm_medium=colab&utm_content=quickstart&utm_campaign=opik/index.html)
- **Self-hosting**: Follow the [self-hosting guide](/content/docs/opik/self-host/overview/index.html) to deploy Opik locally or on Kubernetes

## Logging your first LLM calls

Opik makes it easy to integrate with your existing LLM application. Pick the tab that matches your stack and follow the three steps to log your first trace:

###### Python SDK

###### TypeScript SDK

###### OpenAI (Python)

###### OpenAI (TS)

###### LangGraph

###### AI integration

###### All integrations

If you are using the Python function decorator, you can integrate by:

[1](/content/docs/opik/quickstart#step/index.html)

Install the Opik Python SDK:

```
pip install opik
```

[2](/content/docs/opik/quickstart#step-1/index.html)

Configure the Opik Python SDK:

```
opik configure
```

[3](/content/docs/opik/quickstart#step-2/index.html)

Wrap your function with the `@track` decorator:

```
from opik import track

@track
def my_function(input: str) -> str:
    return input
```

All calls to the `my_function` will now be logged to Opik. This works well for any function even nested ones and is also supported by most integrations (just wrap any parent function with the `@track` decorator).

## Analyze your traces

After running your application, you will start seeing your traces in Opik and you can use Ollie to analyze them and improve your agent.

If you don’t see traces appearing, reach out to us on [Slack](https://chat.comet.com/) or raise an issue on [GitHub](https://github.com/comet-ml/opik/issues) and we’ll help you troubleshoot.

## Next steps

Now that you have logged your first traces, here’s what to explore next:

1. [In depth guide on agent observability](/content/docs/opik/tracing/advanced/log_traces/index.html): Learn how to customize the data that is logged to Opik and how to log conversations.
2. [Opik Experiments](/content/docs/opik/evaluation/concepts/index.html): Opik allows you to automate the evaluation process of your LLM application so that you no longer need to manually review every LLM response.
3. [Opik’s evaluation metrics](/content/docs/opik/evaluation/metrics/overview/index.html): Opik provides a suite of evaluation metrics (Hallucination, Answer Relevance, Context Recall, etc.) that you can use to score your LLM responses.
