What Gets Logged
Every tool call is logged with:| Field | Description |
|---|---|
| Timestamp | When the request occurred |
| Upstream | Which MCP server was called |
| Tool | Which tool was invoked |
| Action Class | How Latch classified the action (READ, WRITE, EXECUTE, etc.) |
| Decision | What happened (Allowed, Denied, Approval Required, Approved) |
| Rule | Which rule triggered the decision |
| Arguments | The tool call arguments (with sensitive values redacted) |
Viewing the Audit Log
- Go to Audit Log in the dashboard
- Browse recent requests or filter by:
- Upstream
- Tool
- Decision type
- Date range
Understanding Decisions
| Decision | Meaning |
|---|---|
| Allowed | Action proceeded automatically (matched an Allow rule or safe default) |
| Denied | Action was blocked (matched a Deny rule) |
| Approval Required | Action is waiting for human approval |
| Approved | Action was approved and completed |
| Rejected | Action was denied by a human reviewer |
| Expired | Approval request timed out |
Automatic Redaction
Latch automatically redacts sensitive values in logged arguments:- Passwords and secrets →
[REDACTED] - API keys and tokens →
[REDACTED] - Long content (>500 chars) →
[TRUNCATED] - Approval tokens → removed entirely
Redacted Fields
Fields matching these patterns are redacted:password,passwd,secrettoken,api_key,apiKeycredential,auth,bearerprivate_key,privateKey
Using the Audit Log
Debugging Agent Behavior
When your agent does something unexpected:- Find the request in the audit log
- Check which tool was called and with what arguments
- See which rule triggered the decision
- Adjust rules if needed
Security Review
Periodically review the audit log to:- Spot unusual patterns (many denied requests, unexpected tools)
- Verify rules are working as intended
- Identify tools that might need stricter policies
Compliance
The audit log provides a complete record for:- Security audits
- Incident investigation
- Understanding AI agent behavior over time
Filtering and Search
Use filters to find specific requests:Retention
Audit logs are stored in your Postgres database. Configure retention based on your needs:- Default: All logs retained indefinitely
- For high-volume deployments, consider periodic cleanup