Nyraxis/ docs
Developer documentation

Quickstart

Connect a client, evaluate synthetic text, and inspect the result.

Start with synthetic text in a development organization. This walkthrough covers direct evaluation. Checking text does not, by itself, stop your agent from calling a model or tool.

1. Prepare a key and policy

Create an organization, then open Dashboard → API Keys and create an ingest (or full) key. Store it in the NYRAXIS_API_KEY environment variable. Set NYRAXIS_BASE_URL to your Nyraxis API URL.

In Dashboard → Security → Policies, enable a Secrets detection policy in blocking mode, scoped to all agents in this development organization. Check detector health before running the example. A degraded or unavailable detector is an incomplete check.

For Python 1.3.2 streaming and lifecycle checks, use the separate local SDK pilot. Its synthetic installation rehearsal does not replace real customer or provider acceptance.

2. Evaluate synthetic text

These examples use the published Python 1.3.2 and Node 1.2.9 interfaces. Inspect evaluation_status and errors alongside allowed; an incomplete or unconfigured evaluation is not a completed clean check.

pip install nyraxis-sdk==1.3.2
import os
from nyraxis_sdk.client import NyraxisClient

client = NyraxisClient(
    api_key=os.environ["NYRAXIS_API_KEY"],
    base_url=os.environ["NYRAXIS_BASE_URL"],
    timeout=30,
)
try:
    result = client.evaluate(
        input="Demo-only internal password is DEMO-ONLY-NEVER-USE.",
        agent_name="quickstart-support",
    )
    if result.evaluation_status != "complete" or result.errors or result.policies_evaluated < 1:
        raise RuntimeError("A required policy check did not complete")
    print("Allowed:", result.allowed)
    print("Detected policies:", [v.policy_type for v in result.violations])
    if not result.allowed:
        print("Stop here; do not call the model or tool.")
finally:
    client.close()
npm install @nyraxis/sdk@1.2.9
import { NyraxisClient } from "@nyraxis/sdk";

if (!process.env.NYRAXIS_API_KEY || !process.env.NYRAXIS_BASE_URL) {
  throw new Error("Set NYRAXIS_API_KEY and NYRAXIS_BASE_URL");
}
const client = new NyraxisClient({
  apiKey: process.env.NYRAXIS_API_KEY,
  baseUrl: process.env.NYRAXIS_BASE_URL,
  timeout: 30_000,
});
const result = await client.evaluate({
  input: "Demo-only internal password is DEMO-ONLY-NEVER-USE.",
  agent_name: "quickstart-support",
});
if (result.evaluation_status !== "complete" || result.errors.length > 0 || result.policies_evaluated < 1) {
  throw new Error("A required policy check did not complete");
}
console.log("Allowed:", result.allowed);
console.log("Detected policies:", result.violations.map(v => v.policy_type));
if (!result.allowed) {
  console.log("Stop here; do not call the model or tool.");
}

With an applicable blocking Secrets detection policy, expect a secrets_detection finding and Allowed: false. This deterministic example does not require a model download. If a detector cannot finish, inspect its status; a blocking decision can also mean a required check was unavailable. A request to reveal a password without a password value is not a reliable secrets test. PII and other model-backed checks need their configured models and separate acceptance tests.

3. Inspect and repeat

Open Dashboard → Traces and locate the evaluation. Inspect the agent, policy, findings, and timing. Change the input to "What are your support hours?" and evaluate again. The outcome depends on all applicable policies.

Evaluation sends text to the configured Nyraxis API. Storage and export settings are separate. Metadata-only records do not retain prompts for replay; resubmit the synthetic input when retesting. Confirm the capture settings of your deployed version before sending real workload content.

4. Add enforcement deliberately

For supported Python methods, the SDK can check input before the model request. Configure failure behavior explicitly:

import os
import nyraxis_sdk

nyraxis_sdk.init(
    api_key=os.environ["NYRAXIS_API_KEY"],
    base_url=os.environ["NYRAXIS_BASE_URL"],
    agent_name="quickstart-support",
    enforce=True,
    enforce_fail_open=False,
    enforce_require_complete=True,
    enforce_cache_ttl_s=0,
)

Interception covers specific methods, not every possible call in your application. Streaming input can be checked before a supported call begins; emitted output tokens are not blocked by that input check. System prompts, images, audio, and arbitrary tool execution need separate coverage. With fail-closed configuration, transport errors prevent the request and should be handled by your application. Automatic enforcement uses no_trace=true; enable and verify instrumentation separately when you need traces of model calls.

Next steps

On this page