cortexhub 0.1.0__py3-none-any.whl → 0.1.1__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.1
|
|
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,30 +86,23 @@ 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
|
|
|
@@ -121,7 +113,7 @@ export CORTEXHUB_API_KEY=ch_live_...
|
|
|
121
113
|
# Optional: Backend URL (defaults to production)
|
|
122
114
|
export CORTEXHUB_API_URL=https://api.cortexhub.ai
|
|
123
115
|
|
|
124
|
-
# Optional:
|
|
116
|
+
# Optional: provider keys for your framework or examples
|
|
125
117
|
export OPENAI_API_KEY=sk-...
|
|
126
118
|
```
|
|
127
119
|
|
|
@@ -193,23 +185,12 @@ The SDK applies your configuration automatically:
|
|
|
193
185
|
|
|
194
186
|
## Examples
|
|
195
187
|
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
# LangChain customer support
|
|
200
|
-
python langchain_example.py
|
|
201
|
-
|
|
202
|
-
# LangGraph fraud investigation
|
|
203
|
-
python langgraph_example.py
|
|
188
|
+
Examples live in the separate `cortexhub-examples` repository (the SDK package
|
|
189
|
+
itself does not ship example scripts).
|
|
204
190
|
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
# OpenAI Agents research assistant
|
|
209
|
-
python openai_agents_example.py
|
|
210
|
-
|
|
211
|
-
# LiteLLM multi-provider
|
|
212
|
-
python litellm_example.py
|
|
191
|
+
```bash
|
|
192
|
+
git clone git@github.com:cortexhub/cortexhub-examples.git
|
|
193
|
+
cd cortexhub-examples/langgraph # or crewai, openai-agents, claude-agents
|
|
213
194
|
```
|
|
214
195
|
|
|
215
196
|
## Important: Initialization Order
|
|
@@ -219,12 +200,12 @@ python litellm_example.py
|
|
|
219
200
|
```python
|
|
220
201
|
# ✅ CORRECT
|
|
221
202
|
from cortexhub import init, Framework
|
|
222
|
-
cortex = init(agent_id="my_agent", framework=Framework.
|
|
203
|
+
cortex = init(agent_id="my_agent", framework=Framework.LANGGRAPH)
|
|
223
204
|
|
|
224
|
-
from
|
|
205
|
+
from langgraph.prebuilt import create_react_agent # Import AFTER init
|
|
225
206
|
|
|
226
207
|
# ❌ WRONG
|
|
227
|
-
from
|
|
208
|
+
from langgraph.prebuilt import create_react_agent # Framework imported first
|
|
228
209
|
from cortexhub import init, Framework
|
|
229
210
|
cortex = init(...) # Too late!
|
|
230
211
|
```
|
|
@@ -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.1.dist-info/METADATA,sha256=lul2lIUKl6SQVg_j0JHUsp9ZZXZjfMzgjBdaEt3ry0M,8281
|
|
37
|
+
cortexhub-0.1.1.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
38
|
+
cortexhub-0.1.1.dist-info/RECORD,,
|
|
File without changes
|