AGRO-AI AGRO-AIPlatform API Guide
Official practical guide

AGRO-AI Platform API

A product-grounded guide for engineering teams integrating agricultural data, recommendations, reporting and operational intelligence into their own software.

Private beta Versioned /v1 contract Test and live separated
Current state matters.

The repository contains a tested public TEST self-service path, but production public activation is protected by separate legal and operational gates. This guide therefore follows the current private-beta contract and does not imply that public self-service, LIVE projects, production webhooks, provider writes, billing or physical execution are active for every organization.

What the Platform API is

The Platform API is a separate developer product from the Enterprise Portal. It exposes a curated, organization-scoped REST surface for agricultural product teams that want to work with AGRO-AI resources from their own backend.

The current public contract centers on:

Base path:

https://api.agroai-pilot.com/v1/platform

Understand the current product state

Platform API capabilities are deliberately separated so one product flag cannot silently activate unrelated production behavior. The important boundaries are:

CapabilityMeaningCurrent safety model
TEST projectDeterministic synthetic environment for development.Safe for integration work; no customer provider credentials or physical execution.
LIVE projectProduction data/environment access.Separately gated; requires approval, eligible commercial state and readiness.
Provider accessConnection to a specific external agricultural provider.Separately enrolled and capability-scoped.
Webhook deliveryOutbound event delivery to your endpoint.Infrastructure exists, but production delivery has its own activation gate.
Physical actionsWrites or actuation against field equipment.Not part of the ordinary beta contract; physical irrigation writes remain disabled unless a separately approved capability exists.

A TEST project is structurally a TEST project. It is not promoted in place into a LIVE project. LIVE access uses a separate reviewed path.

Quickstart

For an organization already provisioned for the Platform API, the shortest reliable path is:

  1. Sign in to the Developer Console. Use platform.agroai-pilot.com with the AGRO-AI account associated with the approved organization.
  2. Create a TEST project. TEST projects use deterministic synthetic data and are intentionally isolated from LIVE access.
  3. Create a service account. Give the machine identity only the scopes and optional resource/provider restrictions it needs.
  4. Create a TEST key. Plaintext API keys are shown once. Store the value in your server-side secret manager immediately.
  5. Make an authenticated request. Start with an identity or read route before building writes.
curl https://api.agroai-pilot.com/v1/platform/me \
  -H "Authorization: Bearer $AGROAI_API_KEY" \
  -H "X-Request-Id: quickstart-001"

Then list a safe resource such as fields:

curl https://api.agroai-pilot.com/v1/platform/fields \
  -H "Authorization: Bearer $AGROAI_API_KEY"
Keep API keys out of browser JavaScript.

The authenticated Platform console can use browser-session-mediated TEST tooling, but permanent machine API keys belong in a server-side secret store, not a browser bundle, localStorage or a public environment variable.

Authentication, service accounts and scopes

Platform API machine access uses Bearer API keys associated with service accounts. Portal browser sessions/JWTs are not interchangeable with Platform API keys.

Common scope examples in the current contract include fields:read, fields:write, sources:read, observations:write, recommendations:write, reports:read, webhooks:write and usage:read.

Key handling checklist

Projects and environments

Projects are organization-scoped and explicitly typed as TEST or LIVE. Environment separation is a security and commercial boundary, not a label you should infer from the hostname alone.

TEST

TEST is for integration development. The deterministic sandbox can include synthetic organizations, farms, fields, zones, crops, seasons, irrigation systems, observations, anomalies, recommendations, reports, jobs and webhook events. It does not contain customer provider credentials, real charges or physical execution.

LIVE

LIVE requires a separate live-access decision, an eligible plan or contract and production-readiness review. Provider access can have additional enrollment requirements. Do not write code that assumes a TEST project will later receive LIVE privileges.

Resource model

ResourcePurposeTypical flow
providersDiscover provider capability/readiness and manage approved synchronization.Check catalog → enroll/connect → sync → inspect job/state.
fieldsRepresent agricultural fields and safe metadata/boundaries.Create/read/list/update metadata/archive.
sourcesRegister the systems/files that feed agricultural context.Register source → upload/ingest → associate provenance.
observationsIngest or query field/operational observations.Write batch → job processing → query by field/type/time.
recommendationsRequest advisory model-backed recommendations.POST request → poll job → retrieve recommendation/evidence.
reportsGenerate report artifacts from authorized context.POST report → poll job → authorized download route.
jobsTrack asynchronous work.Store job ID → poll boundedly → handle terminal state.
usageRead metered use/credits where entitled.Review usage → enforce your own internal budgets if needed.
request-logsSafe request history for debugging/operations.Correlate with server request IDs without exposing secrets.

Fields and sources

Fields can be created and safely updated within project scope. The current contract supports field boundaries as GeoJSON Polygon or MultiPolygon values.

curl -X POST https://api.agroai-pilot.com/v1/platform/fields \
  -H "Authorization: Bearer $AGROAI_API_KEY" \
  -H "Idempotency-Key: field-create-001" \
  -H "Content-Type: application/json" \
  -d '{"name":"North Block","crop":"almond","area_hectares":24.6}'

Sources describe where data comes from. Direct upload flows use project/organization namespaces and can require expected checksums so the backend can verify that the stored object matches what the client intended to send.

Observations

Observations are queryable by field, type and time range. The contract is designed to preserve provenance and quality flags so downstream applications can distinguish the source and quality of operational context.

For batch ingestion:

  1. validate the payload before sending;
  2. use one logical idempotency key for the logical write;
  3. store the returned job/request identifiers;
  4. wait for the asynchronous result instead of assuming the POST means processing is complete;
  5. query the resulting observations and inspect provenance/quality.

Recommendations

Recommendation computation is asynchronous. The intended pattern is:

1Request
2Job
3Retrieve
4Review evidence

Recommendations are advisory. Design your product so a recommendation can be reviewed with its evidence and provenance rather than silently converting a model result into a physical action.

Reports and jobs

Report generation is also asynchronous. Report metadata is designed not to expose raw object-storage paths; authorized content is returned through the product's download boundary.

Your application should treat jobs as first-class objects:

Providers and connector jobs

The provider catalog is designed to report truthful capability state instead of implying that every integration is production-ready. Synchronization can be restricted by key scope, organization enrollment, provider and resource policy.

Partner/provider integrations may require a separate technical and commercial review, credential-vault readiness and explicit sandbox/read/write/production status. Provider credentials must remain in the credential boundary and must not be embedded in application JSON or logs.

Provider availability is not inferred from a connector name.

Check the provider/catalog readiness returned for your organization and environment. Some provider adapters can exist in code while production activation is still contract- or credential-gated.

Idempotency

Logical writes accept or require an Idempotency-Key. Use a stable key for retries of the same logical operation and a new key for a genuinely new operation.

The server contract distinguishes between:

This prevents network retries from accidentally creating duplicate fields, observation batches or report/recommendation work.

Pagination and filtering

Collection routes use bounded limit values and opaque cursor tokens. A paginated response uses:

{
  "items": [...],
  "next_cursor": "...",
  "has_more": true
}

Do not construct cursors manually. Pass the returned next_cursor back to the API until has_more is false.

Errors and request IDs

Errors use a typed structure with fields such as code, type, message and request_id. Every response receives a server-generated X-Request-Id. Use that server value when contacting AGRO-AI Support.

StatusTypical meaningWhat to do
400 / 422Invalid request or schema.Fix payload/parameters; do not blind-retry.
401Invalid key or trusted-client-address denial.Check key, environment and CIDR/client context.
403Scope, provider, resource, enrollment or environment denial.Do not widen permissions in code; request the correct entitlement.
409Conflict or operation already in progress.Resolve idempotency/state conflict.
429Rate or credit limit.Honor reset/backoff and review usage.

Rate limits and API credits

Rate-limit responses expose RateLimit-Limit, RateLimit-Remaining and RateLimit-Reset. Build clients that can slow down before a hard limit becomes an outage.

The API also has a credit ledger model for metered operations. Platform API commercial plans are a separate billing boundary from Enterprise Portal plans. Do not assume buying one automatically changes the other.

Webhooks

The webhook contract supports versioned events with an event ID and timestamp, HMAC-SHA256 signatures, durable retry behavior, delivery history and redelivery controls. Production webhook delivery is separately gated, so your organization must actually have the capability enabled before depending on delivery.

AgroAI-Signature: t=<timestamp>,v1=<hex-hmac>
AgroAI-Event-Id: <event-id>
AgroAI-Event-Version: 2026-07-01

Receiver requirements:

Security checklist

Deterministic TEST sandbox

The TEST environment exists so a developer can build against stable agricultural objects without using customer data. It is intentionally resettable and deterministic.

Use TEST for:

Do not use TEST as evidence that a LIVE provider, production webhook or physical action is enabled.

SDKs and CLI

The repository contains Python and TypeScript SDK foundations with typed errors, request IDs, rate-limit state, safe retries, pagination, uploads, job polling, usage access and webhook verification. Public package-registry availability must not be assumed until the relevant namespace/release path is actually activated.

The repository also contains an AGRO-AI CLI and public installer paths designed for the protected public TEST self-service launch. Because that launch has separate production gates, use the installation path advertised by the live Platform API site rather than assuming every repository installer route is currently public.

Recommended integration patterns

Add AGRO-AI intelligence to an existing farm application

  1. Model or map your fields into the Platform field resource.
  2. Register the source(s) that provide operational context.
  3. Ingest observations with provenance.
  4. Request recommendations asynchronously.
  5. Show the recommendation with evidence/provenance in your own UI.
  6. Keep user approval/execution as a separate application decision.

Use AGRO-AI for reporting

  1. Keep the field/source/observation context current.
  2. Create a report request with an idempotency key.
  3. Poll the returned job.
  4. Retrieve the authorized report metadata/content only after completion.
  5. Store only the identifiers and artifacts your own retention policy requires.

Connect a provider or enterprise system

  1. Read provider readiness for the organization/environment.
  2. Confirm the required enrollment, scope and provider capability.
  3. Complete the approved credential/connection flow.
  4. Run synchronization through the durable job path.
  5. Observe job and request IDs; do not assume connection means a sync has completed.

Troubleshooting

401 after a key worked previously

Check whether the key was rotated, revoked or environment-mismatched. If the key uses CIDR restrictions, confirm the trusted client address reaching AGRO-AI still matches the allowed network.

403 on a valid key

A valid key can still lack the required scope, provider enrollment, resource permission or environment entitlement. Do not solve a 403 by blindly generating a broader key.

409 on a write

Review the idempotency key and current operation state. A reused key with changed payload is intentionally rejected.

429 responses

Honor the rate-limit reset/backoff information and inspect API credit usage. Retrying immediately in a tight loop makes the situation worse.

An asynchronous request never becomes successful

Inspect the job's terminal state and server request ID. Do not keep polling indefinitely after a terminal failure. Include those IDs in Support.

Frequently asked questions

Is the Platform API the same thing as the Enterprise Portal?

No. They share AGRO-AI account and platform foundations, but the Enterprise Portal is an agricultural operating application and the Platform API is a developer product for integrating AGRO-AI into your own backend/software.

Can I put an AGRO-AI API key in my web or mobile frontend?

No. Permanent machine API keys belong in server-side secret storage. Your frontend should call your own trusted backend, which then calls the Platform API.

Can a TEST project be converted into LIVE?

No. TEST and LIVE are structurally separate. LIVE uses a separate reviewed project/access path.

Does a provider appearing in the catalog mean it is production-ready for me?

No. Provider readiness, enrollment and environment capability are organization-specific. Read the actual provider state returned for your organization.

Does the API automatically actuate irrigation equipment?

No. Recommendations are advisory in the ordinary contract, and physical irrigation writes remain separately gated/disabled unless an explicit approved capability says otherwise.

Are webhooks always delivered in production?

No. The webhook infrastructure and contract exist, but production delivery has its own activation gate. Check your organization's capability before depending on it.

Why do I need Idempotency-Key?

Network retries happen. Idempotency lets you retry the same logical write without accidentally creating duplicate work.

What request ID should I send Support?

Use the server-generated X-Request-Id from the response. It is the safest correlation value for backend tracing.

Is Platform API billing included in our Enterprise Portal plan?

No assumption should be made. The products have separate commercial boundaries and the live account/catalog is authoritative.

Need the exact endpoint contract?

Use the canonical Platform API developer documentation and API reference for request/response schemas. This guide focuses on how to use the product correctly and safely.