Skip to main content
Remote sync batches local ledger entries and uploads them to the platform ingest endpoint:
POST /api/v1/ingest/

Install

pip install "agentsentinel-sdk[remote]"
from agent_sentinel import enable_remote_sync, flush_and_stop

sync = enable_remote_sync(
    platform_url="https://platform.agentsentinel.dev",
    api_token="as_your_api_key_here",
    run_id=None,            # optional; auto-generated if None
    flush_interval=10.0,    # seconds between uploads
)

# If you want to query the run in the platform API:
print(sync.config.run_id)

# ... run your agent ...

flush_and_stop()

Authentication

The SDK sends:
Authorization: Bearer <api_token>
The platform ingest route accepts:
  • JWT tokens (user sessions)
  • API keys (recommended for agents)

Operational behavior

  • Uploads are retried with exponential backoff (network/server errors).
  • Auth failures (401) are not retried.
  • If the platform is down, entries remain local and your agent continues.