NoA Python SDK API Reference
This document provides comprehensive technical details for classes, async context operations, parameter syntax matrices, and Server-Sent Event (SSE) response token objects mapped directly into the krysta runtime engine.
The Noa Client Manager
The primary orchestration proxy used to initialize network pipes and manage execution state boundaries across remote hypervisor clusters.
Specifies the explicit system endpoint path of your custom infrastructure deployment. If left blank or omitted, the SDK defaults routing maps automatically back to the hosted Krysta live secure cloud server.
Asynchronous Context Interfaces
The core engine fully implements the native asynchronous context manager specification (__aenter__ / __aexit__). This forces explicit stream safety, teardown automation, and isolates memory allocations dynamically.
async with Noa() as client:
# Sandboxed MicroVM worker scopes are pinned here
pass
# Engine channels and sockets are automatically reaped here
Method: execute()
Spawns an isolated evaluation container context on the host network, feeding uncompiled raw source scripts directly into the runtime hypervisor loop.
language: str,
code: str,
timeout_ms: int = 5000
) -> AsyncIterator[dict]:
Target language compiler image execution runner. Supported parameters: "python", "javascript".
The raw text block payload containing the script source text to compile inside the micro-sandbox pool environment.
Strict timing envelope restriction window before a thread hardware interrupts (SIGKILL) the worker. Max threshold limit fallback parameters default to 5000ms.
Stream Event Payload Blueprint
Returns an AsyncIterator[dict]. Workload events stream frame-by-frame over an async loop mapping output dictionaries directly back to client processes.
"type": "system" | "stdout" | "stderr" | "rules" | "done" | "error",
"text": "string" | null,
"timestamp": integer
}
Event Type Breakdown
Emitted immediately when cloud proxies begin allocating compute memory boundaries or initializing loop tasks.
Text Example: "EXECUTION_STARTED"
Emitted instantly when uncompiled running instructions write characters directly to the standard terminal output buffers.
Text Content: Plaintext string capturing the output buffer data chunk maps.
Emitted instantly when runtime parsing failures, edge memory exceptions, or tracebacks halt code compilation mid-loop.
Text Content: Multiline system trace details and runtime standard logging dumps.
Emitted at execution teardown cycles. Evaluates validation schemas across rule layers before confirming memory resets.
"[{\"rule\": \"ExitCodeZeroRule\", \"result\": \"PASS\" | \"FAIL\", \"reason\": \"...\"}, ...]"Signals that the script loop execution timeline completed its operation cleanly and severed the proxy connections successfully.
Text Content: null
Emitted if internal gateway disruptions, cluster routing network drops, or execution sandboxing errors knock threads down.
Text Content: "Job failed during execution"