Summary
Ollama runs LLMs locally. When developers use Ollama for agent workflows, they lose the governance layer that cloud API providers offer (rate limits, content filtering). TealTiger can fill that gap — providing PII detection, secret scanning, cost estimation, and policy enforcement for local LLM calls.
Why this integration?
Ollama's OpenAI-compatible API means TealTiger already works via TealOpenAI pointed at http://localhost:11434. But there are Ollama-specific concerns:
- No built-in content filtering — Ollama models respond to anything
- No cost tracking — local models have no usage API, but compute cost still exists
- No audit trail — no provider-side logging of what was asked/answered
- Tool use without governance — Ollama supports function calling, but with no access control
Proposed approach
TealOllama client wrapper — wraps Ollama's API with governance (builds on OpenAI-compat)
- Compute cost estimation — estimate local inference cost based on model size, tokens, and hardware
- Full guardrails — PII, secrets, prompt injection for local models that have no built-in safety
- Audit trail — structured TEEC receipts for every local model interaction
Example usage
from tealtiger.integrations.ollama import TealOllama
client = TealOllama(
host="http://localhost:11434",
guardrails={
"pii_detection": True,
"secret_detection": True,
"prompt_injection": True,
},
budget={
"max_requests_per_session": 100, # Rate limit for local models
},
)
response = client.chat(
model="llama3.1",
messages=[{"role": "user", "content": "Summarize user data"}],
)
# Governance evaluated before and after the local model call
Deliverables
Links
Summary
Ollama runs LLMs locally. When developers use Ollama for agent workflows, they lose the governance layer that cloud API providers offer (rate limits, content filtering). TealTiger can fill that gap — providing PII detection, secret scanning, cost estimation, and policy enforcement for local LLM calls.
Why this integration?
Ollama's OpenAI-compatible API means TealTiger already works via
TealOpenAIpointed athttp://localhost:11434. But there are Ollama-specific concerns:Proposed approach
TealOllamaclient wrapper — wraps Ollama's API with governance (builds on OpenAI-compat)Example usage
Deliverables
tealtiger.integrations.ollamamoduleTealOllamaclient wrapping Ollama's OpenAI-compatible APILinks