ioa-observe-sdk 1.0.1__tar.gz → 1.0.3__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (53) hide show
  1. {ioa_observe_sdk-1.0.1/ioa_observe_sdk.egg-info → ioa_observe_sdk-1.0.3}/PKG-INFO +13 -79
  2. ioa_observe_sdk-1.0.3/README.md +83 -0
  3. {ioa_observe_sdk-1.0.1 → ioa_observe_sdk-1.0.3}/ioa_observe/sdk/tracing/tracing.py +1 -1
  4. {ioa_observe_sdk-1.0.1 → ioa_observe_sdk-1.0.3/ioa_observe_sdk.egg-info}/PKG-INFO +13 -79
  5. {ioa_observe_sdk-1.0.1 → ioa_observe_sdk-1.0.3}/ioa_observe_sdk.egg-info/requires.txt +7 -5
  6. {ioa_observe_sdk-1.0.1 → ioa_observe_sdk-1.0.3}/pyproject.toml +8 -6
  7. ioa_observe_sdk-1.0.1/README.md +0 -151
  8. {ioa_observe_sdk-1.0.1 → ioa_observe_sdk-1.0.3}/LICENSE.md +0 -0
  9. {ioa_observe_sdk-1.0.1 → ioa_observe_sdk-1.0.3}/ioa_observe/__init__.py +0 -0
  10. {ioa_observe_sdk-1.0.1 → ioa_observe_sdk-1.0.3}/ioa_observe/sdk/__init__.py +0 -0
  11. {ioa_observe_sdk-1.0.1 → ioa_observe_sdk-1.0.3}/ioa_observe/sdk/client/__init__.py +0 -0
  12. {ioa_observe_sdk-1.0.1 → ioa_observe_sdk-1.0.3}/ioa_observe/sdk/client/client.py +0 -0
  13. {ioa_observe_sdk-1.0.1 → ioa_observe_sdk-1.0.3}/ioa_observe/sdk/client/http.py +0 -0
  14. {ioa_observe_sdk-1.0.1 → ioa_observe_sdk-1.0.3}/ioa_observe/sdk/config/__init__.py +0 -0
  15. {ioa_observe_sdk-1.0.1 → ioa_observe_sdk-1.0.3}/ioa_observe/sdk/connectors/__init__.py +0 -0
  16. {ioa_observe_sdk-1.0.1 → ioa_observe_sdk-1.0.3}/ioa_observe/sdk/connectors/slim.py +0 -0
  17. {ioa_observe_sdk-1.0.1 → ioa_observe_sdk-1.0.3}/ioa_observe/sdk/decorators/__init__.py +0 -0
  18. {ioa_observe_sdk-1.0.1 → ioa_observe_sdk-1.0.3}/ioa_observe/sdk/decorators/base.py +0 -0
  19. {ioa_observe_sdk-1.0.1 → ioa_observe_sdk-1.0.3}/ioa_observe/sdk/decorators/util.py +0 -0
  20. {ioa_observe_sdk-1.0.1 → ioa_observe_sdk-1.0.3}/ioa_observe/sdk/instrumentations/__init__.py +0 -0
  21. {ioa_observe_sdk-1.0.1 → ioa_observe_sdk-1.0.3}/ioa_observe/sdk/instrumentations/slim.py +0 -0
  22. {ioa_observe_sdk-1.0.1 → ioa_observe_sdk-1.0.3}/ioa_observe/sdk/instruments.py +0 -0
  23. {ioa_observe_sdk-1.0.1 → ioa_observe_sdk-1.0.3}/ioa_observe/sdk/logging/__init__.py +0 -0
  24. {ioa_observe_sdk-1.0.1 → ioa_observe_sdk-1.0.3}/ioa_observe/sdk/logging/logging.py +0 -0
  25. {ioa_observe_sdk-1.0.1 → ioa_observe_sdk-1.0.3}/ioa_observe/sdk/metrics/__init__.py +0 -0
  26. {ioa_observe_sdk-1.0.1 → ioa_observe_sdk-1.0.3}/ioa_observe/sdk/metrics/agent.py +0 -0
  27. {ioa_observe_sdk-1.0.1 → ioa_observe_sdk-1.0.3}/ioa_observe/sdk/metrics/agents/__init__.py +0 -0
  28. {ioa_observe_sdk-1.0.1 → ioa_observe_sdk-1.0.3}/ioa_observe/sdk/metrics/agents/agent_connections.py +0 -0
  29. {ioa_observe_sdk-1.0.1 → ioa_observe_sdk-1.0.3}/ioa_observe/sdk/metrics/agents/availability.py +0 -0
  30. {ioa_observe_sdk-1.0.1 → ioa_observe_sdk-1.0.3}/ioa_observe/sdk/metrics/agents/heuristics.py +0 -0
  31. {ioa_observe_sdk-1.0.1 → ioa_observe_sdk-1.0.3}/ioa_observe/sdk/metrics/agents/recovery_tracker.py +0 -0
  32. {ioa_observe_sdk-1.0.1 → ioa_observe_sdk-1.0.3}/ioa_observe/sdk/metrics/agents/tool_call_tracker.py +0 -0
  33. {ioa_observe_sdk-1.0.1 → ioa_observe_sdk-1.0.3}/ioa_observe/sdk/metrics/agents/tracker.py +0 -0
  34. {ioa_observe_sdk-1.0.1 → ioa_observe_sdk-1.0.3}/ioa_observe/sdk/metrics/metrics.py +0 -0
  35. {ioa_observe_sdk-1.0.1 → ioa_observe_sdk-1.0.3}/ioa_observe/sdk/telemetry.py +0 -0
  36. {ioa_observe_sdk-1.0.1 → ioa_observe_sdk-1.0.3}/ioa_observe/sdk/tracing/__init__.py +0 -0
  37. {ioa_observe_sdk-1.0.1 → ioa_observe_sdk-1.0.3}/ioa_observe/sdk/tracing/content_allow_list.py +0 -0
  38. {ioa_observe_sdk-1.0.1 → ioa_observe_sdk-1.0.3}/ioa_observe/sdk/tracing/context_manager.py +0 -0
  39. {ioa_observe_sdk-1.0.1 → ioa_observe_sdk-1.0.3}/ioa_observe/sdk/tracing/manual.py +0 -0
  40. {ioa_observe_sdk-1.0.1 → ioa_observe_sdk-1.0.3}/ioa_observe/sdk/utils/__init__.py +0 -0
  41. {ioa_observe_sdk-1.0.1 → ioa_observe_sdk-1.0.3}/ioa_observe/sdk/utils/const.py +0 -0
  42. {ioa_observe_sdk-1.0.1 → ioa_observe_sdk-1.0.3}/ioa_observe/sdk/utils/in_memory_span_exporter.py +0 -0
  43. {ioa_observe_sdk-1.0.1 → ioa_observe_sdk-1.0.3}/ioa_observe/sdk/utils/json_encoder.py +0 -0
  44. {ioa_observe_sdk-1.0.1 → ioa_observe_sdk-1.0.3}/ioa_observe/sdk/utils/package_check.py +0 -0
  45. {ioa_observe_sdk-1.0.1 → ioa_observe_sdk-1.0.3}/ioa_observe/sdk/version.py +0 -0
  46. {ioa_observe_sdk-1.0.1 → ioa_observe_sdk-1.0.3}/ioa_observe_sdk.egg-info/SOURCES.txt +0 -0
  47. {ioa_observe_sdk-1.0.1 → ioa_observe_sdk-1.0.3}/ioa_observe_sdk.egg-info/dependency_links.txt +0 -0
  48. {ioa_observe_sdk-1.0.1 → ioa_observe_sdk-1.0.3}/ioa_observe_sdk.egg-info/top_level.txt +0 -0
  49. {ioa_observe_sdk-1.0.1 → ioa_observe_sdk-1.0.3}/setup.cfg +0 -0
  50. {ioa_observe_sdk-1.0.1 → ioa_observe_sdk-1.0.3}/tests/test_client.py +0 -0
  51. {ioa_observe_sdk-1.0.1 → ioa_observe_sdk-1.0.3}/tests/test_instrumentor.py +0 -0
  52. {ioa_observe_sdk-1.0.1 → ioa_observe_sdk-1.0.3}/tests/test_manual_instrumentation.py +0 -0
  53. {ioa_observe_sdk-1.0.1 → ioa_observe_sdk-1.0.3}/tests/test_version.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: ioa-observe-sdk
