EGGai SDK Documentation

Four SDKs, one behaviour model.

EGGai ships as libraries you call from your own systems — pip install eggai or npm install eggai. Each SDK points the same behaviour model — EGGai‑v1, a Large Behavior Model grounded in the real till history of a major SEA grocery retailer — at a different commercial decision, and each has a published study behind it.

The model answers as one named shopper, not as a segment. Hand it a customer profile and it thinks as that person, in the first person, then decides as them — and every reply can be scored against what that shopper really did next.

The four SDKs

SDKThe question it answersYou provideRuns as
Offer Optimization What is the least this customer would accept? Customer profiles and the offer on the tableJob, per-row ladder
Lead Generation Which of these people is worth the call? The list you want ranked, one profile per contactJob, one judgement per contact
Survey Response preview What would a panel of your customers say? Questions — the panel is drawn for you, or bring your ownJob, one twin per respondent
Assortment Optimization Who follows the shelf, and who walks? A customer panel and the shelf changeJob, plus a sampled sync preview

Which SDK do I want?

One client, both languages

from eggai import EggAI

client = EggAI()               # reads EGGAI_API_KEY

client.offers.cheapest_accepted(...)   # the cheapest yes
client.leads.rank(...)                 # the list, back in order
client.surveys.ask(...)                # a spread, not one answer
client.assortment.impact(...)          # who follows the shelf

Both packages are thin, zero-dependency clients over the same REST API at https://api.eggai.tech — all inference runs on EGGai's servers. Anything the SDKs do, you can do with plain HTTP: see the API reference.

Documentation map

Getting started
Install, authenticate, and a first answer from a customer's twin in five minutes.
Concepts
The behaviour model, the proposer, the judge, jobs and keys — the mental model behind every SDK.
Jobs & streaming
Every batch call is a job — waiting, streaming live events, paging results, stopping.
API reference
Every client, method and result object — and the REST endpoints underneath them.

The evidence

Three of the four SDKs rest on a fielded study, written up in full on the research pages — the data, the split, the scoring and the result, including where a purpose-built system beats us. Headline figures used throughout these docs: