vorim 0.1.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.
- vorim-0.1.0/.gitignore +36 -0
- vorim-0.1.0/PKG-INFO +166 -0
- vorim-0.1.0/README.md +127 -0
- vorim-0.1.0/pyproject.toml +61 -0
- vorim-0.1.0/src/vorim/__init__.py +50 -0
- vorim-0.1.0/src/vorim/client.py +483 -0
- vorim-0.1.0/src/vorim/exceptions.py +35 -0
- vorim-0.1.0/src/vorim/integrations/__init__.py +11 -0
- vorim-0.1.0/src/vorim/integrations/crewai.py +366 -0
- vorim-0.1.0/src/vorim/integrations/langchain.py +362 -0
- vorim-0.1.0/src/vorim/integrations/openai_agents.py +345 -0
- vorim-0.1.0/src/vorim/py.typed +0 -0
- vorim-0.1.0/src/vorim/types.py +123 -0
- vorim-0.1.0/tests/__init__.py +0 -0
- vorim-0.1.0/tests/conftest.py +74 -0
- vorim-0.1.0/tests/test_client.py +321 -0
- vorim-0.1.0/tests/test_crewai.py +341 -0
- vorim-0.1.0/tests/test_exceptions.py +37 -0
- vorim-0.1.0/tests/test_langchain.py +230 -0
- vorim-0.1.0/tests/test_openai_agents.py +284 -0
- vorim-0.1.0/tests/test_types.py +146 -0
vorim-0.1.0/.gitignore
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
# Dependencies
|
|
2
|
+
node_modules/
|
|
3
|
+
|
|
4
|
+
# Build output
|
|
5
|
+
dist/
|
|
6
|
+
*.tsbuildinfo
|
|
7
|
+
|
|
8
|
+
# Environment
|
|
9
|
+
.env
|
|
10
|
+
.env.local
|
|
11
|
+
.env.*.local
|
|
12
|
+
|
|
13
|
+
# IDE
|
|
14
|
+
.vscode/
|
|
15
|
+
.idea/
|
|
16
|
+
*.swp
|
|
17
|
+
*.swo
|
|
18
|
+
.DS_Store
|
|
19
|
+
|
|
20
|
+
# Logs
|
|
21
|
+
*.log
|
|
22
|
+
npm-debug.log*
|
|
23
|
+
|
|
24
|
+
# Coverage
|
|
25
|
+
coverage/
|
|
26
|
+
|
|
27
|
+
# Temp
|
|
28
|
+
tmp/
|
|
29
|
+
|
|
30
|
+
# Python
|
|
31
|
+
__pycache__/
|
|
32
|
+
*.pyc
|
|
33
|
+
*.egg-info/
|
|
34
|
+
|
|
35
|
+
# Pitch decks (private)
|
|
36
|
+
pitch-deck/
|
vorim-0.1.0/PKG-INFO
ADDED
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: vorim
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: Official Python SDK for Vorim AI — AI Agent Identity, Permissions & Audit
|
|
5
|
+
Project-URL: Homepage, https://vorim.ai
|
|
6
|
+
Project-URL: Repository, https://github.com/Kzino/vorim-protocol
|
|
7
|
+
Project-URL: Issues, https://github.com/Kzino/vorim-protocol/issues
|
|
8
|
+
Project-URL: Documentation, https://vorim.ai/docs
|
|
9
|
+
Author-email: Vorim AI <hello@vorim.ai>
|
|
10
|
+
License-Expression: MIT
|
|
11
|
+
Keywords: agent-identity,ai-agent,audit,crewai,ed25519,langchain,openai,permissions,trust,vorim
|
|
12
|
+
Classifier: Development Status :: 4 - Beta
|
|
13
|
+
Classifier: Intended Audience :: Developers
|
|
14
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
15
|
+
Classifier: Programming Language :: Python :: 3
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
20
|
+
Classifier: Topic :: Software Development :: Libraries
|
|
21
|
+
Classifier: Typing :: Typed
|
|
22
|
+
Requires-Python: >=3.10
|
|
23
|
+
Requires-Dist: httpx>=0.25.0
|
|
24
|
+
Provides-Extra: all
|
|
25
|
+
Requires-Dist: crewai>=0.80.0; extra == 'all'
|
|
26
|
+
Requires-Dist: langchain-core>=0.3.0; extra == 'all'
|
|
27
|
+
Requires-Dist: openai>=1.0.0; extra == 'all'
|
|
28
|
+
Provides-Extra: crewai
|
|
29
|
+
Requires-Dist: crewai>=0.80.0; extra == 'crewai'
|
|
30
|
+
Provides-Extra: dev
|
|
31
|
+
Requires-Dist: pytest-asyncio>=0.24; extra == 'dev'
|
|
32
|
+
Requires-Dist: pytest>=8.0; extra == 'dev'
|
|
33
|
+
Requires-Dist: respx>=0.22; extra == 'dev'
|
|
34
|
+
Provides-Extra: langchain
|
|
35
|
+
Requires-Dist: langchain-core>=0.3.0; extra == 'langchain'
|
|
36
|
+
Provides-Extra: openai
|
|
37
|
+
Requires-Dist: openai>=1.0.0; extra == 'openai'
|
|
38
|
+
Description-Content-Type: text/markdown
|
|
39
|
+
|
|
40
|
+
# vorim
|
|
41
|
+
|
|
42
|
+
Official Python SDK for [Vorim AI](https://vorim.ai) — the identity, permissions, and audit layer for AI agents.
|
|
43
|
+
|
|
44
|
+
## Install
|
|
45
|
+
|
|
46
|
+
```bash
|
|
47
|
+
pip install vorim
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
With framework integrations:
|
|
51
|
+
|
|
52
|
+
```bash
|
|
53
|
+
pip install vorim[langchain] # LangChain / LangGraph
|
|
54
|
+
pip install vorim[crewai] # CrewAI
|
|
55
|
+
pip install vorim[openai] # OpenAI Agents SDK
|
|
56
|
+
pip install vorim[all] # All integrations
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
## Quick Start
|
|
60
|
+
|
|
61
|
+
```python
|
|
62
|
+
from vorim import Vorim
|
|
63
|
+
|
|
64
|
+
vorim = Vorim(api_key="agid_sk_live_...")
|
|
65
|
+
|
|
66
|
+
# Register an agent
|
|
67
|
+
result = vorim.register(
|
|
68
|
+
name="invoice-processor",
|
|
69
|
+
capabilities=["read_documents", "extract_data"],
|
|
70
|
+
scopes=["agent:read", "agent:execute"],
|
|
71
|
+
)
|
|
72
|
+
|
|
73
|
+
# Check permissions (<5ms via Redis)
|
|
74
|
+
check = vorim.check(result.agent.agent_id, "agent:execute")
|
|
75
|
+
|
|
76
|
+
# Emit audit event
|
|
77
|
+
vorim.emit(
|
|
78
|
+
agent_id=result.agent.agent_id,
|
|
79
|
+
event_type="tool_call",
|
|
80
|
+
action="process_invoice",
|
|
81
|
+
result="success",
|
|
82
|
+
)
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
## Async
|
|
86
|
+
|
|
87
|
+
```python
|
|
88
|
+
from vorim import AsyncVorim
|
|
89
|
+
|
|
90
|
+
async with AsyncVorim(api_key="agid_sk_live_...") as vorim:
|
|
91
|
+
result = await vorim.register(
|
|
92
|
+
name="my-agent",
|
|
93
|
+
capabilities=["search"],
|
|
94
|
+
scopes=["agent:read"],
|
|
95
|
+
)
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
## LangChain Integration
|
|
99
|
+
|
|
100
|
+
```python
|
|
101
|
+
from vorim import Vorim
|
|
102
|
+
from vorim.integrations.langchain import vorim_tool, VorimCallbackHandler
|
|
103
|
+
|
|
104
|
+
vorim = Vorim(api_key="agid_sk_live_...")
|
|
105
|
+
|
|
106
|
+
@vorim_tool(vorim, agent_id="agid_acme_...", permission="agent:execute")
|
|
107
|
+
def search(query: str) -> str:
|
|
108
|
+
"""Search documents."""
|
|
109
|
+
return f"Results for {query}"
|
|
110
|
+
|
|
111
|
+
# Use as a standard LangChain tool with built-in permission checks + audit
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
## CrewAI Integration
|
|
115
|
+
|
|
116
|
+
```python
|
|
117
|
+
from vorim import Vorim
|
|
118
|
+
from vorim.integrations.crewai import register_crew
|
|
119
|
+
|
|
120
|
+
vorim = Vorim(api_key="agid_sk_live_...")
|
|
121
|
+
|
|
122
|
+
crew = register_crew(vorim, {
|
|
123
|
+
"crew_name": "content-pipeline",
|
|
124
|
+
"members": [
|
|
125
|
+
{
|
|
126
|
+
"role": "researcher",
|
|
127
|
+
"name": "crew-researcher",
|
|
128
|
+
"capabilities": ["web_search"],
|
|
129
|
+
"scopes": ["agent:read", "agent:execute"],
|
|
130
|
+
},
|
|
131
|
+
],
|
|
132
|
+
})
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
## OpenAI Integration
|
|
136
|
+
|
|
137
|
+
```python
|
|
138
|
+
from openai import OpenAI
|
|
139
|
+
from vorim import Vorim
|
|
140
|
+
from vorim.integrations.openai_agents import VorimToolRegistry
|
|
141
|
+
|
|
142
|
+
vorim = Vorim(api_key="agid_sk_live_...")
|
|
143
|
+
client = OpenAI()
|
|
144
|
+
|
|
145
|
+
registry = VorimToolRegistry(vorim=vorim, agent_id="agid_acme_...")
|
|
146
|
+
registry.add(
|
|
147
|
+
name="search",
|
|
148
|
+
description="Search documents",
|
|
149
|
+
parameters={"type": "object", "properties": {"query": {"type": "string"}}},
|
|
150
|
+
execute=lambda args: f"Results for {args['query']}",
|
|
151
|
+
)
|
|
152
|
+
|
|
153
|
+
response = client.chat.completions.create(
|
|
154
|
+
model="gpt-4o",
|
|
155
|
+
messages=[{"role": "user", "content": "Search for AI papers"}],
|
|
156
|
+
tools=registry.to_openai_tools(),
|
|
157
|
+
)
|
|
158
|
+
|
|
159
|
+
tool_messages = registry.execute_tool_calls(
|
|
160
|
+
response.choices[0].message.tool_calls or []
|
|
161
|
+
)
|
|
162
|
+
```
|
|
163
|
+
|
|
164
|
+
## License
|
|
165
|
+
|
|
166
|
+
MIT
|
vorim-0.1.0/README.md
ADDED
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
# vorim
|
|
2
|
+
|
|
3
|
+
Official Python SDK for [Vorim AI](https://vorim.ai) — the identity, permissions, and audit layer for AI agents.
|
|
4
|
+
|
|
5
|
+
## Install
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
pip install vorim
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
With framework integrations:
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
pip install vorim[langchain] # LangChain / LangGraph
|
|
15
|
+
pip install vorim[crewai] # CrewAI
|
|
16
|
+
pip install vorim[openai] # OpenAI Agents SDK
|
|
17
|
+
pip install vorim[all] # All integrations
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
## Quick Start
|
|
21
|
+
|
|
22
|
+
```python
|
|
23
|
+
from vorim import Vorim
|
|
24
|
+
|
|
25
|
+
vorim = Vorim(api_key="agid_sk_live_...")
|
|
26
|
+
|
|
27
|
+
# Register an agent
|
|
28
|
+
result = vorim.register(
|
|
29
|
+
name="invoice-processor",
|
|
30
|
+
capabilities=["read_documents", "extract_data"],
|
|
31
|
+
scopes=["agent:read", "agent:execute"],
|
|
32
|
+
)
|
|
33
|
+
|
|
34
|
+
# Check permissions (<5ms via Redis)
|
|
35
|
+
check = vorim.check(result.agent.agent_id, "agent:execute")
|
|
36
|
+
|
|
37
|
+
# Emit audit event
|
|
38
|
+
vorim.emit(
|
|
39
|
+
agent_id=result.agent.agent_id,
|
|
40
|
+
event_type="tool_call",
|
|
41
|
+
action="process_invoice",
|
|
42
|
+
result="success",
|
|
43
|
+
)
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
## Async
|
|
47
|
+
|
|
48
|
+
```python
|
|
49
|
+
from vorim import AsyncVorim
|
|
50
|
+
|
|
51
|
+
async with AsyncVorim(api_key="agid_sk_live_...") as vorim:
|
|
52
|
+
result = await vorim.register(
|
|
53
|
+
name="my-agent",
|
|
54
|
+
capabilities=["search"],
|
|
55
|
+
scopes=["agent:read"],
|
|
56
|
+
)
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
## LangChain Integration
|
|
60
|
+
|
|
61
|
+
```python
|
|
62
|
+
from vorim import Vorim
|
|
63
|
+
from vorim.integrations.langchain import vorim_tool, VorimCallbackHandler
|
|
64
|
+
|
|
65
|
+
vorim = Vorim(api_key="agid_sk_live_...")
|
|
66
|
+
|
|
67
|
+
@vorim_tool(vorim, agent_id="agid_acme_...", permission="agent:execute")
|
|
68
|
+
def search(query: str) -> str:
|
|
69
|
+
"""Search documents."""
|
|
70
|
+
return f"Results for {query}"
|
|
71
|
+
|
|
72
|
+
# Use as a standard LangChain tool with built-in permission checks + audit
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
## CrewAI Integration
|
|
76
|
+
|
|
77
|
+
```python
|
|
78
|
+
from vorim import Vorim
|
|
79
|
+
from vorim.integrations.crewai import register_crew
|
|
80
|
+
|
|
81
|
+
vorim = Vorim(api_key="agid_sk_live_...")
|
|
82
|
+
|
|
83
|
+
crew = register_crew(vorim, {
|
|
84
|
+
"crew_name": "content-pipeline",
|
|
85
|
+
"members": [
|
|
86
|
+
{
|
|
87
|
+
"role": "researcher",
|
|
88
|
+
"name": "crew-researcher",
|
|
89
|
+
"capabilities": ["web_search"],
|
|
90
|
+
"scopes": ["agent:read", "agent:execute"],
|
|
91
|
+
},
|
|
92
|
+
],
|
|
93
|
+
})
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
## OpenAI Integration
|
|
97
|
+
|
|
98
|
+
```python
|
|
99
|
+
from openai import OpenAI
|
|
100
|
+
from vorim import Vorim
|
|
101
|
+
from vorim.integrations.openai_agents import VorimToolRegistry
|
|
102
|
+
|
|
103
|
+
vorim = Vorim(api_key="agid_sk_live_...")
|
|
104
|
+
client = OpenAI()
|
|
105
|
+
|
|
106
|
+
registry = VorimToolRegistry(vorim=vorim, agent_id="agid_acme_...")
|
|
107
|
+
registry.add(
|
|
108
|
+
name="search",
|
|
109
|
+
description="Search documents",
|
|
110
|
+
parameters={"type": "object", "properties": {"query": {"type": "string"}}},
|
|
111
|
+
execute=lambda args: f"Results for {args['query']}",
|
|
112
|
+
)
|
|
113
|
+
|
|
114
|
+
response = client.chat.completions.create(
|
|
115
|
+
model="gpt-4o",
|
|
116
|
+
messages=[{"role": "user", "content": "Search for AI papers"}],
|
|
117
|
+
tools=registry.to_openai_tools(),
|
|
118
|
+
)
|
|
119
|
+
|
|
120
|
+
tool_messages = registry.execute_tool_calls(
|
|
121
|
+
response.choices[0].message.tool_calls or []
|
|
122
|
+
)
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
## License
|
|
126
|
+
|
|
127
|
+
MIT
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["hatchling"]
|
|
3
|
+
build-backend = "hatchling.build"
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = "vorim"
|
|
7
|
+
version = "0.1.0"
|
|
8
|
+
description = "Official Python SDK for Vorim AI — AI Agent Identity, Permissions & Audit"
|
|
9
|
+
readme = "README.md"
|
|
10
|
+
license = "MIT"
|
|
11
|
+
requires-python = ">=3.10"
|
|
12
|
+
authors = [
|
|
13
|
+
{ name = "Vorim AI", email = "hello@vorim.ai" },
|
|
14
|
+
]
|
|
15
|
+
keywords = [
|
|
16
|
+
"ai-agent",
|
|
17
|
+
"agent-identity",
|
|
18
|
+
"trust",
|
|
19
|
+
"permissions",
|
|
20
|
+
"audit",
|
|
21
|
+
"ed25519",
|
|
22
|
+
"vorim",
|
|
23
|
+
"langchain",
|
|
24
|
+
"crewai",
|
|
25
|
+
"openai",
|
|
26
|
+
]
|
|
27
|
+
classifiers = [
|
|
28
|
+
"Development Status :: 4 - Beta",
|
|
29
|
+
"Intended Audience :: Developers",
|
|
30
|
+
"License :: OSI Approved :: MIT License",
|
|
31
|
+
"Programming Language :: Python :: 3",
|
|
32
|
+
"Programming Language :: Python :: 3.10",
|
|
33
|
+
"Programming Language :: Python :: 3.11",
|
|
34
|
+
"Programming Language :: Python :: 3.12",
|
|
35
|
+
"Programming Language :: Python :: 3.13",
|
|
36
|
+
"Topic :: Software Development :: Libraries",
|
|
37
|
+
"Typing :: Typed",
|
|
38
|
+
]
|
|
39
|
+
dependencies = [
|
|
40
|
+
"httpx>=0.25.0",
|
|
41
|
+
]
|
|
42
|
+
|
|
43
|
+
[project.optional-dependencies]
|
|
44
|
+
langchain = ["langchain-core>=0.3.0"]
|
|
45
|
+
crewai = ["crewai>=0.80.0"]
|
|
46
|
+
openai = ["openai>=1.0.0"]
|
|
47
|
+
all = ["langchain-core>=0.3.0", "crewai>=0.80.0", "openai>=1.0.0"]
|
|
48
|
+
dev = ["pytest>=8.0", "pytest-asyncio>=0.24", "respx>=0.22"]
|
|
49
|
+
|
|
50
|
+
[project.urls]
|
|
51
|
+
Homepage = "https://vorim.ai"
|
|
52
|
+
Repository = "https://github.com/Kzino/vorim-protocol"
|
|
53
|
+
Issues = "https://github.com/Kzino/vorim-protocol/issues"
|
|
54
|
+
Documentation = "https://vorim.ai/docs"
|
|
55
|
+
|
|
56
|
+
[tool.hatch.build.targets.wheel]
|
|
57
|
+
packages = ["src/vorim"]
|
|
58
|
+
|
|
59
|
+
[tool.pytest.ini_options]
|
|
60
|
+
asyncio_mode = "auto"
|
|
61
|
+
testpaths = ["tests"]
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
"""Vorim — The identity and trust layer for AI agents.
|
|
2
|
+
|
|
3
|
+
Usage::
|
|
4
|
+
|
|
5
|
+
from vorim import Vorim, AsyncVorim, VorimError
|
|
6
|
+
|
|
7
|
+
vorim = Vorim(api_key="agid_sk_live_...")
|
|
8
|
+
result = vorim.register(
|
|
9
|
+
name="my-agent",
|
|
10
|
+
capabilities=["search"],
|
|
11
|
+
scopes=["agent:read", "agent:execute"],
|
|
12
|
+
)
|
|
13
|
+
"""
|
|
14
|
+
|
|
15
|
+
from .client import AsyncVorim, Vorim
|
|
16
|
+
from .exceptions import VorimError
|
|
17
|
+
from .types import (
|
|
18
|
+
Agent,
|
|
19
|
+
AgentRegistrationInput,
|
|
20
|
+
AgentRegistrationResult,
|
|
21
|
+
AgentStatus,
|
|
22
|
+
AuditEventInput,
|
|
23
|
+
AuditEventType,
|
|
24
|
+
AuditResult,
|
|
25
|
+
GrantPermissionOptions,
|
|
26
|
+
PermissionCheckResult,
|
|
27
|
+
PermissionScope,
|
|
28
|
+
RateLimit,
|
|
29
|
+
TrustRecord,
|
|
30
|
+
)
|
|
31
|
+
|
|
32
|
+
__all__ = [
|
|
33
|
+
"Vorim",
|
|
34
|
+
"AsyncVorim",
|
|
35
|
+
"VorimError",
|
|
36
|
+
"Agent",
|
|
37
|
+
"AgentRegistrationInput",
|
|
38
|
+
"AgentRegistrationResult",
|
|
39
|
+
"AgentStatus",
|
|
40
|
+
"AuditEventInput",
|
|
41
|
+
"AuditEventType",
|
|
42
|
+
"AuditResult",
|
|
43
|
+
"GrantPermissionOptions",
|
|
44
|
+
"PermissionCheckResult",
|
|
45
|
+
"PermissionScope",
|
|
46
|
+
"RateLimit",
|
|
47
|
+
"TrustRecord",
|
|
48
|
+
]
|
|
49
|
+
|
|
50
|
+
__version__ = "0.1.0"
|