3
- Version: 1.0.1
3
+ Version: 1.0.3
4
4
  Summary: IOA Observability SDK
5
5
  Requires-Python: >=3.10
6
6
  Description-Content-Type: text/markdown
@@ -41,16 +41,16 @@ Requires-Dist: opentelemetry-exporter-otlp-proto-grpc==1.33.1
41
41
  Requires-Dist: opentelemetry-exporter-otlp-proto-http==1.33.1
42
42
  Requires-Dist: opentelemetry-instrumentation
43
43
  Requires-Dist: opentelemetry-instrumentation-logging==0.54b1
44
- Requires-Dist: opentelemetry-instrumentation-openai==0.40.2
45
- Requires-Dist: opentelemetry-instrumentation-llamaindex==0.40.2
46
- Requires-Dist: opentelemetry-instrumentation-ollama==0.40.2
47
- Requires-Dist: opentelemetry-instrumentation-langchain==0.40.2
44
+ Requires-Dist: opentelemetry-instrumentation-openai==0.40.8
45
+ Requires-Dist: opentelemetry-instrumentation-llamaindex==0.40.8
46
+ Requires-Dist: opentelemetry-instrumentation-ollama==0.40.8
47
+ Requires-Dist: opentelemetry-instrumentation-langchain==0.40.8
48
48
  Requires-Dist: opentelemetry-instrumentation-threading==00.54b1
49
49
  Requires-Dist: opentelemetry-instrumentation-urllib3==0.54b1
50
50
  Requires-Dist: opentelemetry-proto==1.33.1
51
51
  Requires-Dist: opentelemetry-sdk==1.33.1
52
52
  Requires-Dist: opentelemetry-semantic-conventions==0.54b1
53
- Requires-Dist: opentelemetry-semantic-conventions-ai==0.4.5
53
+ Requires-Dist: opentelemetry-semantic-conventions-ai==0.4.9
54
54
  Requires-Dist: opentelemetry-util-http==0.54b1
55
55
  Requires-Dist: packaging==24.2
56
56
  Requires-Dist: propcache==0.3.0
@@ -73,6 +73,8 @@ Requires-Dist: zipp==3.21.0
73
73
  Requires-Dist: langgraph>=0.3.2
74
74
  Requires-Dist: langchain>=0.3.19
75
75
  Requires-Dist: langchain-openai>=0.3.8
76
+ Requires-Dist: langchain-community>=0.3.25
77
+ Requires-Dist: llama-index>=0.12.34
76
78
  Requires-Dist: opentelemetry-instrumentation-requests
77
79
  Requires-Dist: opentelemetry-instrumentation-transformers>=0.40.2
78
80
  Requires-Dist: opentelemetry-instrumentation-crewai>=0.40.2
@@ -88,8 +90,9 @@ IOA observability SDK for your multi-agentic application.
88
90
  ## Table of Contents
89
91
 
