Developer documentation

SDK & local runtime

Assess messages locally with Python, Node or Dart. Your app decides what happens next.

This developer preview runs Gandalf on GPU or CPU with an exact email detector. It supports personal warnings and review; platform enforcement and blocking are outside this preview.

  1. Download or build the runtime
  2. Choose presets and custom policies
  3. Python quick start
  4. Node and TypeScript quick start
  5. Integrate the result
  6. Downloads

1. Download and set up the runtime

Download your installer. Open E2EM Setup, choose Set up E2EM and wait for Ready. Setup starts the runtime and enables startup at login. No account or GPU is required.

Setup downloads verified model assets. For no network activity, use an -offline- installer and select Offline installation. See the installation guide or custom model guide.

SDKs connect and register apps automatically. Give each application a distinct app name; these examples use my-app.

For a source build, clone the runtime repository and use Rust 1.95 or later:

cargo build --locked --release --bin e2emd
./target/release/e2emd --setup

On Windows, use .\target\release\e2emd.exe --setup. See the desktop guide for advanced setup.

2. Choose presets and custom policies

assess(message) selects all 40 presets. Add context for earlier messages or policies for a subset. Add custom rules with Python’s custom_policies or Node’s customPolicies; use policies=[] for custom-only assessment.

The simple API checks outgoing messages. Advanced policies support directions, revisions and thresholds. Revalidate policy references after reconnecting. Unavailable checks hold the message for review.

3. Python quick start

With Python 3.11+, install the release wheel in your virtual environment, replacing the path:

python3 -m pip install /path/to/downloaded.whl

Or install from a checkout:

python3 -m pip install ./sdk/python

After runtime setup, save this as assess.py and run python3 assess.py:

from e2em import assess, E2EMError

try:
    report = assess("Hello there!", app="my-app")
    print(report.scores, report.unevaluated)

    report = assess("My email is [email protected]", policies=["pii.email"])
    print(report.status, report.action)

    report = assess("That sounds good", context=["Shall we meet tomorrow?"])
    report = assess("The launch is next week",
                    custom_policies=["Keep launch dates private."])
except E2EMError as error:
    print(f"Message held: {error.code}. Edit or retry.")

The email example returns assessed warn. For persistent or async clients, see the Python guide. These examples assess messages; sending belongs to your app.

4. Node and TypeScript quick start

With Node 22+, install the release archive, replacing the path:

npm install /path/to/downloaded.tgz

Or install from a checkout:

npm install ./sdk/node

After runtime setup, save this as assess.mjs and run node assess.mjs. The package includes TypeScript declarations.

import {assess} from '@e2em/local';

try {
  let report = await assess('Hello there!', {app: 'my-app'});
  console.log(report.scores, report.unevaluated);

  report = await assess('My email is [email protected]', {policies: ['pii.email']});
  console.log(report.status, report.action);

  report = await assess('That sounds good', {context: ['Shall we meet tomorrow?']});
  report = await assess('The launch is next week', {
    customPolicies: ['Keep launch dates private.'],
  });
} catch (error) {
  console.log(`Message held: ${error.code ?? 'INTERNAL_ERROR'}. Edit or retry.`);
}

See the Node guide for persistent clients and cancellation. Browsers require an extension bridge.

5. Integrate the result

Assess before sending or displaying. After an edit, cancel the old request and reassess. Apply results only to the current message, context and policy.

ResultApplication behavior
allowProceed if complete and current.
warnShow an advisory warning; no confirmation required if complete and current.
review, error, cancellation or incomplete coverageHold for edit, retry or review.

Use Python’s applies_to or Node/Dart’s appliesTo to compare report.request with the current request at the send boundary. Your app owns the warning UI and sending; errors must hold the message.

OperationPythonNode / TypeScript
Connect an appawait Client.connect(app="my-app")await Client.connect({app: 'my-app'})
Inspect supportawait client.capabilities()await client.capabilities()
Validate a policyawait client.validate_policy(policy)await client.validatePolicy(policy)
Assessawait client.assess(message)await client.assess(message)
Cancel a requestawait client.cancel(request_id)await client.cancel(requestId)
Reject stale resultsresult.applies_to(current)result.appliesTo(current)
Closeasync with client or await client.close()client.close()

For provider selection and send guards, see the advanced integration guide. For embedded Rust/C/C++, see the FFI guide.

6. Downloads

Choose an installer from the latest release. SDK packages, checksums and platform reports are included. Packages are unsigned developer previews, available only from releases.

Your computerDownload from latest releaseSetup
Windows · Intel / AMD, 64-bitWindows installer (.msi)Windows guide
Mac · Apple SiliconApple Silicon installer (.pkg)Mac guide
Mac · IntelIntel Mac installer (.pkg)Mac guide
Linux · Ubuntu / Debian, 64-bitDebian / Ubuntu package (.deb)Linux guide
Linux · Fedora, 64-bitFedora package (.rpm)Linux guide

Complete E2EM Setup before using an SDK. For updates or uninstalling, see the upgrade and removal guide.

Dart 3.5+ and Flutter support desktop Linux, macOS and Windows. Use the release source or a path dependency on sdk/dart; see the Dart guide. Mobile and web are outside this preview.

Signing, macOS notarization and sandboxed apps remain pending. See packaging and security for details.