---
title: "Advanced Configuration"
---
In AgentOps fashion, you only need to add one line of "code" to your `.env` file 😊
```python .env
AGENTOPS_API_KEY=
```
Find your AgentOps API Key in your Settings > [Projects & API Keys](https://app.agentops.ai/settings/projects) page.
#### Optional settings:
```python .env
# The AgentOps API endpoint. Defaults to https://api.agentops.ai
AGENTOPS_API_ENDPOINT=https://api.agentops.ai
# Logging level. . Defaults to INFO
AGENTOPS_LOG_LEVEL=INFO
# Write logs to file . Defaults to TRUE
AGENTOPS_LOGGING_TO_FILE=TRUE
# Whether to opt out of recording environment data. . Defaults to FALSE
AGENTOPS_ENV_DATA_OPT_OUT=FALSE
```