Log Proxy Service
Structured execution traces for every agent, every session, every decision.
Why It Matters
AI agents are opaque by default. When something goes wrong — a wrong decision, a failed tool call, an unexpected output — you need a structured record of what happened and why. The Log Proxy captures execution logs from every agent in your platform, correlates them to sessions and request chains, and makes them searchable.
Beyond debugging, structured logs are the foundation of compliance. Enterprise customers need proof that agents operated within policy, that sensitive data wasn't leaked into logs, and that audit trails are tamper-evident. The Log Proxy handles this with PII redaction rules and encrypted log storage — without requiring agents to implement any of this themselves.
Agents write logs through the SDK or MCP tools. The Log Proxy handles buffering, correlation, storage, and search. You get full observability without cluttering agent code with logging infrastructure.
Key Capabilities
- Structured Log Capture: JSON log records with level, timestamp, session ID, agent ID, and arbitrary metadata — captured automatically from SDK calls
- Log Levels: DEBUG, INFO, WARN, ERROR with configurable verbosity per agent or session
- Session Correlation: Every log record linked to a session ID and request chain, enabling full trace reconstruction
- Log Search & Filtering: Query by agent, session, time range, log level, or keyword across all captured logs
- MCP Tools: Standard MCP interface so any compatible agent can write logs without SDK integration
- Log Retention: Configurable retention periods with automatic expiry (Starter: 7 days, Pro: 30 days, Enterprise: configurable)
- PII Redaction (Enterprise): Configurable redaction rules that scrub email addresses, phone numbers, SSNs, and custom patterns from log records before storage
- Encrypted Storage (Enterprise): Log records encrypted at rest with customer-controlled key rotation and audit-compliant storage
How It Works
An agent writes a log entry through the SDK or an MCP tool. The Log Proxy receives the record, attaches session and agent metadata, buffers it for efficient writes, and stores it in the search index. On Enterprise tiers, PII redaction rules are applied before storage and records are encrypted at rest. Consumers query logs by session, agent, time range, or keyword through the same SDK.
Log Proxy Architecture
Basic Logging via SDK
Write structured log entries from your agent code. The Log Proxy automatically attaches session metadata and stores entries for search.
import { LogProxyClient } from '@firefoundry/log-proxy-client';
const logger = new LogProxyClient({
agentId: 'crm-agent',
sessionId: session.id,
});
await logger.info('Customer lookup completed', {
customerId: customer.id,
resultCount: results.length,
durationMs: elapsed,
});
await logger.warn('Low confidence entity match', {
query: searchTerm,
confidence: 0.61,
threshold: 0.75,
});
Log Search
Query logs by session, level, time range, or keyword. Results include full metadata for each matching record.
const logs = await logger.search({
sessionId: 'session-abc123',
level: 'WARN',
from: new Date('2026-02-01'),
to: new Date('2026-02-28'),
limit: 100,
});
for (const entry of logs.records) {
console.log(`[${entry.level}] ${entry.message}`, entry.metadata);
}
Tier Comparison
Structured logging is available on every tier. Enterprise adds PII redaction, encrypted storage, and configurable retention for compliance-sensitive workloads.
| Feature | Starter | Pro | Enterprise |
|---|---|---|---|
| Structured log capture | ✓ | ✓ | ✓ |
| Session correlation | ✓ | ✓ | ✓ |
| Log search & filtering | ✓ | ✓ | ✓ |
| Retention | 7 days | 30 days | Configurable |
| MCP tools | ✓ | ✓ | ✓ |
| PII redaction | — | — | ✓ |
| Encrypted storage | — | — | ✓ |
| Audit trail export | — | — | ✓ |
Use Cases
Agent Debugging
Trace exactly what an agent did during a session — tool calls, decisions, errors — without adding debug code. Session-correlated logs let you reconstruct the full execution path.
Compliance Audit
Enterprise teams get a tamper-evident, redacted log record proving agents operated within policy. PII redaction and encrypted storage satisfy data protection requirements without additional agent code.
Performance Monitoring
Identify slow tool calls, high-error sessions, and anomalous agent behavior from structured log patterns. Filter by log level and time range to spot trends across your agent fleet.
Incident Response
Reconstruct the full execution sequence of a failed session to diagnose root cause. Correlation IDs tie every log entry back to the originating request chain for end-to-end traceability.