Agsemble
Docs/Build

Build

Offline field observations

Persist scouting notes locally and synchronize them without duplicate records.

Create once, retry safely

const observation = {
  id: crypto.randomUUID().replace(/^/, "obs_"),
  field_id: fieldId,
  type: "scouting_note",
  note: "Leaf curl near the eastern edge.",
  captured_at: new Date().toISOString(),
};

await saveLocally(observation);
await agsemble.observations.create(observation, {
  idempotencyKey: observation.id,
});

Page through history

Observation history uses deterministic keyset pagination. Continue with next_cursor while has_more is true.

let page = await agsemble.observations.list(fieldId, { limit: 100 });
while (page.has_more && page.next_cursor) {
  page = await agsemble.observations.list(fieldId, {
    limit: 100,
    startingAfter: page.next_cursor,
  });
}