---
title: "Synced Data or Live API Calls: How an AI Agent Uses Both"
slug: ai-agent-synced-data-vs-live-proxy-api-calls
date: 2026-12-03
author: The Truto Team
categories: ["AI & Agents", Engineering]
excerpt: "When an agent should read a synced copy in your own store, when it should call the customer's app live, and how one connected account feeds both."
tldr: "Let the agent search, rank and summarize from a synced copy in your own Postgres, Pinecone or Qdrant. Send fresh reads and every write to the app live, through the Proxy API or an MCP server for that one customer account. On Truto, the same connected account feeds both paths."
canonical: https://truto.one/blog/ai-agent-synced-data-vs-live-proxy-api-calls/
agent:
  instructions: "Use this search API to find relevant content across this site with keywords or natural-language queries, instead of crawling individual pages. Results are returned in Markdown."
  endpoint: "https://truto.one/.well-known/search?q={query}"
  method: "GET"
  documentation: "https://developers.cloudflare.com/ai-search/how-to/search-for-agents/"
---

# Synced Data or Live API Calls: How an AI Agent Uses Both


An AI agent in a B2B product works with each customer's own apps: their CRM, help desk, files and HR system. Some questions need many records at once: "which accounts mention a renewal risk this quarter?" Others need one record, as it is right now: "what is the status of ticket 4812?" And some tasks write back: "close the ticket and log a note."

No single path fits all three, but one connected account on Truto can feed every path.

## Two paths from one connected account

Your customer connects an app once. Truto keeps the credentials and refreshes the tokens. From that one connected account:

- **The synced path.** A sync job reads the account on a schedule and writes the records into your own Postgres, BigQuery, Snowflake, Pinecone, Qdrant or bucket ([Datastores docs](https://truto.one/docs/guides/datastores/overview)). The agent queries that store.
- **The live path.** The agent calls the app through the [Proxy API](https://truto.one/proxy-api/), or through an [MCP server](https://truto.one/mcp/) that Truto creates for that one account ([MCP servers docs](https://truto.one/docs/guides/integrated-accounts/mcp-servers)).

The setup of the synced path is in [How to sync your customers' SaaS data into your own database, warehouse or bucket](https://truto.one/blog/sync-customer-saas-data-to-your-own-database-warehouse-or-bucket/).

## Which path for which task

| Task | Path | Why |
|---|---|---|
| Semantic search, RAG | Synced | Needs embeddings over many records |
| Questions across many records | Synced | One query, not hundreds of API pages |
| Reports and trends | Synced | History the app's API may not keep |
| Current status of one record | Live | Must be correct right now |
| Create, update, delete | Live | Writes go to the app |
| Data the sync does not cover | Live | Any method on the integration |

Truto's docs make the same split for unified calls. A live call costs about the app's own latency plus a few tens of milliseconds. That suits request-time reads, and it is the wrong shape for jobs over millions of records ([realtime data model](https://truto.one/docs/guides/how-truto-works/realtime-unified-apis-considerations)).

## The synced path for an agent

For retrieval, write the records into a store the agent can search:

- **Pinecone.** `upsertDocuments` writes documents, with an optional `namespace` per customer ([method inputs](https://truto.one/docs/guides/datastores/overview#3-write-sync-job-output-to-it)). See [Pinecone: upserts and namespaces for RAG](https://truto.one/blog/sync-saas-data-to-pinecone-for-rag-upserts-namespaces/).
- **Qdrant.** `upsertPoints` writes points with their payload.
- **Postgres with pgvector.** `upsertRows` keeps one row per record. See [Postgres, Neon and Supabase](https://truto.one/blog/sync-saas-data-to-postgres-upserts-pgvector-neon-supabase/).

A JSONata transform shapes each record before the write. Keep the text the agent needs, the record's id in the app, the account id and the last-modified time.

Keep the copy current:

- **Schedules.** A schedule runs the job at most every five minutes ([Schedules](https://truto.one/docs/guides/sync-jobs/overview#schedules)).
- **Incremental state.** `get_state` and `update_state` keep a watermark, so each run fetches only what changed ([V4 sync job reference](https://truto.one/docs/guides/sync-jobs/v4-reference)).
- **Webhook-driven runs.** A [workflow](https://truto.one/docs/guides/workflows/overview) can start a run when a batch of the app's webhook events arrives for the account.

## The live path for an agent

The Proxy API calls the app's own API through Truto. Truto picks the account's credentials, refreshes OAuth tokens and turns the app's pagination into one `next_cursor` ([Proxy API](https://truto.one/proxy-api/)).

For an agent, the MCP server is the simpler form. `POST /integrated-account/:id/mcp` creates a server for one account. Its tools are the Proxy API methods that have a description. You can limit them by method, such as `read` only, or by tag, and give the server an expiry ([MCP servers docs](https://truto.one/docs/guides/integrated-accounts/mcp-servers)).

Rate limits stay visible. On a live call, Truto passes a `429` back with the rate-limit headers, and `Retry-After` when the app sends one. Your agent's code decides when to retry.

## Use both in one answer

A common pattern for a support agent:

1. **Search the synced copy.** Find the 5 past tickets most like the new one, from Pinecone or pgvector.
2. **Check live.** Fetch the current state of the new ticket through the MCP server, so the agent does not act on a stale status.
3. **Write live.** Post the reply or update the ticket through the same MCP server, with the customer's own permissions in the app.

Step 1 uses your store. Steps 2 and 3 use the app. The record ids in your store match the ids the live calls return, because both come from the same connected account.

## Keep customers apart in both paths

An agent must never mix up two customers' data. Keep them apart on both paths:

- **In your store.** Use one path, tenant column or namespace per connected account. Filter every query by it.
- **In live calls.** Give the agent the MCP server of one account. The server sees that account only.

For where the synced copy lives and what Truto keeps, read [Keep your customers' SaaS data in your own storage](https://truto.one/blog/keep-customer-saas-data-in-your-own-storage-residency-retention/).

## Pricing

Live calls and MCP tool calls are API calls at $5 per 100,000, from the first call. Connections are free. Calls on Truto's managed Google and QuickBooks apps are priced separately. Datastores for the synced path are part of the Pro add-on, at $499 a month, with a 30-day trial on the Free plan ([pricing](https://truto.one/pricing/)).
