Your First Agent
Register with governance flags
Section titled “Register with governance flags”from tappass import Agent
agent = Agent("http://localhost:9620", "tp_...", flags={ "mode": "observe", # log everything, block nothing "email": "mirror:you@company.com", # redirect agent emails to you "pii": "mask", # mask PII in responses "budget": "dev", # $1/session cap})
response = agent.chat("Draft an email to the client about Q4 results")print(response.content)print(response.pipeline.flags) # shows active governance flagsStreaming
Section titled “Streaming”for chunk in agent.stream("Write a compliance report"): print(chunk, end="", flush=True)Multi-turn conversations
Section titled “Multi-turn conversations”agent.chat("My name is Alice and I work at Acme Corp")response = agent.chat("What's my name?")print(response.content) # "Your name is Alice."Govern existing tools
Section titled “Govern existing tools”# Wrap any callable. every execution is auditedtools = agent.govern([search, send_email, read_file])Lock down with sandbox
Section titled “Lock down with sandbox”agent.secure() # irreversible. blocks ~/.ssh, ~/.aws, dangerous commandsagent.secure(tier="worker") # progressive trust tierRecommended progression
Section titled “Recommended progression”| Week | Flags | What you’re doing |
|---|---|---|
| 1 | mode=observe | See what TapPass catches: zero risk |
| 2 | mode=enforce, budget=dev | Start enforcing, cap spend |
| 3 | + email=mirror, pii=mask | Handle obvious risks |
| 4 | email=internal, tools=denylist:... | Tighten for staging |
| 5 | Full pipeline config | Production governance |