Build tools, agents, and pipelines for your STROT instance
Project description
STROT
Build tools, agents, pipelines, and dashboards for your STROT instance — in Python.
Installation
pip install strot-ai
Quick Start
strot login # Authenticate
strot init tool my-calculator # Scaffold a project
cd my-calculator # Edit main.py with any editor
strot test # Validate locally
strot deploy # Ship to your STROT instance
SDK Reference
Tools (@function)
from strot_sdk import function, llm
@function(
name='calculate_roi',
description='Calculate return on investment',
category='finance',
parameters=[
{'name': 'cost', 'type': 'number', 'description': 'Total cost'},
{'name': 'revenue', 'type': 'number', 'description': 'Total revenue'},
],
returns={'type': 'number', 'description': 'ROI percentage'}
)
class CalculateROI:
def run(self, cost: float, revenue: float) -> float:
return ((revenue - cost) / cost) * 100
Agents (@agent)
from strot_sdk import agent
@agent(
name='sales_analyst',
description='Analyzes sales data and provides insights',
tools=['calculate_roi', 'top_n'],
model='gpt-4o',
temperature=0.1,
)
class SalesAnalyst:
system_prompt = """You are a sales analyst.
Analyze data and provide actionable recommendations."""
Cortex Pipelines (@cortex)
from strot_sdk import cortex
from strot_sdk.cortex import Flow
@cortex(name='daily_etl', description='Daily ETL pipeline')
class DailyETL:
def build(self, flow: Flow):
data = flow.data_connector('load_sales', query_id=42)
cleaned = flow.transform(data, prompt='Clean and normalize the data')
flow.publish(cleaned, name='daily_report', destination='slack', channel='#data')
Pages / Dashboards (@page)
from strot_sdk import page
from strot_sdk.pages import Dashboard, Row, KPI, Chart, Table
@page(name='sales_dashboard', description='Sales overview', type='dashboard')
class SalesDashboard:
def layout(self):
return Dashboard(
Row(
KPI(query_id=1, label='Revenue', format='currency'),
KPI(query_id=2, label='Orders'),
KPI(query_id=3, label='Customers'),
),
Row(
Chart(query_id=5, type='line', title='Revenue Trend', span=8),
Chart(query_id=6, type='donut', title='By Region', span=4),
),
Row(
Table(query_id=7, title='Recent Orders', sortable=True),
),
)
LLM
All LLM calls go through your STROT instance — no API keys needed in your code.
from strot_sdk import llm
result = llm.complete("Summarize this: " + text)
result = llm.chat([{"role": "user", "content": "What is 2+2?"}])
category = llm.classify("Great product!", ["positive", "negative", "neutral"])
data = llm.extract("John is 30 years old", {"name": "string", "age": "number"})
Data Access
from strot_sdk import strot, query, query_one
rows = strot.queries['monthly_sales'].execute()
rows = query("SELECT * FROM users", data_source_id=1)
row = query_one("SELECT * FROM users WHERE id = 1", data_source_id=1)
Destinations
from strot_sdk import email, slack, webhook
email.send(to="team@example.com", subject="Report Ready", body="Done.")
slack.send(channel="#alerts", message="New alert!")
webhook.post(url="https://api.example.com/hook", data={"event": "deploy"})
CLI Reference
strot login # Authenticate
strot login --token sk_live_abc123 # Direct API key
strot whoami # Show current user/org
strot logout # Clear credentials
strot init tool my-calculator # Scaffold tool
strot init agent my-analyst # Scaffold agent
strot init cortex my-pipeline # Scaffold pipeline
strot init page my-dashboard # Scaffold dashboard
strot test # Validate locally
strot deploy # Deploy to STROT
strot deploy --dry-run # Validate without deploying
strot resources # List all resources
strot resources queries # List saved queries
strot resources datasources # List data sources
Configuration
Credentials stored in ~/.strot/credentials:
version: 1
current_profile: default
profiles:
default:
url: https://app.strot.ai
api_key: sk_live_abc123
org: 98bf9a0a-c9cd-42a8-9ea4-4f7fee9a4535
Priority: Constructor args > Environment variables (STROT_URL, STROT_API_KEY) > Credentials file
License
MIT
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
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 strot_ai-0.1.1.tar.gz.
File metadata
- Download URL: strot_ai-0.1.1.tar.gz
- Upload date:
- Size: 33.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e0b5c2ac69da3a453edcde09ad3d301a15b94a67cf0c5d4d17f1eb35493f3ad3
|
|
| MD5 |
47a082c7ebc144a0a798292f173944da
|
|
| BLAKE2b-256 |
2078a92371125d82803fc04927cfa9919dcf8c1e04b5ca029bf3dcab40376ee7
|
Provenance
The following attestation bundles were made for strot_ai-0.1.1.tar.gz:
Publisher:
publish.yml on strot-ai/strot-sdk
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
strot_ai-0.1.1.tar.gz -
Subject digest:
e0b5c2ac69da3a453edcde09ad3d301a15b94a67cf0c5d4d17f1eb35493f3ad3 - Sigstore transparency entry: 1064811766
- Sigstore integration time:
-
Permalink:
strot-ai/strot-sdk@fbdc64c98e27ba59e476ad4298578db181a89bea -
Branch / Tag:
refs/tags/v0.1.1 - Owner: https://github.com/strot-ai
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@fbdc64c98e27ba59e476ad4298578db181a89bea -
Trigger Event:
release
-
Statement type:
File details
Details for the file strot_ai-0.1.1-py3-none-any.whl.
File metadata
- Download URL: strot_ai-0.1.1-py3-none-any.whl
- Upload date:
- Size: 43.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
48b21ca57d1533450dc2611a797583c7e33615df9c78a0a8dbd151a7ec6c58b9
|
|
| MD5 |
ae4823c99f1c39a779e40b2592658f10
|
|
| BLAKE2b-256 |
adb17462632c32c8aa355e9f146ae54de783d90a2f53d03a58465fef6bd30321
|
Provenance
The following attestation bundles were made for strot_ai-0.1.1-py3-none-any.whl:
Publisher:
publish.yml on strot-ai/strot-sdk
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
strot_ai-0.1.1-py3-none-any.whl -
Subject digest:
48b21ca57d1533450dc2611a797583c7e33615df9c78a0a8dbd151a7ec6c58b9 - Sigstore transparency entry: 1064811801
- Sigstore integration time:
-
Permalink:
strot-ai/strot-sdk@fbdc64c98e27ba59e476ad4298578db181a89bea -
Branch / Tag:
refs/tags/v0.1.1 - Owner: https://github.com/strot-ai
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@fbdc64c98e27ba59e476ad4298578db181a89bea -
Trigger Event:
release
-
Statement type: