AGENTS THAT LEARN FROM THEIR OWN METRICS

Every action logged. Every metric queryable. Your agents can inspect their own performance—error rates, costs, latency—and adapt in real-time.

MCP Calls → PostgreSQL → CLI Queries

Agent calls an MCP tool? Logged. Tool name, execution time, result status, trace ID. User visits a page? Captured. Session ID, reading pattern, scroll depth, rage clicks. Everything goes to PostgreSQL. Query it with SQL. Export it anywhere. Your data, your database.
  • MCP Tool Logging — Every mcp.tool_call records: tool name, execution duration, status, request/response payloads. Query with: systemprompt infra logs --type mcp.tool_call
  • A2A Invocation Tracking — Agent-to-agent calls logged with caller, callee, context_id, task_id. Trace multi-agent workflows end-to-end across your agentic mesh.
  • Engagement Events — Page views, scroll depth (25/50/75/90/100%), time_on_page_ms, visible_time_ms, hidden_time_ms. Structured events in PostgreSQL, not third-party analytics.

Self-Aware Agents

Your agents can query their own performance data. Run systemprompt analytics agents stats. Success rate dropping? The agent sees it. Response times climbing? It knows. Cost per request spiking? It can react. The feedback loop is built into the protocol.
  • Analytics as MCP Tools — Run systemprompt analytics agents stats or systemprompt analytics costs breakdown --by-agent. These commands are also available as agent-callable tools.
  • Performance Introspection — Agents query their own metrics: token usage per request, latency percentiles, error rates, cost trends. Self-awareness built into the protocol.
  • Adaptive Behavior — Based on analytics, agents can switch skills, modify context, or invoke other agents via A2A. Real-time adaptation without human intervention.

Beyond Pageviews

Not just pageviews. The engagement tracker classifies actual reading behavior: bounce, skimmer, scanner, reader, engaged. It detects rage clicks (3+ in 500ms) and dead clicks on non-interactive elements. Real signals, not vanity metrics.
  • Reading Pattern Classification — Automatic user segmentation: bounce, skimmer, scanner, reader, engaged. Stored per session. Query patterns across your user base.
  • Interaction Signals — Rage clicks (3+ in 500ms), dead clicks on non-interactive elements, scroll velocity, direction changes, copy events. Behavioral signals beyond basic analytics.
  • Session Intelligence — time_to_first_interaction_ms, time_to_first_scroll_ms, visible vs hidden time, device type, country. Full session context for debugging and analysis.

The Loop Closes

The loop closes when insights change agent behavior. Contexts persist in PostgreSQL and are shared across agents. Skills can be added via CLI. System prompts can be updated without redeployment. The system evolves.
  • Shared Contexts — Multi-agent contexts stored in PostgreSQL, accessible via systemprompt core contexts. Agents share state, see each other's work, build on previous conversations.
  • Dynamic Skills — Add or remove skills at runtime: systemprompt admin agents edit assistant --skill new_skill. No rebuild required. Agents discover new capabilities immediately.
  • Live Configuration — Update system prompts, enable/disable agents, modify OAuth scopes. All via CLI. Changes take effect immediately. Zero-downtime adaptation.

Debug Any Request

Every request has a trace ID. Every tool call is linked. When something goes wrong, run systemprompt infra logs --trace abc123. From user click to agent response to tool execution. End-to-end visibility in one query.
  • End-to-End Tracing — Each request gets a trace_id. Follow it through MCP calls, A2A invocations, and database operations. One ID ties everything together.
  • Compliance Ready — SOC 2, GDPR, HIPAA audit exports. Generate compliance reports directly from PostgreSQL. No third-party audit tools required.
  • Debug Any Issue — Filter by user, agent, time range, error status. Reproduce any session. Find the needle in the haystack instantly.

Ready to build?

Get started with SystemPrompt in minutes.