Skip to content

Karma-234/sentra

Repository files navigation

Sentra

Sentra is a runtime observability layer for AI agents.

It captures, visualizes, and analyzes multi-agent execution across models, tools, and workflows.

Core Capabilities

  • Execution tracing across agents
  • Cost attribution per step
  • Real-time graph visualization
  • Shadow risk scoring (no enforcement yet)
  • Replayable execution timelines

Architecture

Collector → Postgres → API → Dashboard

Layer Boundaries

Layer Job
collector Capture reality
core Compute meaning
api Expose structure
dashboard Show reality

The collector should stay focused on faithful capture: requests, responses, IDs, latency, and persistence boundaries. Domain interpretation belongs in core; public graph/query contracts belong in api; visualization belongs in dashboard.

Collector Configuration

The collector requires Postgres and an OpenAI-compatible upstream:

SENTRA_DATABASE_URL=postgres://sentra:sentra@localhost:5432/sentra?sslmode=disable
SENTRA_UPSTREAM_BASE_URL=https://api.openai.com
SENTRA_UPSTREAM_API_KEY=...

Optional:

SENTRA_COLLECTOR_ADDR=:8080
SENTRA_API_ADDR=:8081
SENTRA_MAX_BODY_BYTES=16777216
SENTRA_WORKER_ID=1

Local Test Loop

Start Postgres and apply migrations:

docker compose up -d postgres
make migrate-up

Start the collector:

SENTRA_DATABASE_URL=postgres://sentra:sentra@localhost:5432/sentra?sslmode=disable \
SENTRA_UPSTREAM_BASE_URL=https://api.openai.com \
SENTRA_UPSTREAM_API_KEY=... \
go run ./collector/cmd/sentra-collector

Start the API:

SENTRA_DATABASE_URL=postgres://sentra:sentra@localhost:5432/sentra?sslmode=disable \
go run ./api/cmd/sentra-api

Query captured data:

curl http://localhost:8081/traces
curl http://localhost:8081/traces/{trace_id}
curl http://localhost:8081/traces/{trace_id}/graph

Status

Early-stage infrastructure prototype.

About

Sentra is a runtime observability layer for AI agents. It captures, visualizes, and analyzes multi-agent execution across models, tools, and workflows.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors