Browse the documentation

AEL 1.0.0

Models and providers

A built-in client for OpenAI-compatible APIs, including realtime sessions, comes with AEL, the Agent Engineering Language, with explicit or default parameters and no server or SDK to add. You choose local or cloud models: local model servers, optional packages for major cloud providers, and clients for inference endpoints you run yourself.

Model bindings

A node never names an endpoint, a model or a credential directly. It names a model binding:

# nodes/summarize.node.ael
node summarize(input: Request) -> Summary {
    config {
        prompt: file("prompts/summarize.md");
        model: binding("primary_model");
    }
    return write_summary(input);
}

Configuration or the deployment says what primary_model means:

  • the kind of API and the endpoint's address;
  • the model;
  • a reference to the credentials, never the credentials themselves;
  • default parameters, the parameters a call may set, and a timeout.

Each ordinary setting of a binding follows the configuration layers, taken from the first of these that sets it: an authorized override for one run, the deployment's binding, a named environment variable or file, a shared configuration, then the default you declare. Credentials stay references: your source names a reference, AEL never writes the credential into compiled files or logs, and it never takes it as a command-line argument.

ael config explain shows where each value comes from. A missing binding, an invalid endpoint or missing credentials fail the run with a model configuration error before any model call.

A model binding is not one of the entries of a component's bindings { … } record, which name the packages that hold its memory, skills, knowledge, storage and databases; Bindings and model bindings tells the two apart.

Local and cloud models

Where the model runsHow you connect
A local model server on your machine or networkThe built-in client, pointed at the server's address, or an optional client package for that kind of server.
A major cloud providerThe built-in client, or an optional package for that provider's own sign-in and request format.
An inference endpoint you run yourselfThe built-in client, an optional client package for that kind of server, or a connector you write in AEL.

A program that calls a model only uses an outbound connection: it needs no server of its own. Connections need authenticated TLS, except to a local model server you explicitly allow.

What an endpoint can do

Endpoints differ, even when they accept the same kind of API. A binding records what its endpoint and model can do: which kinds of input and output they take, whether they return structured output, call tools or stream, and which parameters they accept. AEL checks each call against that record:

  • A parameter the endpoint does not accept is an error, never silently dropped.
  • A kind of input the model cannot take, such as audio, is an error before the call.
  • An address that claims compatibility is not taken as proof of every feature.

Explicit or default parameters

  • Explicit: each call sets parameters from the list the binding allows.
  • Default: calls set none, and the deployment's or provider's defaults apply.

Either way, your output limits and budget still apply. Leaving parameters out never removes a limit, and a default that the provider does not report is recorded as unknown rather than guessed.

Realtime sessions

A realtime session is a longer exchange of events with a model, such as a spoken conversation. It has its own limits on duration, event size, buffered data and tokens, and you can interrupt or cancel it. The session's lifetime and each operation's budget are separate: a long session never extends the budget of the work inside it.

Model policies

A model-driven node chooses how it uses models:

PolicyWhat it does
Exactly one callOne model call in total: no retry, no repair and no tool step that needs a second call.
Bounded loopCall the same model repeatedly, for tool steps for example, up to a limit you set.
RoutingChoose a model with your own typed rules, or with a router model whose call is counted too.
Ordered fallbackTry a finite list of models in order when a call fails in a way you allow.
Parallel fan-outCall several models at once and combine their answers with a join rule you choose: all, any or quorum, cancelling the losing calls.
Independent verifierAsk a second model to accept, reject or stay uncertain about a result.
  • Every call of every policy draws on the run's one budget: router calls, fallbacks, parallel branches, repairs and verifier calls alike.
  • A verifier gives an opinion, not proof. Type checks and permission checks still apply whatever it says.

Failures and usage

  • A refusal, an incomplete answer, a provider error and a cancellation are each a distinct outcome.
  • An incomplete or cut-off answer never becomes a typed success.
  • Input and output tokens are counted for every call, including retries, and matched with what the provider reports. Usage a provider does not report is marked unknown, never counted as zero. See Reporting, logs and replay.

Testing without a live model

Your tests and evaluations can use scripted or recorded model responses instead of a live endpoint, so they run without credentials or network access. See Evaluations and prompt releases.