All AISentinel SDKs have been extracted to their own repositories for independent development and releases:
pip install aisentinel-sdknpm install @mfifth/aisentinel-javascript-sdkgo get github.com/mfifth/aisentinel-go-sdkgo get github.com/mfifth/aisentinel-go-sdkEach SDK repository contains comprehensive documentation including:
README.md # Installation and quick start guide
docs/ # Comprehensive documentation
examples/ # Integration examples
tests/ # Test suite
CHANGELOG.md # Version history and migration notes
CONTRIBUTING.md # Development guidelines
Looking for additional language support? Consult the SDK generator docs and open a feature request with the generated baseline.
Below are minimal examples showing how to evaluate a decision or run an audit with each SDK. These are intended as small, copy-pasteable samples — consult the SDK repo for full documentation and feature details.
Install: pip install aisentinel-sdk
from aisentinel import AISentinelClient
client = AISentinelClient(api_key="YOUR_TENANT_API_KEY")
# Evaluate a decision against a rulepack
response = client.evaluate(rulepack_id="default", input={"text": "Customer SSN: 111-22-3333"})
print("Allowed:", response.allowed)
print("Reasons:", response.reasons)
Install: npm install @mfifth/aisentinel-javascript-sdk
import AISentinel from '@mfifth/aisentinel-javascript-sdk';
const client = new AISentinel({ apiKey: process.env.AISENTINEL_KEY });
async function run() {
const res = await client.evaluate({ rulepackId: 'default', input: { text: 'Sensitive data 4111-1111-1111-1111' } });
console.log('Allowed:', res.allowed);
console.log('Reasons:', res.reasons);
}
run();
aisentinel-go-sdk/examples/basic)Install: go get github.com/mfifth/aisentinel-go-sdk
package main
import (
"context"
"encoding/json"
"fmt"
"time"
governor "github.com/mfifth/aisentinel-go-sdk"
)
func main() {
cfg := governor.Config{APIKey: "test-key", OfflineMode: true}
ctx, cancel := context.WithTimeout(context.Background(), 2*time.Second)
defer cancel()
gov, err := governor.NewGovernor(ctx, cfg)
if err != nil {
panic(err)
}
defer gov.Close()
payload, _ := json.Marshal(map[string]string{"rule-1": "example"})
result, err := gov.Evaluate(ctx, governor.DecisionRequest{RulepackID: "local", Payload: payload})
if err != nil {
fmt.Println("error:", err)
return
}
fmt.Println("allowed:", result.Allowed, "reason:", result.Reason)
}