continuous-intelligence-layer 0.1.2__tar.gz → 0.2.0__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.
- {continuous_intelligence_layer-0.1.2 → continuous_intelligence_layer-0.2.0}/.gitignore +14 -0
- {continuous_intelligence_layer-0.1.2 → continuous_intelligence_layer-0.2.0}/PACKAGE_README.md +36 -14
- {continuous_intelligence_layer-0.1.2 → continuous_intelligence_layer-0.2.0}/PKG-INFO +40 -44
- continuous_intelligence_layer-0.2.0/continuous_intelligence_layer/__init__.py +45 -0
- continuous_intelligence_layer-0.2.0/continuous_intelligence_layer/_core/exporter.py +403 -0
- {continuous_intelligence_layer-0.1.2 → continuous_intelligence_layer-0.2.0}/continuous_intelligence_layer/_core/graph_exporter.py +29 -8
- continuous_intelligence_layer-0.2.0/continuous_intelligence_layer/_core/span_data.py +295 -0
- continuous_intelligence_layer-0.2.0/continuous_intelligence_layer/anthropic/__init__.py +5 -0
- continuous_intelligence_layer-0.2.0/continuous_intelligence_layer/anthropic/init.py +23 -0
- continuous_intelligence_layer-0.2.0/continuous_intelligence_layer/crewai/__init__.py +5 -0
- continuous_intelligence_layer-0.2.0/continuous_intelligence_layer/crewai/init.py +22 -0
- continuous_intelligence_layer-0.2.0/continuous_intelligence_layer/init.py +283 -0
- continuous_intelligence_layer-0.2.0/continuous_intelligence_layer/langgraph/__init__.py +5 -0
- continuous_intelligence_layer-0.2.0/continuous_intelligence_layer/langgraph/init.py +23 -0
- continuous_intelligence_layer-0.2.0/continuous_intelligence_layer/openai/__init__.py +5 -0
- continuous_intelligence_layer-0.2.0/continuous_intelligence_layer/openai/init.py +23 -0
- {continuous_intelligence_layer-0.1.2 → continuous_intelligence_layer-0.2.0}/graph_builder/__init__.py +2 -3
- {continuous_intelligence_layer-0.1.2 → continuous_intelligence_layer-0.2.0}/graph_builder/builder.py +62 -17
- {continuous_intelligence_layer-0.1.2 → continuous_intelligence_layer-0.2.0}/graph_builder/models.py +26 -0
- {continuous_intelligence_layer-0.1.2 → continuous_intelligence_layer-0.2.0}/pyproject.toml +13 -52
- continuous_intelligence_layer-0.1.2/continuous_intelligence_layer/__init__.py +0 -28
- continuous_intelligence_layer-0.1.2/continuous_intelligence_layer/_core/exporter.py +0 -517
- continuous_intelligence_layer-0.1.2/continuous_intelligence_layer/anthropic/__init__.py +0 -9
- continuous_intelligence_layer-0.1.2/continuous_intelligence_layer/anthropic/init.py +0 -224
- continuous_intelligence_layer-0.1.2/continuous_intelligence_layer/anthropic/instrumentation.py +0 -91
- continuous_intelligence_layer-0.1.2/continuous_intelligence_layer/crewai/__init__.py +0 -9
- continuous_intelligence_layer-0.1.2/continuous_intelligence_layer/crewai/init.py +0 -220
- continuous_intelligence_layer-0.1.2/continuous_intelligence_layer/crewai/instrumentation.py +0 -83
- continuous_intelligence_layer-0.1.2/continuous_intelligence_layer/langgraph/__init__.py +0 -12
- continuous_intelligence_layer-0.1.2/continuous_intelligence_layer/langgraph/init.py +0 -244
- continuous_intelligence_layer-0.1.2/continuous_intelligence_layer/langgraph/instrumentation.py +0 -71
- continuous_intelligence_layer-0.1.2/continuous_intelligence_layer/openai/__init__.py +0 -9
- continuous_intelligence_layer-0.1.2/continuous_intelligence_layer/openai/init.py +0 -221
- continuous_intelligence_layer-0.1.2/continuous_intelligence_layer/openai/instrumentation.py +0 -67
- continuous_intelligence_layer-0.1.2/evaluators/__init__.py +0 -32
- continuous_intelligence_layer-0.1.2/evaluators/base_evaluator.py +0 -181
- continuous_intelligence_layer-0.1.2/evaluators/crewai_input_evaluator.py +0 -249
- continuous_intelligence_layer-0.1.2/evaluators/input_evaluator.py +0 -121
- continuous_intelligence_layer-0.1.2/evaluators/models.py +0 -180
- continuous_intelligence_layer-0.1.2/evaluators/output_evaluator.py +0 -247
- continuous_intelligence_layer-0.1.2/evaluators/runner.py +0 -313
- continuous_intelligence_layer-0.1.2/evaluators/tool_agent_evaluator.py +0 -305
- continuous_intelligence_layer-0.1.2/graph_builder/mongo_store.py +0 -588
- continuous_intelligence_layer-0.1.2/llm_router/__init__.py +0 -3
- continuous_intelligence_layer-0.1.2/llm_router/router.py +0 -71
- continuous_intelligence_layer-0.1.2/rca_engine/__init__.py +0 -5
- continuous_intelligence_layer-0.1.2/rca_engine/incident_report.py +0 -162
- continuous_intelligence_layer-0.1.2/rca_engine/rca_engine.py +0 -202
- {continuous_intelligence_layer-0.1.2 → continuous_intelligence_layer-0.2.0}/LICENSE +0 -0
- {continuous_intelligence_layer-0.1.2 → continuous_intelligence_layer-0.2.0}/continuous_intelligence_layer/_core/__init__.py +0 -0
- {continuous_intelligence_layer-0.1.2 → continuous_intelligence_layer-0.2.0}/continuous_intelligence_layer/_core/utils.py +0 -0
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
**.env
|
|
2
|
+
**.pem
|
|
2
3
|
.venv
|
|
3
4
|
**.jsonl
|
|
4
5
|
**__pycache__/
|
|
@@ -14,6 +15,19 @@ images/
|
|
|
14
15
|
**.odp
|
|
15
16
|
**.pptx#
|
|
16
17
|
**.odp#
|
|
18
|
+
**.pdf
|
|
19
|
+
data/olist_raw/
|
|
20
|
+
|
|
17
21
|
|
|
18
22
|
.claudeignore
|
|
19
23
|
|
|
24
|
+
**.whl
|
|
25
|
+
**.gz
|
|
26
|
+
|
|
27
|
+
CIA_Experiment_Architcture/
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
Custom system artifact request/
|
|
31
|
+
|
|
32
|
+
**.sh
|
|
33
|
+
|
{continuous_intelligence_layer-0.1.2 → continuous_intelligence_layer-0.2.0}/PACKAGE_README.md
RENAMED
|
@@ -10,26 +10,21 @@ evaluations, and root-cause analysis, sent to your AgentOPS API.
|
|
|
10
10
|
|
|
11
11
|
```bash
|
|
12
12
|
pip install continuous-intelligence-layer
|
|
13
|
-
|
|
14
|
-
# Framework-specific instrumentors (install only what you use):
|
|
15
|
-
pip install "continuous-intelligence-layer[crewai]"
|
|
16
|
-
pip install "continuous-intelligence-layer[openai]"
|
|
17
|
-
pip install "continuous-intelligence-layer[anthropic]"
|
|
18
13
|
```
|
|
19
14
|
|
|
20
|
-
|
|
15
|
+
One package, one dependency (`traceloop-sdk`) bundles instrumentation for
|
|
16
|
+
every supported framework/provider — LangGraph/LangChain, CrewAI, OpenAI,
|
|
17
|
+
Anthropic, and more. No framework-specific extras to install.
|
|
21
18
|
|
|
22
19
|
## Usage
|
|
23
20
|
|
|
24
21
|
Call `init()` once, at the very top of your script, before importing or
|
|
25
|
-
running your agent framework.
|
|
26
|
-
|
|
22
|
+
running your agent framework. Everything else about your agent code is
|
|
23
|
+
unchanged — the right instrumentation activates automatically for whatever
|
|
24
|
+
framework/LLM-provider libraries are already importable in your process.
|
|
27
25
|
|
|
28
26
|
```python
|
|
29
|
-
from continuous_intelligence_layer
|
|
30
|
-
# from continuous_intelligence_layer.crewai import init # CrewAI
|
|
31
|
-
# from continuous_intelligence_layer.openai import init # direct OpenAI SDK
|
|
32
|
-
# from continuous_intelligence_layer.anthropic import init # direct Anthropic SDK
|
|
27
|
+
from continuous_intelligence_layer import init
|
|
33
28
|
|
|
34
29
|
ctx = init(
|
|
35
30
|
api_key="ao_...", # from your AgentOPS project
|
|
@@ -41,8 +36,13 @@ ctx = init(
|
|
|
41
36
|
# ... run your agent as normal — nothing else changes ...
|
|
42
37
|
```
|
|
43
38
|
|
|
44
|
-
`init()` returns `{"execution_id": str, "output_path": str}`.
|
|
45
|
-
|
|
39
|
+
`init()` returns `{"execution_id": str, "output_path": str}`.
|
|
40
|
+
|
|
41
|
+
Boundaries the auto-instrumentation doesn't detect on its own — plain Python
|
|
42
|
+
orchestration, or an agent loop that isn't LangGraph — won't become bindable
|
|
43
|
+
nodes unless you wrap them in `@workflow`/`@task`/`@tool` (from
|
|
44
|
+
`traceloop.sdk.decorators`). LLM calls and LangGraph nodes need no code
|
|
45
|
+
changes at all.
|
|
46
46
|
|
|
47
47
|
### Parameters
|
|
48
48
|
|
|
@@ -55,6 +55,28 @@ framework's `init()` shares this same signature and return contract.
|
|
|
55
55
|
| `evaluation_provider` | `"openai"` | Provider for the evaluator/RCA LLM |
|
|
56
56
|
| `run_evaluations` | `True` | Run Input/Output/Tool evaluators + RCA automatically after each trace |
|
|
57
57
|
| `session_id` | auto-generated | Groups multiple runs into one conversation/session |
|
|
58
|
+
| `cia_config_path` | `"CIA.yaml"`/`"cia.yaml"` next to your script | Path to your project's evaluation config — see below |
|
|
59
|
+
| `instruments` | auto-detect all | Optional set of instrument names (e.g. `{"langchain", "openai"}`) to narrow which frameworks get instrumented |
|
|
60
|
+
|
|
61
|
+
### CIA.yaml — per-node evaluation config (optional)
|
|
62
|
+
|
|
63
|
+
Every node gets free deterministic checks (status/latency/output-shape) by
|
|
64
|
+
default. To also opt specific nodes into LLM judgment, write a `CIA.yaml`
|
|
65
|
+
next to your agent's entry script — `init()` reads and sends it to your
|
|
66
|
+
AgentOPS project automatically:
|
|
67
|
+
|
|
68
|
+
```yaml
|
|
69
|
+
project: my-agent
|
|
70
|
+
contract:
|
|
71
|
+
terminal_node: response_composer
|
|
72
|
+
nodes:
|
|
73
|
+
response_composer:
|
|
74
|
+
output: "A short reply that directly answers the customer's question."
|
|
75
|
+
latency_ms: 6000
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
Every field is optional. A node with no `output:` description still gets
|
|
79
|
+
deterministic checks, just never an LLM judgment call.
|
|
58
80
|
|
|
59
81
|
Trace data is always POSTed to your API's `/traces/ingest` — the SDK never
|
|
60
82
|
writes to a database directly from the agent's machine.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.5
|
|
2
2
|
Name: continuous-intelligence-layer
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.2.0
|
|
4
4
|
Summary: Multi-Agent Intelligent Validation & RCA Framework
|
|
5
5
|
Project-URL: Homepage, https://github.com/Jugal-lachhwani/Multi_agent_intelligence_layer
|
|
6
6
|
Project-URL: Repository, https://github.com/Jugal-lachhwani/Multi_agent_intelligence_layer
|
|
@@ -16,51 +16,25 @@ Classifier: Programming Language :: Python :: 3.12
|
|
|
16
16
|
Classifier: Topic :: Software Development :: Libraries
|
|
17
17
|
Classifier: Topic :: System :: Monitoring
|
|
18
18
|
Requires-Python: >=3.11
|
|
19
|
-
Requires-Dist: anthropic>=0.34.0
|
|
20
|
-
Requires-Dist: bcrypt>=4.0.0
|
|
21
19
|
Requires-Dist: colorama>=0.4.6
|
|
22
|
-
Requires-Dist: fastapi>=0.110.0
|
|
23
|
-
Requires-Dist: google-genai>=1.0.0
|
|
24
20
|
Requires-Dist: langchain-community>=0.2.0
|
|
25
21
|
Requires-Dist: langchain-openai>=0.1.0
|
|
26
22
|
Requires-Dist: langchain>=0.2.0
|
|
27
23
|
Requires-Dist: langgraph>=0.2.0
|
|
28
|
-
Requires-Dist: networkx>=3.3
|
|
29
|
-
Requires-Dist: openai>=1.30.0
|
|
30
|
-
Requires-Dist: openinference-instrumentation-langchain>=0.1.0
|
|
31
|
-
Requires-Dist: openinference-semantic-conventions>=0.1.0
|
|
32
24
|
Requires-Dist: opentelemetry-api>=1.25.0
|
|
33
|
-
Requires-Dist: opentelemetry-exporter-otlp-proto-grpc>=1.25.0
|
|
34
25
|
Requires-Dist: opentelemetry-sdk>=1.25.0
|
|
35
|
-
Requires-Dist: passlib[bcrypt]>=1.7.4
|
|
36
26
|
Requires-Dist: pydantic>=2.7.0
|
|
37
|
-
Requires-Dist: pyjwt>=2.8.0
|
|
38
|
-
Requires-Dist: pymongo>=4.8.0
|
|
39
27
|
Requires-Dist: python-dotenv>=1.0.0
|
|
40
|
-
Requires-Dist:
|
|
28
|
+
Requires-Dist: pyyaml>=6.0
|
|
41
29
|
Requires-Dist: requests>=2.31.0
|
|
42
30
|
Requires-Dist: rich>=13.7.0
|
|
43
|
-
Requires-Dist:
|
|
44
|
-
Requires-Dist: uvicorn>=0.29.0
|
|
45
|
-
Provides-Extra: all
|
|
46
|
-
Requires-Dist: openinference-instrumentation-anthropic>=1.0.0; extra == 'all'
|
|
47
|
-
Requires-Dist: openinference-instrumentation-crewai>=1.0.0; extra == 'all'
|
|
48
|
-
Requires-Dist: openinference-instrumentation-llama-index>=3.0.0; extra == 'all'
|
|
49
|
-
Requires-Dist: openinference-instrumentation-openai>=0.1.19; extra == 'all'
|
|
50
|
-
Provides-Extra: anthropic
|
|
51
|
-
Requires-Dist: openinference-instrumentation-anthropic>=1.0.0; extra == 'anthropic'
|
|
52
|
-
Provides-Extra: crewai
|
|
53
|
-
Requires-Dist: openinference-instrumentation-crewai>=1.0.0; extra == 'crewai'
|
|
31
|
+
Requires-Dist: traceloop-sdk>=0.62.0
|
|
54
32
|
Provides-Extra: dev
|
|
55
33
|
Requires-Dist: build>=1.2.0; extra == 'dev'
|
|
56
34
|
Requires-Dist: ipykernel; extra == 'dev'
|
|
57
35
|
Requires-Dist: pytest-asyncio>=0.23.0; extra == 'dev'
|
|
58
36
|
Requires-Dist: pytest>=8.0.0; extra == 'dev'
|
|
59
37
|
Requires-Dist: twine>=5.0.0; extra == 'dev'
|
|
60
|
-
Provides-Extra: llamaindex
|
|
61
|
-
Requires-Dist: openinference-instrumentation-llama-index>=3.0.0; extra == 'llamaindex'
|
|
62
|
-
Provides-Extra: openai
|
|
63
|
-
Requires-Dist: openinference-instrumentation-openai>=0.1.19; extra == 'openai'
|
|
64
38
|
Description-Content-Type: text/markdown
|
|
65
39
|
|
|
66
40
|
# Continuous Intelligence Layer
|
|
@@ -75,26 +49,21 @@ evaluations, and root-cause analysis, sent to your AgentOPS API.
|
|
|
75
49
|
|
|
76
50
|
```bash
|
|
77
51
|
pip install continuous-intelligence-layer
|
|
78
|
-
|
|
79
|
-
# Framework-specific instrumentors (install only what you use):
|
|
80
|
-
pip install "continuous-intelligence-layer[crewai]"
|
|
81
|
-
pip install "continuous-intelligence-layer[openai]"
|
|
82
|
-
pip install "continuous-intelligence-layer[anthropic]"
|
|
83
52
|
```
|
|
84
53
|
|
|
85
|
-
|
|
54
|
+
One package, one dependency (`traceloop-sdk`) bundles instrumentation for
|
|
55
|
+
every supported framework/provider — LangGraph/LangChain, CrewAI, OpenAI,
|
|
56
|
+
Anthropic, and more. No framework-specific extras to install.
|
|
86
57
|
|
|
87
58
|
## Usage
|
|
88
59
|
|
|
89
60
|
Call `init()` once, at the very top of your script, before importing or
|
|
90
|
-
running your agent framework.
|
|
91
|
-
|
|
61
|
+
running your agent framework. Everything else about your agent code is
|
|
62
|
+
unchanged — the right instrumentation activates automatically for whatever
|
|
63
|
+
framework/LLM-provider libraries are already importable in your process.
|
|
92
64
|
|
|
93
65
|
```python
|
|
94
|
-
from continuous_intelligence_layer
|
|
95
|
-
# from continuous_intelligence_layer.crewai import init # CrewAI
|
|
96
|
-
# from continuous_intelligence_layer.openai import init # direct OpenAI SDK
|
|
97
|
-
# from continuous_intelligence_layer.anthropic import init # direct Anthropic SDK
|
|
66
|
+
from continuous_intelligence_layer import init
|
|
98
67
|
|
|
99
68
|
ctx = init(
|
|
100
69
|
api_key="ao_...", # from your AgentOPS project
|
|
@@ -106,8 +75,13 @@ ctx = init(
|
|
|
106
75
|
# ... run your agent as normal — nothing else changes ...
|
|
107
76
|
```
|
|
108
77
|
|
|
109
|
-
`init()` returns `{"execution_id": str, "output_path": str}`.
|
|
110
|
-
|
|
78
|
+
`init()` returns `{"execution_id": str, "output_path": str}`.
|
|
79
|
+
|
|
80
|
+
Boundaries the auto-instrumentation doesn't detect on its own — plain Python
|
|
81
|
+
orchestration, or an agent loop that isn't LangGraph — won't become bindable
|
|
82
|
+
nodes unless you wrap them in `@workflow`/`@task`/`@tool` (from
|
|
83
|
+
`traceloop.sdk.decorators`). LLM calls and LangGraph nodes need no code
|
|
84
|
+
changes at all.
|
|
111
85
|
|
|
112
86
|
### Parameters
|
|
113
87
|
|
|
@@ -120,6 +94,28 @@ framework's `init()` shares this same signature and return contract.
|
|
|
120
94
|
| `evaluation_provider` | `"openai"` | Provider for the evaluator/RCA LLM |
|
|
121
95
|
| `run_evaluations` | `True` | Run Input/Output/Tool evaluators + RCA automatically after each trace |
|
|
122
96
|
| `session_id` | auto-generated | Groups multiple runs into one conversation/session |
|
|
97
|
+
| `cia_config_path` | `"CIA.yaml"`/`"cia.yaml"` next to your script | Path to your project's evaluation config — see below |
|
|
98
|
+
| `instruments` | auto-detect all | Optional set of instrument names (e.g. `{"langchain", "openai"}`) to narrow which frameworks get instrumented |
|
|
99
|
+
|
|
100
|
+
### CIA.yaml — per-node evaluation config (optional)
|
|
101
|
+
|
|
102
|
+
Every node gets free deterministic checks (status/latency/output-shape) by
|
|
103
|
+
default. To also opt specific nodes into LLM judgment, write a `CIA.yaml`
|
|
104
|
+
next to your agent's entry script — `init()` reads and sends it to your
|
|
105
|
+
AgentOPS project automatically:
|
|
106
|
+
|
|
107
|
+
```yaml
|
|
108
|
+
project: my-agent
|
|
109
|
+
contract:
|
|
110
|
+
terminal_node: response_composer
|
|
111
|
+
nodes:
|
|
112
|
+
response_composer:
|
|
113
|
+
output: "A short reply that directly answers the customer's question."
|
|
114
|
+
latency_ms: 6000
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
Every field is optional. A node with no `output:` description still gets
|
|
118
|
+
deterministic checks, just never an LLM judgment call.
|
|
123
119
|
|
|
124
120
|
Trace data is always POSTed to your API's `/traces/ingest` — the SDK never
|
|
125
121
|
writes to a database directly from the agent's machine.
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Continuous Intelligence Layer SDK
|
|
3
|
+
==================================
|
|
4
|
+
|
|
5
|
+
A zero-infrastructure, OpenTelemetry-based observability layer for agentic
|
|
6
|
+
AI systems, built on OpenLLMetry/Traceloop. One unified ``init()`` covers
|
|
7
|
+
every supported framework — LangGraph/LangChain, CrewAI, the direct OpenAI
|
|
8
|
+
SDK, and the direct Anthropic SDK — via auto-instrumentation, no
|
|
9
|
+
per-framework subpackage or instrumentor selection required.
|
|
10
|
+
|
|
11
|
+
Quick Start
|
|
12
|
+
-----------
|
|
13
|
+
from continuous_intelligence_layer import init
|
|
14
|
+
|
|
15
|
+
init(api_key="...", evaluation_api_key="...") # call ONCE, before your agent runs
|
|
16
|
+
|
|
17
|
+
graph.invoke(...) # your agent code — unchanged
|
|
18
|
+
|
|
19
|
+
The four old per-framework subpackages
|
|
20
|
+
(``continuous_intelligence_layer.langgraph``/``crewai``/``openai``/``anthropic``)
|
|
21
|
+
have been removed — importing from them raises immediately with a pointer
|
|
22
|
+
back to this unified ``init()``, rather than silently forwarding to it.
|
|
23
|
+
|
|
24
|
+
Boundaries OpenLLMetry doesn't auto-instrument (plain Python orchestration,
|
|
25
|
+
or an agent loop that isn't LangGraph) never become bindable nodes
|
|
26
|
+
automatically — wrap that boundary in ``@workflow``/``@task``/``@tool``
|
|
27
|
+
(re-exported here from ``traceloop.sdk.decorators`` for convenience) if you
|
|
28
|
+
want it to show up as a node your CIA.yaml-equivalent config can address.
|
|
29
|
+
"""
|
|
30
|
+
|
|
31
|
+
from .init import init, reset
|
|
32
|
+
from ._core.utils import load_traces, print_trace_summary
|
|
33
|
+
from traceloop.sdk.decorators import workflow, task, tool
|
|
34
|
+
|
|
35
|
+
__all__ = [
|
|
36
|
+
"init",
|
|
37
|
+
"reset",
|
|
38
|
+
"load_traces",
|
|
39
|
+
"print_trace_summary",
|
|
40
|
+
"workflow",
|
|
41
|
+
"task",
|
|
42
|
+
"tool",
|
|
43
|
+
]
|
|
44
|
+
|
|
45
|
+
__version__ = "0.2.0"
|