90
92
  - [Installation](#installation)
91
- - [Usage](#usage)
92
- - [Features](#features)
93
+ - [Dev](#dev)
94
+ - [Testing](#testing)
95
+ - [Getting Started](#getting-started)
93
96
  - [Contributing](#contributing)
94
97
 
95
98
  ## Installation
@@ -151,77 +154,8 @@ OPENAI_API_KEY=<KEY> make test
151
154
 
152
155
  ## Getting Started
153
156
 
154
- For getting started with the SDK, please refer to the [GETTING-STARTED.md](GETTING-STARTED.md) file. It contains detailed instructions on how to set up and use the SDK effectively.
155
-
156
- ## SLIM-Based Multi-Agentic Systems
157
-
158
- For distributed agent systems using SLIM protocol, additional instrumentation is available:
159
-
160
-
161
- ### Initializing the SLIM Connector with your agent
162
-
163
- ```python
164
- from ioa_observe.sdk.connectors.slim import SLIMConnector, process_slim_msg
165
- from ioa_observe.sdk.instrumentations.slim import SLIMInstrumentor
166
-
167
- # Initialize SLIM connector
168
- slim_connector = SLIMConnector(
169
- remote_org="cisco",
170
- remote_namespace="default",
171
- shared_space="chat",
172
- )
173
-
174
- # Register agents with the connector
175
- slim_connector.register("remote_client_agent")
176
-
177
- # Instrument SLIM communications
178
- SLIMInstrumentor().instrument()
179
- ```
180
-
181
- ### Receiving Messages with a Callback
182
-
183
- Add the decorator `process_slim_msg` to the callback function to process incoming messages. This function will be called whenever a message is received in the shared space.
184
-
185
- ```python
186
-
187
- # Define a callback to process incoming messages
188
- from ioa_observe.sdk.connectors.slim import SLIMConnector, process_slim_msg
189
- import json
190
- from typing import Dict, Any
191
-
192
- @process_slim_msg("remote_client_agent")
193
- async def send_and_recv(msg) -> Dict[str, Any]:
194
- """Send message to remote endpoint and wait for reply."""
195
- gateway = GatewayHolder.gateway
196
- session_info = GatewayHolder.session_info
197
-
198
- if gateway is not None:
199
- await gateway.publish(session_info, msg.encode(), "cisco", "default", "server")
200
- async with gateway:
201
- _, recv = await gateway.receive(session=session_info.id)
202
- else:
203
- raise RuntimeError("Gateway is not initialized yet!")
204
-
205
- response_data = json.loads(recv.decode("utf8"))
206
- return {"messages": response_data.get("messages", [])}
207
- ```
208
-
209
- ### Starting the Message Receiver
210
-
211
- ```python
212
- # Start receiving messages from the SLIM shared space
213
- await slim.receive(callback=on_message_received)
214
- ```
215
-
216
- ### Publishing Messages
217
-
218
- ```python
219
- # Publish a message to the SLIM shared space
220
- message = {"type": "ChatMessage", "author": "moderator", "message": "Hello, world!"}
221
- await slim.publish(msg=json.dumps(message).encode("utf-8"))
222
- ```
223
-
224
- We will observe various events and metrics being sent to the Otel collector as we interact with other agents in the shared space via SLIM.
157
+ For getting started with the SDK, please refer to the [Getting Started](https://github.com/agntcy/observe/blob/main/GETTING-STARTED.md)
158
+ file. It contains detailed instructions on how to set up and use the SDK effectively.
225
159
 
226
160
  ## Contributing
227
161
 
@@ -0,0 +1,83 @@
1
+ # Observe-SDK
2
+
3
+ IOA observability SDK for your multi-agentic application.
4
+
5
+ ## Table of Contents
6
+
7
+ - [Installation](#installation)
8
+ - [Dev](#dev)
9
+ - [Testing](#testing)
10
+ - [Getting Started](#getting-started)
11
+ - [Contributing](#contributing)
12
+
13
+ ## Installation
14
+
15
+ To install the package via PyPI, simply run:
16
+
17
+ ```bash
18
+ pip install ioa_observe_sdk
19
+ ```
20
+
21
+ Alternatively, to download the SDK from git, you could also use the following command. Ensure you have `uv` installed in your environment.
22
+
23
+ ```bash
24
+ uv add "git+https://github.com/agntcy/observe"
25
+ ```
26
+
27
+ ## Dev
28
+
29
+ To get started with development, start a Clickhouse DB and an OTel collector container locally using docker-compose like so:
30
+
31
+ ```
32
+ cd deploy/
33
+ docker compose up -d
34
+ ```
35
+
36
+ Ensure the contents of `otel-collector.yaml` is correct.
37
+
38
+ Check the logs of the collector to ensure it is running correctly:
39
+
40
+ ```
41
+ docker logs -f otel-collector
42
+ ```
43
+
44
+ Create a `.env` file with the following content:
45
+
46
+ ```bash
47
+ OTLP_HTTP_ENDPOINT=http://localhost:4318
48
+ ```
49
+
50
+ Install the dependencies and activate the virtual environment:
51
+
52
+ ```bash
53
+ set -a
54
+ source .env
55
+ set +a
56
+
57
+ python3 -m venv .venv
58
+ source .venv/bin/activate
59
+ uv sync
60
+ ```
61
+
62
+ ## Testing
63
+
64
+ To run the unit tests, ensure you have the `OPENAI_API_KEY` set in your environment. You can run the tests using the following command:
65
+
66
+ ```bash
67
+ OPENAI_API_KEY=<KEY> make test
68
+ ```
69
+
70
+ ## Getting Started
71
+
72
+ For getting started with the SDK, please refer to the [Getting Started](https://github.com/agntcy/observe/blob/main/GETTING-STARTED.md)
73
+ file. It contains detailed instructions on how to set up and use the SDK effectively.
74
+
75
+ ## Contributing
76
+
77
+ Contributions are welcome! Please follow these steps to contribute:
78
+
79
+ 1. Fork the repository.
80
+ 2. Create a new branch (`git checkout -b feature-branch`).
81
+ 3. Commit your changes (`git commit -am 'Add new feature'`).
82
+ 4. Push to the branch (`git push origin feature-branch`).
83
+ 5. Create a new Pull Request.
@@ -751,7 +751,7 @@ def init_google_generativeai_instrumentor():
751
751
 
752
752
  def init_langchain_instrumentor():
753
753
  try:
754
- if is_package_installed("langchain"):
754
+ if is_package_installed("langchain") or is_package_installed("langgraph"):
755
755
  Telemetry().capture("instrumentation:langchain:init")
756
756
  from opentelemetry.instrumentation.langchain import LangchainInstrumentor
757
757
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: ioa-observe-sdk
3
- Version: 1.0.1
3
+ Version: 1.0.3
4
4
  Summary: IOA Observability SDK
5
5
  Requires-Python: >=3.10
6
6
  Description-Content-Type: text/markdown
@@ -41,16 +41,16 @@ Requires-Dist: opentelemetry-exporter-otlp-proto-grpc==1.33.1
41
41
  Requires-Dist: opentelemetry-exporter-otlp-proto-http==1.33.1
42
42
  Requires-Dist: opentelemetry-instrumentation
43
43
  Requires-Dist: opentelemetry-instrumentation-logging==0.54b1
44
- Requires-Dist: opentelemetry-instrumentation-openai==0.40.2
45
- Requires-Dist: opentelemetry-instrumentation-llamaindex==0.40.2
46
- Requires-Dist: opentelemetry-instrumentation-ollama==0.40.2
47
- Requires-Dist: opentelemetry-instrumentation-langchain==0.40.2
44
+ Requires-Dist: opentelemetry-instrumentation-openai==0.40.8
45
+ Requires-Dist: opentelemetry-instrumentation-llamaindex==0.40.8
46
+ Requires-Dist: opentelemetry-instrumentation-ollama==0.40.8
47
+ Requires-Dist: opentelemetry-instrumentation-langchain==0.40.8
48
48
  Requires-Dist: opentelemetry-instrumentation-threading==00.54b1
49
49
  Requires-Dist: opentelemetry-instrumentation-urllib3==0.54b1
50
50
  Requires-Dist: opentelemetry-proto==1.33.1
51
51
  Requires-Dist: opentelemetry-sdk==1.33.1
52
52
  Requires-Dist: opentelemetry-semantic-conventions==0.54b1
53
- Requires-Dist: opentelemetry-semantic-conventions-ai==0.4.5
53
+ Requires-Dist: opentelemetry-semantic-conventions-ai==0.4.9
54
54
  Requires-Dist: opentelemetry-util-http==0.54b1
55
55
  Requires-Dist: packaging==24.2
56
56
  Requires-Dist: propcache==0.3.0
@@ -73,6 +73,8 @@ Requires-Dist: zipp==3.21.0
73
73
  Requires-Dist: langgraph>=0.3.2
74
74
  Requires-Dist: langchain>=0.3.19
75
75
  Requires-Dist: langchain-openai>=0.3.8
76
+ Requires-Dist: langchain-community>=0.3.25
77
+ Requires-Dist: llama-index>=0.12.34
76
78
  Requires-Dist: opentelemetry-instrumentation-requests
77
79
  Requires-Dist: opentelemetry-instrumentation-transformers>=0.40.2
78
80
  Requires-Dist: opentelemetry-instrumentation-crewai>=0.40.2
@@ -88,8 +90,9 @@ IOA observability SDK for your multi-agentic application.
88
90
  ## Table of Contents
89
91
 
90
92
  - [Installation](#installation)
91
- - [Usage](#usage)
92
- - [Features](#features)
93
+ - [Dev](#dev)
94
+ - [Testing](#testing)
95
+ - [Getting Started](#getting-started)
93
96
  - [Contributing](#contributing)
94
97
 
95
98
  ## Installation
@@ -151,77 +154,8 @@ OPENAI_API_KEY=<KEY> make test
151
154
 
152
155
  ## Getting Started
153
156
 
154
- For getting started with the SDK, please refer to the [GETTING-STARTED.md](GETTING-STARTED.md) file. It contains detailed instructions on how to set up and use the SDK effectively.
155
-
156
- ## SLIM-Based Multi-Agentic Systems
157
-
158
- For distributed agent systems using SLIM protocol, additional instrumentation is available:
159
-
160
-
161
- ### Initializing the SLIM Connector with your agent
162
-
163
- ```python
164
- from ioa_observe.sdk.connectors.slim import SLIMConnector, process_slim_msg
165
- from ioa_observe.sdk.instrumentations.slim import SLIMInstrumentor
166
-
167
- # Initialize SLIM connector
168
- slim_connector = SLIMConnector(
169
- remote_org="cisco",
170
- remote_namespace="default",
171
- shared_space="chat",
172
- )
173
-
174
- # Register agents with the connector
175
- slim_connector.register("remote_client_agent")
176
-
177
- # Instrument SLIM communications
178
- SLIMInstrumentor().instrument()
179
- ```
180
-
181
- ### Receiving Messages with a Callback
182
-
183
- Add the decorator `process_slim_msg` to the callback function to process incoming messages. This function will be called whenever a message is received in the shared space.
184
-
185
- ```python
186
-
187
- # Define a callback to process incoming messages
188
- from ioa_observe.sdk.connectors.slim import SLIMConnector, process_slim_msg
189
- import json
190
- from typing import Dict, Any
191
-
192
- @process_slim_msg("remote_client_agent")
193
- async def send_and_recv(msg) -> Dict[str, Any]:
194
- """Send message to remote endpoint and wait for reply."""
195
- gateway = GatewayHolder.gateway
196
- session_info = GatewayHolder.session_info
197
-
198
- if gateway is not None:
199
- await gateway.publish(session_info, msg.encode(), "cisco", "default", "server")
200
- async with gateway:
201
- _, recv = await gateway.receive(session=session_info.id)
202
- else:
203
- raise RuntimeError("Gateway is not initialized yet!")
204
-
205
- response_data = json.loads(recv.decode("utf8"))
206
- return {"messages": response_data.get("messages", [])}
207
- ```
208
-
209
- ### Starting the Message Receiver
210
-
211
- ```python
212
- # Start receiving messages from the SLIM shared space
213
- await slim.receive(callback=on_message_received)
214
- ```
215
-
216
- ### Publishing Messages
217
-
218
- ```python
219
- # Publish a message to the SLIM shared space
220
- message = {"type": "ChatMessage", "author": "moderator", "message": "Hello, world!"}
221
- await slim.publish(msg=json.dumps(message).encode("utf-8"))
222
- ```
223
-
224
- We will observe various events and metrics being sent to the Otel collector as we interact with other agents in the shared space via SLIM.
157
+ For getting started with the SDK, please refer to the [Getting Started](https://github.com/agntcy/observe/blob/main/GETTING-STARTED.md)
158
+ file. It contains detailed instructions on how to set up and use the SDK effectively.
225
159
 
226
160
  ## Contributing
227
161
 
@@ -34,16 +34,16 @@ opentelemetry-exporter-otlp-proto-grpc==1.33.1
34
34
  opentelemetry-exporter-otlp-proto-http==1.33.1
35
35
  opentelemetry-instrumentation
36
36
  opentelemetry-instrumentation-logging==0.54b1
37
- opentelemetry-instrumentation-openai==0.40.2
38
- opentelemetry-instrumentation-llamaindex==0.40.2
39
- opentelemetry-instrumentation-ollama==0.40.2
40
- opentelemetry-instrumentation-langchain==0.40.2
37
+ opentelemetry-instrumentation-openai==0.40.8
38
+ opentelemetry-instrumentation-llamaindex==0.40.8
39
+ opentelemetry-instrumentation-ollama==0.40.8
40
+ opentelemetry-instrumentation-langchain==0.40.8
41
41
  opentelemetry-instrumentation-threading==00.54b1
42
42
  opentelemetry-instrumentation-urllib3==0.54b1
43
43
  opentelemetry-proto==1.33.1
44
44
  opentelemetry-sdk==1.33.1
45
45
  opentelemetry-semantic-conventions==0.54b1
46
- opentelemetry-semantic-conventions-ai==0.4.5
46
+ opentelemetry-semantic-conventions-ai==0.4.9
47
47
  opentelemetry-util-http==0.54b1
48
48
  packaging==24.2
49
49
  propcache==0.3.0
@@ -66,6 +66,8 @@ zipp==3.21.0
66
66
  langgraph>=0.3.2
67
67
  langchain>=0.3.19
68
68
  langchain-openai>=0.3.8
69
+ langchain-community>=0.3.25
70
+ llama-index>=0.12.34
69
71
  opentelemetry-instrumentation-requests
70
72
  opentelemetry-instrumentation-transformers>=0.40.2
71
73
  opentelemetry-instrumentation-crewai>=0.40.2
@@ -5,7 +5,7 @@ build-backend = "setuptools.build_meta"
5
5
 
6
6
  [project]
7
7
  name = "ioa-observe-sdk"
8
- version = "1.0.1"
8
+ version = "1.0.3"
9
9
  description = "IOA Observability SDK"
10
10
  readme = "README.md"
11
11
  requires-python = ">=3.10"
@@ -46,16 +46,16 @@ dependencies = [
46
46
  "opentelemetry-exporter-otlp-proto-http==1.33.1",
47
47
  "opentelemetry-instrumentation",
48
48
  "opentelemetry-instrumentation-logging==0.54b1",
49
- "opentelemetry-instrumentation-openai==0.40.2",
50
- "opentelemetry-instrumentation-llamaindex==0.40.2",
51
- "opentelemetry-instrumentation-ollama==0.40.2",
52
- "opentelemetry-instrumentation-langchain==0.40.2",
49
+ "opentelemetry-instrumentation-openai==0.40.8",
50
+ "opentelemetry-instrumentation-llamaindex==0.40.8",
51
+ "opentelemetry-instrumentation-ollama==0.40.8",
52
+ "opentelemetry-instrumentation-langchain==0.40.8",
53
53
  "opentelemetry-instrumentation-threading==00.54b1",
54
54
  "opentelemetry-instrumentation-urllib3==0.54b1",
55
55
  "opentelemetry-proto==1.33.1",
56
56
  "opentelemetry-sdk==1.33.1",
57
57
  "opentelemetry-semantic-conventions==0.54b1",
58
- "opentelemetry-semantic-conventions-ai==0.4.5",
58
+ "opentelemetry-semantic-conventions-ai==0.4.9",
59
59
  "opentelemetry-util-http==0.54b1",
60
60
  "packaging==24.2",
61
61
  "propcache==0.3.0",
@@ -78,6 +78,8 @@ dependencies = [
78
78
  "langgraph>=0.3.2",
79
79
  "langchain>=0.3.19",
80
80
  "langchain-openai>=0.3.8",
81
+ "langchain-community>=0.3.25",
82
+ "llama-index>=0.12.34",
81
83
  "opentelemetry-instrumentation-requests",
82
84
  "opentelemetry-instrumentation-transformers>=0.40.2",
83
85
  "opentelemetry-instrumentation-crewai>=0.40.2",
@@ -1,151 +0,0 @@
1
- # Observe-SDK
2
-
3
- IOA observability SDK for your multi-agentic application.
4
-
5
- ## Table of Contents
6
-
7
- - [Installation](#installation)
8
- - [Usage](#usage)
9
- - [Features](#features)
10
- - [Contributing](#contributing)
11
-
12
- ## Installation
13
-
14
- To install the package via PyPI, simply run:
15
-
16
- ```bash
17
- pip install ioa_observe_sdk
18
- ```
19
-
20
- Alternatively, to download the SDK from git, you could also use the following command. Ensure you have `uv` installed in your environment.
21
-
22
- ```bash
23
- uv add "git+https://github.com/agntcy/observe"
24
- ```
25
-
26
- ## Dev
27
-
28
- To get started with development, start a Clickhouse DB and an OTel collector container locally using docker-compose like so:
29
-
30
- ```
31
- cd deploy/
32
- docker compose up -d
33
- ```
34
-
35
- Ensure the contents of `otel-collector.yaml` is correct.
36
-
37
- Check the logs of the collector to ensure it is running correctly:
38
-
39
- ```
40
- docker logs -f otel-collector
41
- ```
42
-
43
- Create a `.env` file with the following content:
44
-
45
- ```bash
46
- OTLP_HTTP_ENDPOINT=http://localhost:4318
47
- ```
48
-
49
- Install the dependencies and activate the virtual environment:
50
-
51
- ```bash
52
- set -a
53
- source .env
54
- set +a
55
-
56
- python3 -m venv .venv
57
- source .venv/bin/activate
58
- uv sync
59
- ```
60
-
61
- ## Testing
62
-
63
- To run the unit tests, ensure you have the `OPENAI_API_KEY` set in your environment. You can run the tests using the following command:
64
-
65
- ```bash
66
- OPENAI_API_KEY=<KEY> make test
67
- ```
68
-
69
- ## Getting Started
70
-
71
- For getting started with the SDK, please refer to the [GETTING-STARTED.md](GETTING-STARTED.md) file. It contains detailed instructions on how to set up and use the SDK effectively.
72
-
73
- ## SLIM-Based Multi-Agentic Systems
74
-
75
- For distributed agent systems using SLIM protocol, additional instrumentation is available:
76
-
77
-
78
- ### Initializing the SLIM Connector with your agent
79
-
80
- ```python
81
- from ioa_observe.sdk.connectors.slim import SLIMConnector, process_slim_msg
82
- from ioa_observe.sdk.instrumentations.slim import SLIMInstrumentor
83
-
84
- # Initialize SLIM connector
85
- slim_connector = SLIMConnector(
86
- remote_org="cisco",
87
- remote_namespace="default",
88
- shared_space="chat",
89
- )
90
-
91
- # Register agents with the connector
92
- slim_connector.register("remote_client_agent")
93
-
94
- # Instrument SLIM communications
95
- SLIMInstrumentor().instrument()
96
- ```
97
-
98
- ### Receiving Messages with a Callback
99
-
100
- Add the decorator `process_slim_msg` to the callback function to process incoming messages. This function will be called whenever a message is received in the shared space.
101
-
102
- ```python
103
-
104
- # Define a callback to process incoming messages
105
- from ioa_observe.sdk.connectors.slim import SLIMConnector, process_slim_msg
106
- import json
107
- from typing import Dict, Any
108
-
109
- @process_slim_msg("remote_client_agent")
110
- async def send_and_recv(msg) -> Dict[str, Any]:
111
- """Send message to remote endpoint and wait for reply."""
112
- gateway = GatewayHolder.gateway
113
- session_info = GatewayHolder.session_info
114
-
115
- if gateway is not None:
116
- await gateway.publish(session_info, msg.encode(), "cisco", "default", "server")
117
- async with gateway:
118
- _, recv = await gateway.receive(session=session_info.id)
119
- else:
120
- raise RuntimeError("Gateway is not initialized yet!")
121
-
122
- response_data = json.loads(recv.decode("utf8"))
123
- return {"messages": response_data.get("messages", [])}
124
- ```
125
-
126
- ### Starting the Message Receiver
127
-
128
- ```python
129
- # Start receiving messages from the SLIM shared space
130
- await slim.receive(callback=on_message_received)
131
- ```
132
-
133
- ### Publishing Messages
134
-
135
- ```python
136
- # Publish a message to the SLIM shared space
137
- message = {"type": "ChatMessage", "author": "moderator", "message": "Hello, world!"}
138
- await slim.publish(msg=json.dumps(message).encode("utf-8"))
139
- ```
140
-
141
- We will observe various events and metrics being sent to the Otel collector as we interact with other agents in the shared space via SLIM.
142
-
143
- ## Contributing
144
-
145
- Contributions are welcome! Please follow these steps to contribute:
146
-
147
- 1. Fork the repository.
148
- 2. Create a new branch (`git checkout -b feature-branch`).
149
- 3. Commit your changes (`git commit -am 'Add new feature'`).
150
- 4. Push to the branch (`git push origin feature-branch`).
151
- 5. Create a new Pull Request.