---
title: Cohere
description: "AgentOps provides first class support for Cohere"
---
import CodeTooltip from '/snippets/add-code-tooltip.mdx'
import EnvTooltip from '/snippets/add-env-tooltip.mdx'
[Cohere](https://cohere.com) models can now be tracked with AgentOps. Explore the [Cohere API](https://docs.cohere.com) for more information.
Cohere's [LLM University](https://cohere.com/llmu) is a great resource for learning about LLMs with a lot of hands on examples.
First class support for Command-R-Plus

# Steps to integrate Cohere with AgentOps
```bash pip
pip install agentops
```
```bash poetry
poetry add agentops
```
`cohere>=5.4.0` is currently supported.
```bash pip
pip install cohere
```
```bash poetry
poetry add cohere
```
```python python
import agentops
agentops.init()
co = cohere.Client()
...
# End of program (e.g. main.py)
agentops.end_session("Success") # Success|Fail|Indeterminate
```
Requires `cohere>=5.4.0`
```python .env
AGENTOPS_API_KEY=
```
Read more about environment variables in [Advanced Configuration](/v1/usage/advanced-configuration)
Execute your program and visit [app.agentops.ai/drilldown](https://app.agentops.ai/drilldown) to observe your Agent! 🕵️
After your run, AgentOps prints a clickable url to console linking directly to your session in the Dashboard
{/* Intentionally blank div for newline */}
## Full Examples
```python chat()
import cohere
import agentops
agentops.init()
co = cohere.Client()
chat = co.chat(
message="Is it pronounced ceaux-hear or co-hehray?"
)
print(chat)
agentops.end_session('Success')
```
```python chat_stream()
import cohere
import agentops
agentops.init()
co = cohere.Client()
stream = co.chat_stream(
message="Write me a haiku about the synergies between Cohere and AgentOps"
)
for event in stream:
if event.event_type == "text-generation":
print(event.text, end='')
agentops.end_session('Success')
```