Admin Client
The TapPass class provides admin operations for CISOs and platform teams.
from tappass import TapPass
with TapPass("http://localhost:9620", admin_key="tp_admin_...") as tp: health = tp.health() print(health.status) # "healthy"Server health
Section titled “Server health”health = tp.health()print(health.status) # "healthy"print(health.version) # "0.2.0"print(health.storage) # "postgresql"Pipelines
Section titled “Pipelines”# Createtp.create_pipeline("strict", steps={ "detect_pii": {"on_detection": "block"}, "detect_injection": {"on_detection": "block", "threshold": 0.5}, "rate_limit": {"max_calls": 50, "window_seconds": 3600},})
# Assign to agenttp.assign("my-agent", "strict")
# Listfor p in tp.pipelines(): print(f"{p.pipeline_id}: {len(p.steps)} steps, {len(p.agents)} agents")Agents
Section titled “Agents”for a in tp.agents(): print(f"{a.agent_id} ({a.framework}). active={a.active}")Audit trail
Section titled “Audit trail”events = tp.audit(agent_id="my-agent", limit=10)for event in events: print(f"[{event.timestamp}] {event.event_type}: {event.agent_id}")Context manager
Section titled “Context manager”# Syncwith TapPass("http://localhost:9620", admin_key="tp_admin_...") as tp: tp.create_pipeline("test", steps={})
# Asyncasync with TapPass("http://localhost:9620") as tp: health = await tp.ahealth()