Python SDK for Sorin — AI agent governance and security
Project description
sorin-sdk
Python SDK for the Sorin agent authorization and observability platform.
Install
pip install sorin-sdk
For local development:
pip install -e ./python
Usage
LLM Inference (Anthropic)
from sorin import SorinLLM
client = SorinLLM(agent_key="your-agent-key")
response = client.messages.create(
model="claude-sonnet-4-20250514",
max_tokens=100,
messages=[{"role": "user", "content": "Hello"}]
)
LLM Inference (OpenAI)
from sorin import SorinOpenAI
client = SorinOpenAI(agent_key="your-agent-key")
response = client.chat.completions.create(
model="gpt-4o",
messages=[{"role": "user", "content": "Hello"}]
)
Agent Actions (GitHub, etc.)
from sorin import SorinClient
sorin = SorinClient(agent_key="your-agent-key")
# Check authorization before acting (reasoning is optional)
auth = sorin.authorize(
action="comment-pr",
connector="github",
resource_id="org/repo#42",
reasoning="Adding a review comment to summarize CI results",
)
if auth.get("allowed"):
# Perform the action
...
else:
print(f"Blocked: {auth.get('reason')}")
Links
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
sorin_sdk-0.1.1.tar.gz
(4.3 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file sorin_sdk-0.1.1.tar.gz.
File metadata
- Download URL: sorin_sdk-0.1.1.tar.gz
- Upload date:
- Size: 4.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.9.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5c1609690c5a8f58ecdee0eb93b7959dd25b2f20e0c4a817d6936390935ceb9a
|
|
| MD5 |
4a6acb37e065282182e3828cf12d2a7c
|
|
| BLAKE2b-256 |
3bedf493e60bef6b5da25e058987680825d20b835402d766cdc539695f7c9c09
|
File details
Details for the file sorin_sdk-0.1.1-py3-none-any.whl.
File metadata
- Download URL: sorin_sdk-0.1.1-py3-none-any.whl
- Upload date:
- Size: 4.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.9.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c8dc1b487d6516c667835fd76b600fb86ef6a15cf1b3fe9fdc58d835cd97a9c0
|
|
| MD5 |
5a3070bcf969c09f0b499fc1a559148b
|
|
| BLAKE2b-256 |
25cccb404546d93597b574c0025b9de2beedc30057cd2bec4926453c192d3247
|