Skip to main content

Universal AI agent observability & governance — trace every LLM provider, framework, and vector DB with 17 built-in governance providers

Project description

Nyraxis Python SDK

Universal AI agent observability — trace every LLM provider, framework, and vector DB automatically.

Installation

pip install nyraxis-sdk

Quick Start (Recommended)

import nyraxis_sdk

nyraxis_sdk.init(
    api_key="nyx_your_api_key",
    base_url="https://your-nyraxis-backend.com",
    agent_name="my-agent",
)

# That's it. All LLM calls are now auto-traced.
# No code changes needed — works with any provider or framework below.

# Before process exit:
nyraxis_sdk.shutdown()

Trace Grouping

from nyraxis_sdk import workflow, task

@workflow(name="research-agent")
def run_agent(query):
    summary = summarize(query)
    return summary

@task(name="summarize")
def summarize(text):
    # LLM calls inside here are grouped under this task
    return openai.chat.completions.create(...)

Auto-Instrumented

LLM Providers (20+)

OpenAI, Anthropic, Google (Gemini/PaLM/VertexAI), Cohere, Mistral, AWS Bedrock, Azure OpenAI, Ollama, Together AI, Groq, Replicate, HuggingFace, AI21, Aleph Alpha, DeepSeek, Fireworks, Perplexity, WatsonX, SageMaker

Frameworks (10+)

LangChain, LlamaIndex, CrewAI, Haystack, AutoGen, Semantic Kernel, DSPy, Marvin, Instructor, Guidance, Letta

Vector Databases (9+)

Pinecone, Chroma, Weaviate, Qdrant, Milvus, PGVector, Redis, LanceDB, Marqo

Span Types Captured

Type Description
llm LLM chat/completion calls
embedding Embedding generation
tool Tool/function calls
retrieval Vector DB queries
reranker Reranking operations
agent Agent orchestration
workflow Workflow grouping
task Task execution
guardrail Guardrail checks
memory Memory read/write
generic Other operations

Legacy Mode (Removed)

Framework-specific handlers (framework="langchain" etc.) have been removed in v0.4.0. Auto mode covers everything they did and more. Migration:

# Before (v0.3):
handler = nyraxis_sdk.init(api_key="nyx_...", framework="langchain")
llm = ChatOpenAI(callbacks=[handler])

# After (v0.4):
nyraxis_sdk.init(api_key="nyx_...")
llm = ChatOpenAI()  # auto-traced, no callbacks needed

Direct API Client

from nyraxis_sdk import NyraxisClient

async with NyraxisClient(api_key="nyx_your_api_key") as client:
    await client.ingest_trace(
        trace_id="trace-123",
        spans=[...],
        resource_attributes={"service.name": "my-agent"},
    )

Generic OTLP Endpoint

Any OpenTelemetry-instrumented app can send traces directly:

POST /api/v1/ingest/otel/v1/traces
Header: X-API-Key: nyx_...
Content-Type: application/json
Body: Standard OTLP ExportTraceServiceRequest (JSON or Protobuf)

This means frameworks with native OTEL support (AutoGen, Semantic Kernel, DSPy, etc.) can send traces to Nyraxis without using this SDK at all.

License

MIT

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

nyraxis_sdk-0.6.0.tar.gz (9.8 kB view details)

Uploaded Source

Built Distribution

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

nyraxis_sdk-0.6.0-py3-none-any.whl (8.4 kB view details)

Uploaded Python 3

File details

Details for the file nyraxis_sdk-0.6.0.tar.gz.

File metadata

  • Download URL: nyraxis_sdk-0.6.0.tar.gz
  • Upload date:
  • Size: 9.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for nyraxis_sdk-0.6.0.tar.gz
Algorithm Hash digest
SHA256 9369bef9ec55b93bb37941cd10fe0a1775eed4a34c01db9bc60e05a0798090bf
MD5 d93e2fbfab18d17d3f144f4d5cd36066
BLAKE2b-256 e9ed73e6b2d310bdcc90620a9aed82fb801eee4abd6f3815d731a9e526a39f76

See more details on using hashes here.

File details

Details for the file nyraxis_sdk-0.6.0-py3-none-any.whl.

File metadata

  • Download URL: nyraxis_sdk-0.6.0-py3-none-any.whl
  • Upload date:
  • Size: 8.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for nyraxis_sdk-0.6.0-py3-none-any.whl
Algorithm Hash digest
SHA256 6af06b2aa76cd79caff147101d4daac72118025cda0650c0943f7945ecc3e204
MD5 5c672eacbd5f71f23e48d6771b77edda
BLAKE2b-256 66f315be5922e178dd6485e917d29bb319ee1623d2c476865c60a50f57d211e4

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