Drop-in SDKs that add security guardrails and cost tracking to your AI applications. Works with OpenAI, Anthropic, and Azure OpenAI.
π Read the introduction blog post to learn more about TealTiger!
TypeScript/JavaScript:
npm install tealtigerPython:
pip install tealtiger# Clone the repository with submodules
git clone --recurse-submodules https://github.com/agentguard-ai/tealtiger.git
cd tealtiger
# If you already cloned without --recurse-submodules, initialize them:
git submodule update --init --recursive
# TypeScript SDK
cd packages/tealtiger-sdk
npm install
npm test
npm run build
# Python SDK
cd packages/tealtiger-python
pip install -e .
pytesttealtiger/
βββ packages/
β βββ tealtiger-sdk/ # TypeScript/JavaScript SDK
β β βββ src/ # Source code
β β βββ tests/ # Test files
β β βββ package.json # NPM package config
β β
β βββ tealtiger-python/ # Python SDK
β βββ src/tealtiger/ # Source code
β βββ tests/ # Test files
β βββ pyproject.toml # PyPI package config
β
βββ examples/ # Usage examples
βββ README.md # This file
import { TealOpenAI } from 'tealtiger';
const client = new TealOpenAI({
apiKey: process.env.OPENAI_API_KEY,
enableGuardrails: true,
enableCostTracking: true,
});
const response = await client.chat.create({
model: 'gpt-4',
messages: [{ role: 'user', content: 'Hello!' }],
});from tealtiger.clients import TealOpenAI, TealOpenAIConfig
config = TealOpenAIConfig(
api_key="your-api-key",
enable_guardrails=True,
enable_cost_tracking=True
)
client = TealOpenAI(config)
response = await client.chat.create(
model="gpt-4",
messages=[{"role": "user", "content": "Hello!"}]
)- PII Detection - Automatically detect and redact sensitive information
- Prompt Injection Prevention - Block malicious prompt injection attempts
- Content Moderation - Filter toxic, harmful, or inappropriate content
- Real-time Tracking - Monitor AI costs as they happen
- Budget Limits - Set spending limits and get alerts
- Usage Analytics - Detailed cost breakdowns
- OpenAI - GPT-4, GPT-3.5, and all OpenAI models
- Anthropic - Claude 3 Opus, Sonnet, and Haiku
- Azure OpenAI - Enterprise-ready Azure integration
- Introduction Blog Post - Learn about TealTiger
- TypeScript SDK - Full TypeScript documentation
- Python SDK - Full Python documentation
- Examples - Working code examples
cd packages/tealtiger-sdk
npm test # Run all tests
npm run test:coverage # Run with coveragecd packages/tealtiger-python
pytest # Run all tests
pytest --cov=tealtiger # Run with coverageWe welcome contributions! Here's how to get started:
-
Fork the repository
-
Clone your fork
git clone https://github.com/YOUR-USERNAME/tealtiger.git cd tealtiger -
Install dependencies
# TypeScript cd packages/tealtiger-sdk && npm install # Python cd packages/tealtiger-python && pip install -e ".[dev]"
-
Make your changes
-
Run tests
-
Submit a pull request
See CONTRIBUTING.md for detailed guidelines.
cd packages/tealtiger-sdk
npm version patch # or minor, major
npm run build
npm test
npm publishcd packages/tealtiger-python
# Update version in pyproject.toml
python -m build
python -m twine upload dist/*MIT Β© TealTiger Team
See LICENSE for details.
Security is our top priority. If you discover a security vulnerability, please see our Security Policy.
- Issues: GitHub Issues
- Discussions: GitHub Discussions
- NPM Package: npmjs.com/package/tealtiger
- PyPI Package: pypi.org/project/tealtiger
- GitHub: github.com/agentguard-ai/tealtiger
Made with β€οΈ for the AI community