Agent SDK · For developers

Build agents with governed data access.

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.

Governed data access runtime

Access controls that run with every request.

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 approved connections

Use connections available to the user or service account making the request. Source credentials stay in the runtime, outside model context.

secure connectivitylive
Caller · your code
svc:agent-42python sdkrest api
sdk · approved connections
MarcoPolo runtime

Credentials resolved here · never passed to the model

data stays in place
Salesforcesales_read
Snowflakeanalytics_ro
Postgresapp_read
Jiraissues_read

Carry the right authority

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.

runtime · python sdklive
# 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▍

Keep an access record

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.

auditabilitylive
agentsvc:agent-42on behalf ofamina@acmeconnectionsalesforceoperationqueryoutcomeallowed
sdk.requestsdk

Recorded alongside MCP activity, in one history

req#a91cactivity history · export
From application to runtime

Choose an identity. Make a request.

Use the Python SDK for typed application calls, or the REST API for direct HTTP integration. Both use the same connection permissions and runtime.

  1. Choose whose access applies

    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.

  2. Use an approved connection

    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.

  3. Handle the operation and its results

    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.

Python SDK example

Query an approved warehouse connection.

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.

Build on governed data access.

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