Use approved connections
Use connections available to the user or service account making the request. Source credentials stay in the runtime, outside model context.
Credentials resolved here · never passed to the model
Use the Python SDK or REST API to query approved enterprise systems from your agents and applications. Keep source credentials, access enforcement, and activity records in one runtime.
Your application calls MarcoPolo to access enterprise systems. The runtime connects to the data, enforces task-specific policies within the caller’s permissions, and records activity.
Use connections available to the user or service account making the request. Source credentials stay in the runtime, outside model context.
Credentials resolved here · never passed to the model
Act for a specific user or a service account. Task policies narrow what the agent can read or do within that identity’s existing permissions.
# Requests carry the user and the agent identity.$ mp = MarcoPolo(agent="svc:agent-42", on_behalf_of="amina@acme")$ mp.query("salesforce", "accounts", fields=["name", "arr"])✓ 12 rows · within amina@acme's permissions$ mp.update("payments.vendor", ...)✗ denied · agent policy is read only▍
Trace what was accessed, for which task, and under whose authority. Review SDK, API, and MCP activity with connections, actions, and outcomes in one place.
Recorded alongside MCP activity, in one history
Use the Python SDK for typed application calls, or the REST API for direct HTTP integration. Both use the same connection permissions and runtime.
Use a personal token for your own work, a service account when callers may share its approved access, or per-user tokens when permissions and audit must remain separate. Keep application credentials on your backend.
List the connections available to that identity and inspect the source’s query guide. Send a query through the SDK; the runtime uses protected source credentials and applies configured access restrictions.
Check the operation’s status before using its result. Results remain server-side by default; request a bounded set of rows when needed. Use the activity record to investigate the source operation.
import asyncio
import os
from marcopolo import Marcopolo
async def main():
token = os.environ["MARCOPOLO_API_TOKEN"]
async with Marcopolo(access_token=token) as client:
operation = await client.operations.query(
"warehouse",
source={
"kind": "query_text",
"text": "SELECT 1 AS connected",
},
inline=True,
)
print(operation.status)
if operation.status == "succeeded":
print(operation.result.records.rows)
asyncio.run(main())Requires an API token and an approved SQL connection named warehouse. This checks connectivity; it does not configure a task policy. The Python SDK is in preview, requires Python 3.11+, and API tokens are available to Enterprise organizations.

Set up the SDK, choose the right application identity, and make your first request against an approved connection.
