Developers · SDK · Developer preview

SDK integration, in developer preview.

One local API. Two SDKs. Nothing published yet.

The Adil Edge SDK is being developed as a local gateway and two client libraries, for Python and TypeScript. This page documents the design so that teams can plan integrations. The SDK is not published, and the code on this page illustrates the API in development; names and details may change.

Developer preview · not published

Status

What exists, and what does not.

  • A local HTTP gateway that supervises a local inference runtime and listens only on 127.0.0.1 by default
  • A Python SDK for Python 3.9 or later, with synchronous and asynchronous clients, and a TypeScript SDK targeting Node.js 18 or later, both without runtime dependencies
  • Chat, streaming, cancellation and JSON output worked in SDK qualification on development builds
  • Tool calling through the SDK is under repair and qualification and is not available
  • Not published: no public package, registry entry or installer
  • Tested only on macOS on Apple silicon; Linux and Windows are untested

Installation

Installation: not yet.

Not yet available

There is no public installation path. The packages are marked so that public package registries refuse them, and their names are provisional. When a release is approved, installation instructions will be published here together with the licence terms.

Architecture

How a request flows.

  1. ApplicationYour code
  2. SDKPython or TypeScript
  3. Local gatewayHTTP on 127.0.0.1
  4. Local runtimePrivate local socket

Your application calls the SDK. The SDK sends HTTP requests to the local gateway on 127.0.0.1. The gateway checks and validates each request, then passes it to a local inference runtime over a private local socket. The runtime has no network listener, and nothing is sent to a cloud service.

API

A small, versioned local API.

The gateway exposes four routes: a health check, a readiness check, a model description and chat completions. Requests and responses follow a subset of a widely used chat-completions format, so familiar client patterns carry over. Unknown or internal parameters are rejected rather than ignored.

GET /health
Whether the gateway process is running.
GET /ready
Whether the model has loaded.
GET /v1/models
The served model, its capabilities with their qualification status, and its limits.
POST /v1/chat/completions
Chat completion, streamed or not, with optional JSON output.

Requests carry an API version header (version 1). The contract is in development and may change before any release.

Examples

Illustrative code.

These examples show the shape of the API in development. They are not installation instructions, and they will not run without the unpublished preview packages, a local runtime and a model file.

from adil_edge_sdk import AdilEdge   # provisional, unpublished package

with AdilEdge() as client:            # local gateway on 127.0.0.1 by default
    client.wait_until_ready()
    r = client.generate("Rewrite politely: send me the report now", max_tokens=80)
    print(r.text, r.finish_reason)
Python: generate text. Illustrative only: the API in development, not an installation step. Names may change.
with client.chat_stream("Write a haiku about rivers.") as stream:
    for piece in stream.text_stream():
        print(piece, end="", flush=True)
# Leaving the block early or calling stream.cancel() closes the connection;
# the gateway then stops generation.
Python: stream and cancel. Illustrative only: the API in development, not an installation step. Names may change.
schema = {"type": "object",
          "properties": {"name": {"type": "string"}, "age": {"type": "integer"}},
          "required": ["name", "age"], "additionalProperties": False}
res = client.generate_json("Extract: 'Ada Lovelace was 36.'", schema, max_tokens=100)
res.value   # validated against the schema in the SDK, or OutputValidationError
Python: JSON output checked against a schema. Illustrative only: the API in development, not an installation step. Names may change.
import { AdilEdge } from "@thynkr/adil-edge-sdk";   // provisional, unpublished

const client = new AdilEdge();          // local gateway on 127.0.0.1 by default
const r = await client.generate("Rewrite politely: send me the report now");
console.log(r.text);
TypeScript (Node.js): generate text. Illustrative only: the API in development, not an installation step. Names may change.

Tool-calling code is on the tools and agents page; tool calling is not yet available.

Errors

Errors you can plan for.

  • Every error has a stable code, such as busy, model_not_ready, context_length_exceeded or capability_unavailable
  • Both SDKs map the codes to the same exception classes
  • Retries are limited to a busy or loading runtime and refused connections, never after a stream has started
  • Cancelling a request closes the connection, and the gateway stops generation

Offline and privacy

Local by default.

  • No telemetry in the gateway or the SDKs
  • The gateway logs request metadata only, never prompt or output text
  • Browser pages cannot call the gateway unless their origin is explicitly allow-listed
  • Remote access is off by default and requires a bearer token
  • The model file can be checked against an expected SHA-256 digest at startup

Known limitations

Known limitations.

  • Repeated requests with fixed settings can produce different output; determinism is not guaranteed
  • One request is generated at a time; others wait in a short queue
  • Forcing a specific named tool is not supported, and Adil Eco V1.1 will not support tool_choice set to required
  • No embeddings, images or audio
  • The local gateway needs Python next to the runtime