cortexhub 0.1.0__py3-none-any.whl → 0.1.2__py3-none-any.whl
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.
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: cortexhub
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.2
|
|
4
4
|
Summary: CortexHub Python SDK - Policy-as-Code for AI Agents
|
|
5
5
|
Project-URL: Homepage, https://cortexhub.ai
|
|
6
6
|
Project-URL: Documentation, https://docs.cortexhub.ai
|
|
@@ -69,11 +69,10 @@ Description-Content-Type: text/markdown
|
|
|
69
69
|
pip install cortexhub
|
|
70
70
|
|
|
71
71
|
# With framework support (choose one or more)
|
|
72
|
-
pip install cortexhub[
|
|
72
|
+
pip install cortexhub[langgraph] # LangGraph
|
|
73
73
|
pip install cortexhub[crewai] # CrewAI
|
|
74
74
|
pip install cortexhub[openai-agents] # OpenAI Agents SDK
|
|
75
|
-
pip install cortexhub[
|
|
76
|
-
pip install cortexhub[litellm] # LiteLLM
|
|
75
|
+
pip install cortexhub[claude-agents] # Claude Agent SDK
|
|
77
76
|
|
|
78
77
|
# All frameworks (for development)
|
|
79
78
|
pip install cortexhub[all]
|
|
@@ -87,49 +86,37 @@ from cortexhub import init, Framework
|
|
|
87
86
|
# Initialize CortexHub FIRST, before importing your framework
|
|
88
87
|
cortex = init(
|
|
89
88
|
agent_id="customer_support_agent",
|
|
90
|
-
framework=Framework.
|
|
89
|
+
framework=Framework.LANGGRAPH, # or CREWAI, OPENAI_AGENTS, CLAUDE_AGENTS
|
|
91
90
|
)
|
|
92
91
|
|
|
93
92
|
# Now import and use your framework
|
|
94
|
-
from
|
|
93
|
+
from langgraph.prebuilt import create_react_agent
|
|
95
94
|
|
|
96
|
-
|
|
97
|
-
def process_refund(customer_id: str, amount: float) -> dict:
|
|
98
|
-
"""Process a customer refund."""
|
|
99
|
-
return {"status": "processed", "amount": amount}
|
|
100
|
-
|
|
101
|
-
# All tool calls are now governed!
|
|
95
|
+
# Continue with your LangGraph setup...
|
|
102
96
|
```
|
|
103
97
|
|
|
104
98
|
## Supported Frameworks
|
|
105
99
|
|
|
106
100
|
| Framework | Enum Value | Install |
|
|
107
101
|
|-----------|------------|---------|
|
|
108
|
-
|
|
|
109
|
-
| LangGraph | `Framework.LANGCHAIN` | `pip install cortexhub[langchain]` |
|
|
102
|
+
| LangGraph | `Framework.LANGGRAPH` | `pip install cortexhub[langgraph]` |
|
|
110
103
|
| CrewAI | `Framework.CREWAI` | `pip install cortexhub[crewai]` |
|
|
111
104
|
| OpenAI Agents | `Framework.OPENAI_AGENTS` | `pip install cortexhub[openai-agents]` |
|
|
112
|
-
|
|
|
113
|
-
| LiteLLM | `Framework.LITELLM` | `pip install cortexhub[litellm]` |
|
|
105
|
+
| Claude Agents | `Framework.CLAUDE_AGENTS` | `pip install cortexhub[claude-agents]` |
|
|
114
106
|
|
|
115
107
|
## Configuration
|
|
116
108
|
|
|
117
109
|
```bash
|
|
118
|
-
# Required: API key
|
|
110
|
+
# Required: API key
|
|
119
111
|
export CORTEXHUB_API_KEY=ch_live_...
|
|
120
112
|
|
|
121
|
-
# Optional: Backend URL (defaults to production)
|
|
122
|
-
export CORTEXHUB_API_URL=https://api.cortexhub.ai
|
|
123
|
-
|
|
124
|
-
# Optional: OpenAI key for LLM-based examples
|
|
125
|
-
export OPENAI_API_KEY=sk-...
|
|
126
113
|
```
|
|
127
114
|
|
|
128
115
|
## Features
|
|
129
116
|
|
|
130
|
-
- **Policy Enforcement** -
|
|
131
|
-
- **PII Detection** -
|
|
132
|
-
- **Secrets Detection** -
|
|
117
|
+
- **Policy Enforcement** - Cloud configuration, local evaluation
|
|
118
|
+
- **PII Detection** - 50+ entity types, configurable
|
|
119
|
+
- **Secrets Detection** - 30+ secret types
|
|
133
120
|
- **Configurable Guardrails** - Select specific PII/secret types to redact
|
|
134
121
|
- **Custom Patterns** - Add company-specific regex patterns
|
|
135
122
|
- **OpenTelemetry** - Industry-standard observability
|
|
@@ -193,23 +180,11 @@ The SDK applies your configuration automatically:
|
|
|
193
180
|
|
|
194
181
|
## Examples
|
|
195
182
|
|
|
196
|
-
|
|
197
|
-
cd python/examples
|
|
198
|
-
|
|
199
|
-
# LangChain customer support
|
|
200
|
-
python langchain_example.py
|
|
183
|
+
Examples live in the separate `examples` repository
|
|
201
184
|
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
# CrewAI financial operations
|
|
206
|
-
python crewai_example.py
|
|
207
|
-
|
|
208
|
-
# OpenAI Agents research assistant
|
|
209
|
-
python openai_agents_example.py
|
|
210
|
-
|
|
211
|
-
# LiteLLM multi-provider
|
|
212
|
-
python litellm_example.py
|
|
185
|
+
```bash
|
|
186
|
+
git clone git@github.com:cortexhub/examples.git
|
|
187
|
+
cd examples/langgraph # or crewai, openai-agents, claude-agents
|
|
213
188
|
```
|
|
214
189
|
|
|
215
190
|
## Important: Initialization Order
|
|
@@ -219,12 +194,12 @@ python litellm_example.py
|
|
|
219
194
|
```python
|
|
220
195
|
# ✅ CORRECT
|
|
221
196
|
from cortexhub import init, Framework
|
|
222
|
-
cortex = init(agent_id="my_agent", framework=Framework.
|
|
197
|
+
cortex = init(agent_id="my_agent", framework=Framework.LANGGRAPH)
|
|
223
198
|
|
|
224
|
-
from
|
|
199
|
+
from langgraph.prebuilt import create_react_agent # Import AFTER init
|
|
225
200
|
|
|
226
201
|
# ❌ WRONG
|
|
227
|
-
from
|
|
202
|
+
from langgraph.prebuilt import create_react_agent # Framework imported first
|
|
228
203
|
from cortexhub import init, Framework
|
|
229
204
|
cortex = init(...) # Too late!
|
|
230
205
|
```
|
|
@@ -33,6 +33,6 @@ cortexhub/policy/models.py,sha256=81NPX36yru0AZ22Wivytv3uxlwir4VsTN4MZgq4bdiA,38
|
|
|
33
33
|
cortexhub/policy/sync.py,sha256=7kAc3rd5WftipR8XKwvU8SwukIoY-0gcGW2fsf-ij_I,5999
|
|
34
34
|
cortexhub/telemetry/__init__.py,sha256=RSY38hHnYtbRURLoWAhbYYxYMtCItVYZBNN6Bfny8uA,1049
|
|
35
35
|
cortexhub/telemetry/otel.py,sha256=T2pC-K_S_KmrLvfcd3oHMbEwC5ibGZ-PXTZSY0xJgcQ,16633
|
|
36
|
-
cortexhub-0.1.
|
|
37
|
-
cortexhub-0.1.
|
|
38
|
-
cortexhub-0.1.
|
|
36
|
+
cortexhub-0.1.2.dist-info/METADATA,sha256=3EVsgCoB_TDvAoyqwYZx6zGTCKJQPXkXg5vnLjH1yfs,7948
|
|
37
|
+
cortexhub-0.1.2.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
38
|
+
cortexhub-0.1.2.dist-info/RECORD,,
|
|
File without changes
|