sorin
Python SDK for the Sorin agent authorization and observability platform.
Install
If you're using the sorin CLI (e.g. sorin mcp install), install with pipx so the command is automatically added to your PATH:
pipx install sorin
If you're using the SDK in a project (importing SorinLLM, SorinClient, etc.), install with pip inside your virtual environment:
pip install sorin
Installed with pip and sorin command not found? Run it via Python directly:
python3 -m sorin mcp install --key <your-key>
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, AWS, etc.)
from sorin import SorinClient
sorin = SorinClient(agent_key="your-agent-key")
# GitHub
file = sorin.github.read_file("your-org", "your-repo", "README.md")
sorin.github.create_branch("your-org", "your-repo", "my-feature")
sorin.github.push_file("your-org", "your-repo", "notes.md", "# Hello", "add notes", "my-feature")
pr = sorin.github.create_pr("your-org", "your-repo", "My PR", "body", "my-feature")
# AWS — S3
buckets = sorin.aws.s3_list_buckets()
objects = sorin.aws.s3_list_objects("my-bucket", prefix="logs/")
obj = sorin.aws.s3_get_object("my-bucket", "path/to/file.json")
sorin.aws.s3_put_object("my-bucket", "output/report.txt", content="done")
sorin.aws.s3_delete_object("my-bucket", "tmp/scratch.txt")
# AWS — EC2
instances = sorin.aws.ec2_describe_instances()
sorin.aws.ec2_start_instance("i-1234567890abcdef0")
sorin.aws.ec2_stop_instance("i-1234567890abcdef0")
# AWS — Lambda
functions = sorin.aws.lambda_list_functions()
result = sorin.aws.lambda_invoke("my-function", payload='{"key": "value"}')
Write actions and approval-gated permissions are handled automatically — if a 202 is returned the SDK polls until the request is approved or denied, then retries.
Tool calls grouped by LLM turn
The Activity dashboard groups your agent's tool calls under the LLM turn that triggered them. No setup required — the SDK handles it when you use SorinLLM/SorinOpenAI and SorinClient together.
If a single LLM turn fires multiple parallel tool calls, opt into finer-grained labeling by passing the block id:
response = sorin_llm.messages.create(model=..., messages=..., tools=...)
for block in response.content:
if block.type == "tool_use":
sorin.github.push_file(**block.input, tool_use_id=block.id)
# or: sorin.aws.s3_put_object(**block.input, tool_use_id=block.id)
tool_use_id is optional on every sorin.github.* and sorin.aws.* method.
MCP Server
The package ships a sorin CLI that connects any MCP-compatible AI coding tool to the Sorin MCP server.
Claude Code — registers the server automatically:
# if installed with pipx:
sorin mcp install --key <your-sorin-agent-key>
# if installed with pip and sorin isn't on your PATH:
python3 -m sorin mcp install --key <your-sorin-agent-key>
Cursor, Windsurf, VS Code, or any host that uses mcpServers JSON config — prints the config block to paste in:
sorin mcp install --key <your-sorin-agent-key> --json
Config file locations:
- Cursor:
~/.cursor/mcp.json - Windsurf:
~/.codeium/windsurf/mcp_config.json - VS Code:
.vscode/mcp.json(workspace) or user settings
Restart your editor after installing to connect.
Links
Metadata
Release files for sorin 0.1.10
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| sorin-0.1.10.tar.gz | 13.5 kB | With provenance | Details for sorin-0.1.10.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| sorin-0.1.10-py3-none-any.whl | Python 3 | none | any | Details for sorin-0.1.10-py3-none-any.whl |
Total release size: 24.9 kB
Release files / sorin-0.1.10.tar.gz
| Download URL | sorin-0.1.10.tar.gz |
|---|---|
| Size | 13.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a42354310ff56be9d023f0fd11b72751c3c47cb1381ba54fa2840cd3073a6c16
|
|
BLAKE2b-256 checksum How to use checksums |
cd2e73e219e1551f9733035ceb5e2847a094e4fa9c3c6e3cecef9952e46075f7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on May 29, 2026.
Transparency logRelease files / sorin-0.1.10-py3-none-any.whl
| Download URL | sorin-0.1.10-py3-none-any.whl |
|---|---|
| Size | 11.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
79c6031c1409e876ae24bde9fa6b58f4efba62c22cbb7c1b2e84d221a7fe99e1
|
|
BLAKE2b-256 checksum How to use checksums |
7eab1e5efb5a2efade08e0214b7cdcdcd5e3f6b601bbea1bb45da376b0ab1685
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on May 29, 2026.
Transparency logSecurity for sorin 0.1.10
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for sorin-0.1.10.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on May 29, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.