observe() — TypeScript API
The zero-config entry point to TealTiger governance. Wraps any supported LLM provider client with cost tracking, audit logging, PII detection, and behavioral baseline construction.observe()
Parameters
Returns
ObserveProxy — A transparent proxy with the same API surface as the original client, plus governance methods.
Throws
Example
ObserveConfig
ObserveProxy
The proxy returned byobserve(). It has the same method surface as the original client, plus these governance methods:
getCost()
getBaseline()
null if the baseline window hasn’t been filled yet.
getAgentId()
getSessionId()
getBurnRate()
getCostByAgent()
freeze()
FrozenAgentError.
Parameters
Behavior
- Idempotent: Calling
freeze(id)multiple times is equivalent to calling it once - Immediate: Takes effect for the very next request
- In-memory: No external service needed, persists for process lifetime
- Wildcard:
freeze("*")freezes all agents, including agents created after the freeze call
Example
unfreeze()
Parameters
Behavior
- Safe: Calling
unfreeze(id)for an agent that isn’t frozen completes without error - Immediate: Takes effect for the very next request
- Targeted:
unfreeze("agent-01")only unfreezes that specific agent — does not affect the wildcard freeze

