Enabling audit logging
.kiwi/config.toml
501 Not Implemented.
Querying the audit log
ISO 8601 timestamp. Defaults to the last 24 hours.
Maximum entries to return (max 10,000).
Entry fields
| Field | Description |
|---|---|
ts | Timestamp of the request |
method | HTTP method (GET, PUT, POST, DELETE) |
path | Full request path including query parameters |
space | Space name (from URL segment or X-Kiwi-Space header) |
actor | Value of X-Actor header, if present |
token_hash | Hash of the Bearer token used for authentication |
ip | Client IP address |
status | HTTP response status code |
duration_ms | Request processing time in milliseconds |
Use cases
Compliance and access tracking
Compliance and access tracking
Audit logs provide a tamper-evident record of who accessed or modified knowledge. Filter by
actor or token_hash to trace activity by a specific agent or user.Debugging agent behavior
Debugging agent behavior
When an agent writes unexpected content, query the audit log by time range and actor to reconstruct the sequence of API calls.
Performance monitoring
Performance monitoring
Use
duration_ms to identify slow requests. Combine with Prometheus metrics for dashboards.Related documentation
Configuration
Enable audit logging in config.toml.
Optional features
Feature matrix — audit requires explicit opt-in.
Utilities API
REST endpoint details.