Project

amlexia

0.0
The project is in a healthy, maintained state
Track HTTP APIs, LLM providers, payments, and webhooks with traces, latency, and cost fields.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
 Dependencies
 Project Readme

Amlexia SDKs

Official client libraries for Amlexia — operational intelligence for APIs, AI providers, payments, and infrastructure.

Package Registry Install
Node.js npm @amlexiahq/node npm install @amlexiahq/node
Python PyPI amlexia pip install amlexia
Go GitHub sdks/go go get github.com/Amlexia/Amlexia/sdks/go@latest
Ruby GitHub sdks/ruby See Ruby README
Shared (Node) npm @amlexiahq/shared Dependency of @amlexiahq/node

License: Proprietary — not open source. See LICENSE. Use is subject to the Terms of Service.


Documentation

Doc Description
Getting started Account, first event, dashboard
Environment variables All AMLEXIA_* and related env vars
Event fields Every track() field and ingest mapping
Node.js SDK API reference, Express, Fastify, Hono, Next.js, OTEL
Python SDK API reference, FastAPI, Flask, Django
Go SDK HTTP client, OpenAI/Anthropic helpers, tracing
Ruby SDK HTTP client, OpenAI/Anthropic helpers, tracing
@amlexiahq/shared Tracing IDs, provider detection, PII scrubbing
Examples Runnable samples
AI setup prompts Master prompt for Cursor/Copilot — install, env, all frameworks, OpenAI, Stripe, cost_usd, verify
Publishing Release process for maintainers

Quick start

Node.js

import { AmlexiaClient } from '@amlexiahq/node';

const client = new AmlexiaClient({
  sdkKey: process.env.AMLEXIA_SDK_KEY!,
  ingestUrl: process.env.AMLEXIA_INGEST_URL ?? 'https://ingest.amlexia.com',
});

await client.track({
  endpoint: 'POST /v1/chat',
  method: 'POST',
  statusCode: 200,
  latencyMs: 320,
  provider: 'openai',
  tokensInput: 120,
  tokensOutput: 80,
});

await client.shutdown();

Python

from amlexia import AmlexiaClient

client = AmlexiaClient.from_env()
client.track("POST /v1/chat", "POST", 200, 320, provider="openai", tokens_input=120, tokens_output=80)
client.shutdown()

Repository layout

packages/shared/     @amlexiahq/shared — tracing, providers, scrubber
sdks/node/           @amlexiahq/node — Node.js SDK + framework middleware
sdks/python/         amlexia — Python SDK + framework integrations
examples/            Minimal Express and FastAPI samples
docs/                Cross-SDK guides

How ingestion works

  1. Your app calls track() (or middleware does it automatically).
  2. Events are buffered and sent in batches to POST /v1/events.
  3. Default flush: every 5 seconds or 50 events (configurable).
  4. On shutdown, call shutdown() to flush remaining events.

Retries use exponential backoff (up to 5 attempts by default).


Framework support

Framework Node Python
Express @amlexiahq/node/express
Fastify @amlexiahq/node/fastify
Hono @amlexiahq/node/hono
Next.js App Router @amlexiahq/node/next
FastAPI amlexia.fastapi_integration
Flask amlexia.flask_integration
Django amlexia.django_integration

Develop from source

pnpm install
pnpm build
pnpm typecheck

Support