Metadata-Version: 2.4
Name: continuous-intelligence-layer
Version: 0.1.2
Summary: Multi-Agent Intelligent Validation & RCA Framework
Project-URL: Homepage, https://github.com/Jugal-lachhwani/Multi_agent_intelligence_layer
Project-URL: Repository, https://github.com/Jugal-lachhwani/Multi_agent_intelligence_layer
Author-email: dmlabs <dmlabs6@gmail.com>
License-Expression: MIT
License-File: LICENSE
Keywords: agents,langgraph,llm,observability,opentelemetry,rca,tracing
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Software Development :: Libraries
Classifier: Topic :: System :: Monitoring
Requires-Python: >=3.11
Requires-Dist: anthropic>=0.34.0
Requires-Dist: bcrypt>=4.0.0
Requires-Dist: colorama>=0.4.6
Requires-Dist: fastapi>=0.110.0
Requires-Dist: google-genai>=1.0.0
Requires-Dist: langchain-community>=0.2.0
Requires-Dist: langchain-openai>=0.1.0
Requires-Dist: langchain>=0.2.0
Requires-Dist: langgraph>=0.2.0
Requires-Dist: networkx>=3.3
Requires-Dist: openai>=1.30.0
Requires-Dist: openinference-instrumentation-langchain>=0.1.0
Requires-Dist: openinference-semantic-conventions>=0.1.0
Requires-Dist: opentelemetry-api>=1.25.0
Requires-Dist: opentelemetry-exporter-otlp-proto-grpc>=1.25.0
Requires-Dist: opentelemetry-sdk>=1.25.0
Requires-Dist: passlib[bcrypt]>=1.7.4
Requires-Dist: pydantic>=2.7.0
Requires-Dist: pyjwt>=2.8.0
Requires-Dist: pymongo>=4.8.0
Requires-Dist: python-dotenv>=1.0.0
Requires-Dist: python-multipart>=0.0.9
Requires-Dist: requests>=2.31.0
Requires-Dist: rich>=13.7.0
Requires-Dist: tenacity>=8.3.0
Requires-Dist: uvicorn>=0.29.0
Provides-Extra: all
Requires-Dist: openinference-instrumentation-anthropic>=1.0.0; extra == 'all'
Requires-Dist: openinference-instrumentation-crewai>=1.0.0; extra == 'all'
Requires-Dist: openinference-instrumentation-llama-index>=3.0.0; extra == 'all'
Requires-Dist: openinference-instrumentation-openai>=0.1.19; extra == 'all'
Provides-Extra: anthropic
Requires-Dist: openinference-instrumentation-anthropic>=1.0.0; extra == 'anthropic'
Provides-Extra: crewai
Requires-Dist: openinference-instrumentation-crewai>=1.0.0; extra == 'crewai'
Provides-Extra: dev
Requires-Dist: build>=1.2.0; extra == 'dev'
Requires-Dist: ipykernel; extra == 'dev'
Requires-Dist: pytest-asyncio>=0.23.0; extra == 'dev'
Requires-Dist: pytest>=8.0.0; extra == 'dev'
Requires-Dist: twine>=5.0.0; extra == 'dev'
Provides-Extra: llamaindex
Requires-Dist: openinference-instrumentation-llama-index>=3.0.0; extra == 'llamaindex'
Provides-Extra: openai
Requires-Dist: openinference-instrumentation-openai>=0.1.19; extra == 'openai'
Description-Content-Type: text/markdown

# Continuous Intelligence Layer

A zero-infrastructure, OpenTelemetry-based observability and validation
layer for agentic AI systems — LangGraph/LangChain, CrewAI, and direct
OpenAI/Anthropic SDK agents. Instrument your agent with one function call
and get automatic execution tracing, LLM-judged input/output/tool
evaluations, and root-cause analysis, sent to your AgentOPS API.

## Install

```bash
pip install continuous-intelligence-layer

# Framework-specific instrumentors (install only what you use):
pip install "continuous-intelligence-layer[crewai]"
pip install "continuous-intelligence-layer[openai]"
pip install "continuous-intelligence-layer[anthropic]"
```

LangGraph/LangChain support ships in the base package — no extra needed.

## Usage

Call `init()` once, at the very top of your script, before importing or
running your agent framework. Pick the import matching your framework —
everything else about your agent code is unchanged.

```python
from continuous_intelligence_layer.langgraph import init   # LangGraph / LangChain
# from continuous_intelligence_layer.crewai import init    # CrewAI
# from continuous_intelligence_layer.openai import init    # direct OpenAI SDK
# from continuous_intelligence_layer.anthropic import init # direct Anthropic SDK

ctx = init(
    api_key="ao_...",                    # from your AgentOPS project
    service_name="my-agent",             # groups traces into a project
    base_url="https://your-agentops-api", # your AgentOPS API's base URL
    evaluation_api_key="sk-...",         # LLM key used to run evaluations/RCA
)

# ... run your agent as normal — nothing else changes ...
```

`init()` returns `{"execution_id": str, "output_path": str}`. Every
framework's `init()` shares this same signature and return contract.

### Parameters

| Parameter | Default | Description |
|---|---|---|
| `api_key` | *required* | AgentOPS project API key |
| `service_name` | `"continuous-intelligence-layer"` | Project name traces are grouped under |
| `base_url` | `"http://localhost:8080"` | Your AgentOPS API base URL |
| `evaluation_api_key` | `""` | LLM API key used to run automatic evaluations/RCA (required if `run_evaluations=True`) |
| `evaluation_provider` | `"openai"` | Provider for the evaluator/RCA LLM |
| `run_evaluations` | `True` | Run Input/Output/Tool evaluators + RCA automatically after each trace |
| `session_id` | auto-generated | Groups multiple runs into one conversation/session |

Trace data is always POSTed to your API's `/traces/ingest` — the SDK never
writes to a database directly from the agent's machine.

Trace data is only sent at process **shutdown**, not per-span in real time —
make sure your process exits normally (or call the framework's shutdown
hook) so the trace flushes.
