Skip to main content

Agent Action Logging Platform — log all AI/LLM agent actions to any platform

Project description

ReskPoints

The AI Agent Logger — track every action your agents take, with probability, parameters, and results. Ship to any platform.

PyPI version Python Versions License Code style: ruff


You have AI agents making decisions — calling tools, executing code, sending messages, searching databases.
ReskPoints captures every action: what the agent did, how confident it was, what parameters it used, and what happened.

Pipe it to Datadog, Prometheus, OpenTelemetry, webhooks, JSON files, or your console — all from a single logger.


One line, full trace

from reskpoints import AgentLogger

logger = AgentLogger()

logger.log("agent-1", "tool_call", 0.95, {"tool": "search", "query": "RAG papers"}, "3 results")

Async? Same API:

await logger.alog("agent-1", "tool_call", 0.95, {"tool": "search"}, "3 results")

Decorator? Wrap any function:

@log_action(agent_id="coder")
def execute_python(code: str) -> str:
    ...

Why ReskPoints?

Problem ReskPoints
"I don't know what my agent is doing" Every tool call, API request, and decision is logged with full context
"It's too slow to add logging" One decorator, one line of code. Done.
"My logs go everywhere and nowhere" Ship to Console, File, Webhook, Datadog, Prometheus, OpenTelemetry — or all at once
"Sensitive data leaks in params" Auto-mask api_key, token, password, and custom fields before they leave your app
"I log too much / too little" Probabilistic sampling per action pattern (heartbeat: 1%, tool_*: 100%)
"One platform going down kills my logs" Retry + backoff + circuit breaker + in-memory buffering

Install

pip install reskpoints
pip install reskpoints[datadog,prometheus,opentelemetry]  # with extras

Features

  • AgentLogger — sync log() and async alog() with auto-enrichment (timestamp, host, env, UUID)
  • Decorator@log_action logs every call automatically with params + result + duration
  • Sampling — per-action probabilistic rate (tool_call: 100%, heartbeat: 1%)
  • Masking — automatic redaction of sensitive fields (api_key, token, password, regex patterns)
  • 7 platforms — Console, File (JSONL), Webhook (HMAC-signed), Datadog, Prometheus, OpenTelemetry, Mock
  • Reliability — exponential backoff retry, circuit breaker, buffering, batching
  • CLIreskpoints log, test, status, tail, replay
  • Config — YAML-driven with ${ENV_VAR:default} interpolation

Platforms

Platform Extra Use case
Console built-in Dev/debug
File (JSONL) built-in Local storage, replay
Webhook built-in Custom endpoints, Zapier, N8n
Datadog [datadog] Datadog Logs + Metrics
Prometheus [prometheus] Pushgateway metrics
OpenTelemetry [opentelemetry] OTLP spans → any backend
Mock built-in Testing

Architecture

Agent code                         ReskPoints                     Your observability stack
─────────────────────────────────────────────────────────────────────────────────────

@log_action                          ┌─────────────┐                ┌──────────┐
def search(q):         ───────────▶  │  Sampler    │                │  Console │
  ...                                │  (rate per  │                ├──────────┤
                                     │   action)   │                │  File    │
logger.log(                          └──────┬──────┘                ├──────────┤
  agent_id="agent-1",                       │                       │  Webhook │
  action="tool_call",              ┌────────▼───────┐               ├──────────┤
  probability=0.95,                │   FieldMasker  │               │  Datadog │
  params={...},                    │  (auto-redact  │               ├──────────┤
  result="ok",                     │   secrets)     │               │Prometheus│
)                                  └────────┬───────┘               ├──────────┤
                                           │                       │  OTel    │
                                   ┌───────▼────────┐              └──────────┘
                                   │   MultiPlatform │
                                   │  ┌──────────┐  │
                                   │  │  retry   │  │
                                   │  │  circuit │  │
                                   │  │  buffer  │  │
                                   │  └──────────┘  │
                                   └────────────────┘

Each platform is wrapped with retry (exp backoff), circuit breaker (5 fails → 30s recovery), and buffering (1000 entries).


Quick tour

# Minimal
logger.log("agent-1", "search", 0.95, {"q": "papers"}, "3 results")

# Full
logger.log(
    agent_id="agent-1",
    action="tool_call",
    probability=0.95,
    params={"tool": "search", "query": "RAG papers 2025"},
    result=["paper1", "paper2"],
    success=True,
    duration_ms=1240.5,
    session_id="sess_abc123",
    correlation_id="req_xyz789",
)

# Async
results = await logger.alog("agent-1", "search", 0.95, {"q": "papers"}, "3 results")

# Decorator
@log_action(agent_id="coder")
def execute_python(code: str) -> str: ...

# Check health
logger.health()
# → {"console": {"status": "ok"}, "datadog": {"status": "degraded", "error": ...}}

CLI

reskpoints log --agent-id agent-1 --action tool_call --params '{"tool":"search"}'
reskpoints test                    # Test all platforms
reskpoints status                  # Platform health
reskpoints tail                    # Live log stream
reskpoints replay logs.jsonl       # Replay from file

Config (reskpoints.yaml)

agent_logger:
  sampling:
    default_rate: 1.0
    rules:
      - action: "heartbeat"   rate: 0.01
      - action: "tool_*"      rate: 1.0
  masking:
    enabled: true
    sensitive_fields: [api_key, token, secret, password]
  platforms:
    console:
      enabled: true
      format: "human"
    webhook:
      enabled: false
      url: "${WEBHOOK_URL}"
      signing_secret: "${WEBHOOK_SECRET}"
    datadog:
      enabled: false
      api_key: "${DD_API_KEY}"
      site: "datadoghq.eu"

Development

git clone https://github.com/Resk-Security/ReskPoints.git
cd ReskPoints
pip install -e ".[all,dev]"
pytest tests/ -v     # 26 tests
ruff check src/      # clean
mypy src/            # passes

License

Apache 2.0 — see LICENSE. Built with resklogits.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

reskpoints-0.1.2.tar.gz (17.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

reskpoints-0.1.2-py3-none-any.whl (23.6 kB view details)

Uploaded Python 3

File details

Details for the file reskpoints-0.1.2.tar.gz.

File metadata

  • Download URL: reskpoints-0.1.2.tar.gz
  • Upload date:
  • Size: 17.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for reskpoints-0.1.2.tar.gz
Algorithm Hash digest
SHA256 f95a58b20b9579c8c86d06c6dc2e65aa6d22a604797009182414d4a96c4de76c
MD5 e1ef3b6b7951fe44006dbdf351c8e4f6
BLAKE2b-256 4c37e8f6f9a82acaf05d1d46d73df23888d6f6fad6e8fe12f3870b6924fed824

See more details on using hashes here.

File details

Details for the file reskpoints-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: reskpoints-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 23.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for reskpoints-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 8933de524d4995b27a4b7ebb7a072273032d4652f1cddc0df1f76803b4774375
MD5 a236d7a2f14ad32e98d9a0891cd53687
BLAKE2b-256 5e20fa05710c192f5db00dc08a78485f8ecd2f0cefa9d99053eff24b25404b39

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page