Skip to content

Commit 316936a

Browse files
committed
better docs
1 parent bbbdad5 commit 316936a

6 files changed

Lines changed: 303 additions & 113 deletions

File tree

docs/mint.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@
158158
"pages": [
159159
"v2/concepts/core-concepts",
160160
"v2/concepts/decorators",
161-
"v2/concepts/sessions",
161+
"v2/concepts/traces",
162162
"v2/concepts/spans",
163163
"v2/concepts/tags"
164164
],

docs/v2/concepts/sessions.mdx

Lines changed: 0 additions & 92 deletions
This file was deleted.

docs/v2/concepts/tags.mdx

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,28 +4,32 @@ description: 'Organize and filter your sessions with customizable tags'
44
---
55
## Adding Tags
66

7-
You can add tags when initializing AgentOps, which is the most common approach:
7+
You can add tags when initializing AgentOps, whicreh is the most common approach:
88

99
```python
1010
import agentops
1111

1212
# Initialize AgentOps with tags
1313
agentops.init(
1414
api_key="YOUR_API_KEY",
15-
tags=["production", "customer-service", "gpt-4"]
15+
default_tags=["production", "customer-service", "gpt-4"]
1616
)
1717
```
1818

19-
Alternatively, when using manual session creation:
19+
Alternatively, when using manual trace creation:
2020

2121
```python
2222
# Initialize without auto-starting a session
2323
agentops.init(api_key="YOUR_API_KEY", auto_start_session=False)
2424

25-
# Later start a session with specific tags
26-
agentops.start_session(tags=["development", "testing", "claude-3"])
25+
# Later start a trace with specific tags (modern approach)
26+
trace = agentops.start_trace(trace_name="test_workflow", default_tags=["development", "testing", "claude-3"])
2727
```
2828

29+
<Note>
30+
Legacy approach using `agentops.start_session(default_tags=["development", "testing", "claude-3"])` is deprecated and will be removed in v4.0. Use `agentops.start_trace()` instead.
31+
</Note>
32+
2933
## Tag Use Cases
3034

3135
Tags can be used for various purposes:
@@ -35,39 +39,39 @@ Tags can be used for various purposes:
3539
Tag sessions based on their environment:
3640

3741
```python
38-
tags=["production"] # or ["development", "staging", "testing"]
42+
default_tags=["production"] # or ["development", "staging", "testing"]
3943
```
4044

4145
### Feature Tracking
4246

4347
Tag sessions related to specific features or components:
4448

4549
```python
46-
tags=["search-functionality", "user-authentication", "content-generation"]
50+
default_tags=["search-functionality", "user-authentication", "content-generation"]
4751
```
4852

4953
### User Segmentation
5054

5155
Tag sessions based on user characteristics:
5256

5357
```python
54-
tags=["premium-user", "new-user", "enterprise-customer"]
58+
default_tags=["premium-user", "new-user", "enterprise-customer"]
5559
```
5660

5761
### Experiment Tracking
5862

5963
Tag sessions as part of specific experiments:
6064

6165
```python
62-
tags=["experiment-123", "control-group", "variant-A"]
66+
default_tags=["experiment-123", "control-group", "variant-A"]
6367
```
6468

6569
### Model Identification
6670

6771
Tag sessions with the models being used:
6872

6973
```python
70-
tags=["gpt-4", "claude-3-opus", "mistral-large"]
74+
default_tags=["gpt-4", "claude-3-opus", "mistral-large"]
7175
```
7276

7377
## Viewing Tagged Sessions

0 commit comments

Comments
 (0)