You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/v1/concepts/core-concepts.mdx
-2Lines changed: 0 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -47,8 +47,6 @@ AgentOps can exist in one of two states:
47
47
48
48
By default, AgentOps operates in single-session mode. All of the [base SDK functions](/v1/usage/sdk-reference) work as expected.
49
49
50
-
<Note>Under the hood, when you only have one session at a time, AgentOps can use functions like `agentops.add_tags(...)` and know that you want to perform the function on the one and only active session.</Note>
51
-
52
50
As soon as you create a second session, AgentOps enters **Multi-Session Mode**. As long as more than one session is active, the [base SDK functions](/v1/usage/sdk-reference) will no longer work.
53
51
54
52
If multiple sessions exist, you are expected to call the function on the relevant session. Ex
Copy file name to clipboardExpand all lines: docs/v1/concepts/sessions.mdx
+1-12Lines changed: 1 addition & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -41,17 +41,6 @@ Optionally, sessions may include:
41
41
**Params**
42
42
-**event** ([Event](/v1/concepts/events#event-class)): The Event to record as part of the session
43
43
44
-
45
-
#### `add_tags`
46
-
**Params**
47
-
-**tags** (List[str]): a list of tags to assign to append to the current tags
48
-
49
-
#### `set_tags`
50
-
**Params**
51
-
-**tags** (List[str]): a list of tags to assign to append to set
52
-
53
-
_Note: Overrides any current tags_
54
-
55
44
#### `get_analytics`
56
45
**Returns** (dict): A dictionary containing various analytics metrics for the session.
57
46
@@ -183,7 +172,7 @@ _More info for the curious_
183
172
184
173
Under the hood, `agentops.init()` creates a `Client` object with various configuration options. Whenever you start a new session, these configuration options will automatically
185
174
be applied. You can also apply different configuration options when you start a new session by passing in a
Copy file name to clipboardExpand all lines: docs/v1/usage/multiple-sessions.mdx
+2-38Lines changed: 2 additions & 38 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,8 +9,6 @@ In most development and scripting use cases, having only one session active at a
9
9
10
10
By default, AgentOps operates in single-session mode. All of the [base SDK functions](/v1/usage/sdk-reference) work as expected.
11
11
12
-
<Note>Under the hood, when you only have one session at a time, AgentOps can use functions like `agentops.add_tags(...)` and know that you want to perform the function on the one and only active session.</Note>
13
-
14
12
As soon as you create a second session, AgentOps enters **Multi-Session Mode**. As long as more than one session is active, the [base SDK functions](/v1/usage/sdk-reference) will no longer work.
15
13
16
14
If multiple sessions exist, you are expected to call the function on the relevant session. Ex:
@@ -63,14 +61,10 @@ Functions on `agentops` will no longer work in multi-session mode
[//]: #(<Warning>Passing `session` as a keyword parameter is functional, but will likely show an Unexpected Argument warning.</Warning>)
218
182
219
183
If you make an LLM completion call without one of these methods while you currently have more than one active session, a `MultiSessionException` will be raised.
220
184
221
185
222
186
# Exceptions
223
187
188
+
224
189
### `MultiSessionException`
225
-
_"If multiple sessions exist, you must use session.function(). Example: session.add_tags(...) instead of agentops.add_tags(...)."_
226
190
227
191
Receiving this exception means that you tried to perform a function on the SDK base, but at runtime had more than one active session.
228
192
229
193
### `NoSessionException`
230
-
A [session](/v1/concepts/session) action was attempted while no session existed on the client.
194
+
A [session](/v1/concepts/session) action was attempted while no session existed on the client.
Copy file name to clipboardExpand all lines: docs/v1/usage/sdk-reference.mdx
+2-43Lines changed: 2 additions & 43 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -16,7 +16,6 @@ The first element of AgentOps is always calling .init()
16
16
**Parameters**:
17
17
18
18
-`api_key` (str, optional): API Key for AgentOps services. If not provided, the key will be read from the `AGENTOPS_API_KEY` environment variable.
19
-
-`parent_key` (str, optional): Organization key to give visibility of all user sessions within the user's organization. If not provided, the key will be read from the `AGENTOPS_PARENT_KEY` environment variable.
20
19
-`endpoint` (str, optional): The endpoint for the AgentOps service. Defaults to 'https://api.agentops.ai'.
21
20
-`max_wait_time` (int, optional): The maximum time to wait in milliseconds before flushing the queue. Defaults to 30,000 (30 seconds).
22
21
-`max_queue_size` (int, optional): The maximum size of the event queue. Defaults to 100.
@@ -40,7 +39,7 @@ Start a new [Session](/v1/concepts/sessions) for recording events.
40
39
**Parameters**:
41
40
42
41
-`tags` (List[str], optional): Tags for the session.
-`inherited_session_id` (str, optional): Session ID to continue from an existing session.
45
44
46
45
**Returns**:
@@ -71,25 +70,6 @@ Record an event with the AgentOps service.
71
70
72
71
---
73
72
74
-
### `add_tags()`
75
-
76
-
Append to session tags at runtime.
77
-
78
-
**Parameters**:
79
-
80
-
-`tags` (List[str]): The list of tags to append.
81
-
82
-
---
83
-
84
-
### `set_tags()`
85
-
86
-
Replace session tags at runtime.
87
-
88
-
**Parameters**:
89
-
90
-
-`tags` (List[str]): The list of tags to set.
91
-
92
-
---
93
73
94
74
### `get_api_key()`
95
75
@@ -101,37 +81,17 @@ Retrieve the API key used by the client.
101
81
102
82
---
103
83
104
-
### `set_parent_key()`
105
-
106
-
Set the parent API key which has visibility over projects it is a parent of.
107
-
108
-
**Parameters**:
109
-
110
-
-`parent_key` (str): The API key of the parent organization to set.
111
-
112
-
---
113
-
114
-
### `stop_instrumenting()`
115
-
116
-
Stops instrumenting LLM calls. This is typically used by agent frameworks (i.e., [CrewAI](/v1/integrations/crewai) and
117
-
[AG2](/v1/integrations/autogen)) to stop using AgentOps' auto-instrumentation of LLM libraries such as OpenAI. This
118
-
allows these frameworks to use their own instrumenting or callback handler.
119
-
120
-
121
-
122
-
123
84
124
85
## Types
125
86
---
126
87
127
-
### `Configuration`
88
+
### `Config`
128
89
129
90
Stores the configuration settings for AgentOps clients.
130
91
131
92
**Parameters**:
132
93
133
94
-`api_key` (str, optional): API Key for AgentOps services. If not provided, the key will be read from the `AGENTOPS_API_KEY` environment variable. If no key is found, a `ConfigurationError` is raised.
134
-
-`parent_key` (str, optional): Organization key to give visibility of all user sessions within the user's organization. If not provided, the key will be read from the `AGENTOPS_PARENT_KEY` environment variable.
135
95
-`endpoint` (str, optional): The endpoint for the AgentOps service. If not provided, the endpoint will be read from the `AGENTOPS_API_ENDPOINT` environment variable. Defaults to 'https://api.agentops.ai'.
136
96
-`max_wait_time` (int, optional): The maximum time to wait in milliseconds before flushing the queue. Defaults to 30000.
137
97
-`max_queue_size` (int, optional): The maximum size of the event queue. Defaults to 100.
@@ -142,7 +102,6 @@ Stores the configuration settings for AgentOps clients.
142
102
-**endpoint** (str): Get or set the endpoint for the AgentOps service.
143
103
-**max_wait_time** (int): Get or set the maximum wait time in milliseconds before flushing the queue.
144
104
-**max_queue_size** (int): Get or set the maximum size of the event queue.
145
-
-**parent_key** (str, optional): Get or set the organization key for session visibility.
Copy file name to clipboardExpand all lines: docs/v1/usage/tracking-llm-calls.mdx
-8Lines changed: 0 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -28,14 +28,6 @@ To get started, just follow the quick start guide.
28
28
</Card>
29
29
</CardGroup>
30
30
31
-
### Stop Tracking LLM Calls
32
-
33
-
To stop tracking LLM calls after running `agentops.init()`, you can call `agentops.stop_instrumenting()`.
34
-
35
-
This function reverts the changes made to your LLM provider's module, removing AgentOps instrumentation.
36
-
37
-
_Special consideration for Cohere: Calling `stop_instrumenting()` has no effect on previously instantiated Cohere clients. You must create a new Cohere client after calling this function._
0 commit comments