Skip to content
EximAgent Docs

Bulk input and streaming

Process a list in one call with NDJSON input, and block on the stream until the terminal event before reading rows.

Bulk input

Any list of entities — companies, URLs, names, HS queries — goes through --inputs in a single call. One NDJSON entity per line:

{"url": "https://example-imports.de"}
{"url": "https://another-importer.fr"}
{"url": "https://third-buyer.nl"}
eximagent enrich company --inputs companies.ndjson

The server processes the batch with bounded concurrency and returns one streamed NDJSON document covering all of it.

Reading from stdin works too:

jq -c '{url: .website}' shortlist.json | eximagent enrich company --inputs -

Streaming

Long-running commands — buyer discovery in particular — are asynchronous. The kickoff response returns a runId; the results arrive on a stream.

eximagent search run --product "roasted coffee" --location DE --confirmed
# → { "runId": "run_…" }

eximagent stream --run-id run_…

Block until the terminal complete event. Rows read before it are a partial set that gives no indication it is partial.

Paging

analytics query and analytics sql page the full result set. Each full page returns a nextActions entry containing the next-page command, cursor included. Follow it until the response comes back empty.

For anything large, skip paging by hand and export straight to disk:

eximagent analytics query \
  --groupBy importer --measures shipments \
  --out buyers.ndjson --format ndjson

Then analyse the file programmatically and read back only your aggregates.