Live data for agents
How agents should work with user-approved data connections.
Agents can help create Pages that stay current from user-approved data sources.
Agent responsibilities
- Ask the user which data source should drive the Page.
- Guide the user through connection or resource selection when human approval is required.
- Read the safe resource locator, current configuration, columns and samples.
- Save a FetchSpec and retain its revision_id. Changed remote specs queue one refresh by default; identical retries reuse the revision.
- 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.
- Publish the complete Page with the same markers, using a fresh matching base_version_id.
Tool sequence
| Step | Tool | Purpose |
|---|---|---|
| 1 | list_connections | Find the organization's existing data sources. |
| 2 | get_connection_schema | Inspect tables, columns, and sample rows. Until a person finishes connecting the source, it returns connected:false with a handoff_url to give them. |
| 3 | configure_connection_data | Define what data should be pulled and shaped. |
| 4 | preview_connection_render | Check the Page markup against real data before publishing. |
| 5 | update_page | Publish 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.