Skip to main content
Glama
zyx1121

agent-store

by zyx1121

agent-store

Minimal agent telemetry store. One process, two paths:

  • OTLP/HTTP (JSON encoding) → ingest spans/logs/metrics → Postgres

  • MCP streamable-http → query Postgres → agent introspection tools

Quick start

# Local dev
PGHOST=localhost PGPORT=5432 PGUSER=postgres PGPASSWORD=secret PGDATABASE=agentstore \
  bun run src/server.ts

Related MCP server: openobserve-community-mcp

Testing

# Unit tests only (no DB)
bun test test/otlp-parse.test.ts

# Full integration tests (spins up docker postgres)
bash scripts/test-db.sh

# Or if PG is already running:
PGHOST=localhost PGPORT=5432 PGUSER=postgres PGPASSWORD=secret PGDATABASE=agentstore_test \
  bun test

Env vars

Var

Default

Description

PORT

4318

HTTP listen port

MCP_PATH

/mcp

MCP endpoint path

DATABASE_URL

Full postgres URL (overrides PGHOST etc.)

PGHOST

localhost

Postgres host

PGPORT

5432

Postgres port

PGUSER

postgres

Postgres user

PGPASSWORD

postgres

Postgres password

PGDATABASE

agentstore

Postgres database

AUDIT_DIR

./data

Directory for ingest audit JSONL files

Routes

Method

Path

Description

POST

/v1/traces

OTLP/JSON trace ingest

POST

/v1/logs

OTLP/JSON log ingest

POST

/v1/metrics

OTLP/JSON metric ingest

GET

/healthz

Health check (includes PG ping)

ALL

/mcp

MCP streamable-http

Schema (telemetry schema, auto-migrated on startup)

  • telemetry.spans — OTLP trace spans with resource/scope/attributes as JSONB

  • telemetry.logs — OTLP log records

  • telemetry.metrics — OTLP metric datapoints (gauge/sum/histogram decomposed)

MCP tools

Tool

Description

query_logs

Filter logs by service, body, severity, time range

query_traces

Trace summaries (root span, count, duration, error flag)

get_trace

All spans for a trace_id, parent-child reconstructable

summarize_activity

Pre-aggregated per-service stats: spans, errors, top names, daily

list_services

All services with span/log counts and last_seen

service_schema

Distinct span names + attribute keys for a service

since param accepts relative ("7d", "24h", "30m") or ISO datetime.

Docker

docker build -t agent-store .
docker run -e PGHOST=... -e PGPASSWORD=... -p 4318:4318 agent-store

Related MCP Connectors

Related MCP Servers

  • A
    license
    A
    quality
    A
    maintenance
    MCP-native agent evaluation and observability server. Log traces, evaluate output quality with 12 built-in rules (PII detection, prompt injection, cost thresholds), and track agent costs. Real-time dashboard, OTel-compatible spans. Self-hosted, MIT licensed.
    9
    209 npm
    9
    MIT
  • A
    license
    B
    quality
    C
    maintenance
    A read-only MCP server for OpenObserve Community Edition that works over the REST API. Provides tools for searching logs, traces, stream schemas, and dashboards - no Enterprise license required.
    8
    196 PyPI
    16
    GPL 3.0
  • A
    license
    A
    quality
    A
    maintenance
    Transparent MCP proxy with OpenTelemetry tracing. Wrap any MCP server, persist traces to SQLite · Postgres · MySQL. No code changes needed.
    2
    11 npm
    11
    Apache 2.0