Live data for agents

How agents should work with user-approved data connections.

2 min read

Agents can help create Pages that stay current from user-approved data sources.

Agent responsibilities

  1. Ask the user which data source should drive the Page.
  2. Guide the user through connection or resource selection when human approval is required.
  3. Read the safe resource locator, current configuration, columns and samples.
  4. Save a FetchSpec and retain its revision_id. Changed remote specs queue one refresh by default; identical retries reuse the revision.
  5. Wait for get_connection_schema with expected_revision_id to report ready:true, then preview that same revision. connected:true alone is not proof of readiness.
  6. Publish the complete Page with the same markers, using a fresh matching base_version_id.

Tool sequence

StepToolPurpose
1list_connectionsFind the organization's existing data sources.
2get_connection_schemaInspect tables, columns, and sample rows. Until a person finishes connecting the source, it returns connected:false with a handoff_url to give them.
3configure_connection_dataDefine what data should be pulled and shaped.
4preview_connection_renderCheck the Page markup against real data before publishing.
5update_pagePublish the Page with the same binding markers that passed preview.

Agents cannot create a Connection. When the user needs a new data source, ask them to add it in the app under Settings → Connections, then continue with list_connections.

Supported user sources

SecondPage recognizes seven source types: google_sheets, csv, ga4 (Google Analytics), stripe, airtable, notion, and http_api. A recognized type does not mean it is live for every organization.

By default, only CSV upload is fully available. Google Sheets needs Google sign-in configured before it can be used. The rest (GA4, Stripe, Airtable, Notion, HTTP API) show as "coming soon" in the Connections UI. Treat a source type as coming soon unless it is explicitly available in the user's organization.

CSV is upload-driven: after changing its spec, use the returned human handoff to upload fresh CSV to that Connection. The server applies the active transforms once to those rows. For remote sources, trigger_sync:false defers refresh; explicit true requests one subject to debounce and plan limits. Respect retry_after_seconds. Unknown, pending and superseded revisions are not ready to preview.

Safety rules

  • Do not ask the user to paste credentials into chat.
  • Do not claim a Page is live-data-backed until preview and publish both succeed.
  • Keep the Page useful even if the source pauses or needs attention.

Still have a question?

Ask in your own words, or write to us at support@secondpage.cc.

Email us