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_ai 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_ai import agent
@agent(
name='sales_analyst',
description='Analyzes sales data and provides insights',
tools=['calculate_roi', 'top_n'],
temperature=0.1,
)
class SalesAnalyst:
system_prompt = """You are a sales analyst.
Analyze data and provide actionable recommendations."""
Cortex Pipelines (@cortex)
from strot_ai import cortex
from strot_ai.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_ai import page
from strot_ai.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_ai 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_ai 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_ai 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.3.tar.gz.
File metadata
- Download URL: strot_ai-0.1.3.tar.gz
- Upload date:
- Size: 33.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9dd671aa77e4131e64f36518bf849f89ca7a54bc9ef2b7aa6e4348259434ebb8
|
|
| MD5 |
ee0cf6817db6d5dfdac9fc86502a55fb
|
|
| BLAKE2b-256 |
082e862dea98d37410dc276bae44b5430942f034dc5feb14629921c90fb94fe9
|
Provenance
The following attestation bundles were made for strot_ai-0.1.3.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.3.tar.gz -
Subject digest:
9dd671aa77e4131e64f36518bf849f89ca7a54bc9ef2b7aa6e4348259434ebb8 - Sigstore transparency entry: 1067585938
- Sigstore integration time:
-
Permalink:
strot-ai/strot-sdk@a4ec1b9e14c8233fe2f6f750b3cebf98e6ddeefb -
Branch / Tag:
refs/tags/v0.1.3 - Owner: https://github.com/strot-ai
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@a4ec1b9e14c8233fe2f6f750b3cebf98e6ddeefb -
Trigger Event:
release
-
Statement type:
File details
Details for the file strot_ai-0.1.3-py3-none-any.whl.
File metadata
- Download URL: strot_ai-0.1.3-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 |
a74060149df8c764ae1d9e917244c78fa63893f5af6f0ebc0879578014733cae
|
|
| MD5 |
45afd4e6dbf52f4201e06d77daa7252b
|
|
| BLAKE2b-256 |
1b5362d000e6ae22ce6619f814c4e4c9ef14d627e400856997f926a46a1cd034
|
Provenance
The following attestation bundles were made for strot_ai-0.1.3-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.3-py3-none-any.whl -
Subject digest:
a74060149df8c764ae1d9e917244c78fa63893f5af6f0ebc0879578014733cae - Sigstore transparency entry: 1067586004
- Sigstore integration time:
-
Permalink:
strot-ai/strot-sdk@a4ec1b9e14c8233fe2f6f750b3cebf98e6ddeefb -
Branch / Tag:
refs/tags/v0.1.3 - Owner: https://github.com/strot-ai
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@a4ec1b9e14c8233fe2f6f750b3cebf98e6ddeefb -
Trigger Event:
release
-
Statement type: