Build vs. buy · Agent integrations

Should you build or buy agent integrations?

Every customer brings their own credentials, scopes, and security reviews. This guide covers what running that layer takes, when building makes sense, and what to check before buying.

The three common approaches

Build

  • One customer, one credential set
  • A service account your reviewers accept
  • 1 to 3 connectors, one auth pattern each
  • Every 401, refresh, and rate limit yours to debug
  • Works while no security reviews are due
Vault, scope checks, retries, and audit, written and run in-house

Assemble open source

  • Nango or Keycloak under your own glue code
  • OAuth covered; API keys, JWT, and custom schemes yours
  • Scope checks, retries, and edge cases still yours
  • Self-hosted, no vendor in the request path
  • Patches, CVEs, and upgrades on your calendar
Nango Keycloak HashiCorp Vault Passport.js PostgreSQL
Nango, Keycloak, Vault, Passport, Postgres, your glue code on top

Buy

  • Credentials and scopes per customer
  • Writes that name a real person
  • OAuth, API keys, and MCP quirks handled per connector
  • 401s, refreshes, and re-auths normalized for your agent
  • Per-action audit logs, ready for questionnaires
Scalekit Composio Merge Arcade
Not all of them are built equal. Read how Scalekit compares
01The problem

Why this decision exists. Four problems show up in production.

Writing one connector is straightforward. Running connectors for every customer, across providers, under security review is the hard part.

01

Agents need to act as specific users

A shared service account writes as the bot everywhere: approvals keyed on user identity break, and attribution is gone. Reviewers expect delegated, per-user OAuth grants.

Identity
02

Scopes are enforced per tool call

Every tool call needs a scope check: this agent, on this connector, for this customer. That check belongs in the request path, not in an instruction in the prompt.

Scopes
03

Every connector authenticates its own way

OAuth 2.0, API keys, JWTs, service accounts: every connector picks its own. Then the provider quirks: 401s that mean three different things, refresh tokens some servers never issue, workspace identity in a token here and a claim there.

Connectors
04

Audit evidence gates the deal

Security reviews want per-action logs: who authorized, which agent, which tool, what came back, streamed to a SIEM. Without them, one overnight failure means grepping four log sources by hand.

Audit
02The decision

Eight criteria for the decision. Score the product you ship this year.

Answer for the product you are shipping this year rather than long-term plans. Selections stay in your browser.

Criterion BuildDependsBuy
0 of 8

Answer the eight criteria

Your result appears when all eight are answered. A low score points to building, and the result will say so.

03The build

The scope of building it yourself. Fourteen components across four areas.

Most of these fourteen are missing from the first version teams ship. They arrive later, one customer request at a time, which is why estimates understate the cost.

The same tool call, built versus bought Building puts a credential store, scope checks, retry and error handling, and an audit log between your agent and the provider, and you maintain all four. Buying replaces those four with one integration layer on the same path. IF YOU BUILD IF YOU BUY Your agent YOU BUILD AND MAINTAIN ALL FOUR Credential store Scope checks Retries and error mapping Audit log 500+ TOOLS Four components on your on-call rotation. Your agent AGENT INTEGRATIONS · VAULT · SCOPES · RETRIES · AUDIT 500+ TOOLS One component, one SLA, same request path. Your agent logic and tool definitions do not change.
ComponentWhy it existsIf you get it wrong
ACredentials and identity
Per-customer credential vaultEach customer's token isolated from every other customer'sCross-tenant access. A reportable incident
Credential boundary outside the agent runtimeA raw token in the execution loop reaches traces, logs, and model contextA live token in a log tool you do not control
Delegated OAuth per end userEvery downstream call attributes to the human who authorized itNo attribution, and a stalled enterprise review
Revocation propagationAn admin offboards someone and agent access dies with themA former employee's agent still writing to production
BExecution and reliability
Refresh handling mid-runLong agent tasks outlive the access tokenThe task dies partway through with writes already committed
Durable execution for long runsJob queues, polling, and state that outlive an LLM request timeoutA ten minute tool call dies at the timeout with writes half applied
Error normalization per connectorAPIs return 401 where 403 belongs, so the agent reads denial as an auth failure and retriesA silent retry loop. Rate limits burned, no signal
Zero-downtime JWKS rotationRotate keys without killing live sessionsA full agent outage during routine maintenance
CAuthorization
Scope enforcement before the API callA model will not reliably respect a scope described in a promptA write the agent was never granted
Permission intersection at call timeThe agent's scope and the user's own permissions both have to allow the action. Either one denying it is a denialAn admin invoking the agent silently widens what the agent can reach
DAudit, residency, and the spec
Per-action audit stream to a SIEMProcurement asks for it by nameA blocked deal, or manual evidence gathering every audit
Correlated tracing across agent, runtime, and APIOne run id tying the agent step, the token refresh, the retry, and the API response togetherFour log sources stitched by hand to explain one overnight failure
Regional residency isolationOne EU customer contractA contract you cannot sign
Protocol trackingMCP client registration and discovery rules are still changingClients stop interoperating after a spec revision

None of this is exotic. But a mistake here is a security incident, not a bug ticket, so the upkeep stays high for as long as you own the layer.

04The trade

Who carries which risk. Including the two risks buying adds.

Buying transfers most of these to the vendor and adds two of its own: a new dependency in the tool-call path, and exposure to vendor pricing or ownership changes. Both are in the table.

RiskIf you buildIf you buy
Cross-tenant credential leakYours to prevent, yours to disclosePer-tenant AES-256 vault, contractual
Token in model context or logsRests on discipline in every tool you writeStructurally prevented. Credentials resolve outside the agent runtime
Failed enterprise security reviewLikely, on attribution and audit gapsThe evidence already exists
Failures with no human in the loopYours to detect and normalize per providerHandled upstream of your code
Spec drift breaking clientsYours, every quarterThe vendor's
Outage in the integration layerYour infrastructure, your SLAA new dependency. Needs an SLA and a fallback you have tested
Pricing change or acquisitionNot a factorA real risk. Mitigated by a reversible rollout: one connector behind a flag first
05Flexibility

If you buy, what stays yours. Credentials, connectors, tools, auth, keys, and where it runs.

Buying the layer does not mean adopting someone else's stack. Check that each of these stays under your control, with any vendor.

01 · Credentials

Your OAuth apps

Bring your own app credentials per connector. Consent screens carry your brand, and tokens live in a vault isolated per customer.

02 · Connectors

Your connectors

Register connectors for internal APIs by defining the auth pattern and tool schemas. They behave the same way catalog connectors do.

03 · Tools

Your tool surface

Trim or extend each connector's tool set. A per-user endpoint exposes only the tools that user is allowed to call, not the whole catalog.

04 · Auth

Your identity provider

Bring Your Own Auth wraps OIDC, SAML, or a custom scheme and issues OAuth 2.1 tokens on top. Ships against any identity provider without moving user data.

05 · Deployment

Your infrastructure

Self-hosted keeps data, logs, metrics, and telemetry inside your perimeter. VPC and air-gapped deployments are Enterprise arrangements.

06 · Keys

Your encryption keys

Bring your own key from your GCP or AWS KMS, so rotation, revocation, and the key audit trail stay with your team. Enterprise plan.

The rollout itself stays reversible: one connector behind a flag first, compared against your current path on live traffic, then the rest.

06Vendor diligence

Questions to ask any vendor. Our answers, limitations included.

The questions that come up in security reviews and vendor evaluations. The list works as-is for evaluating any vendor.

Identity and access · 7
Where do credentials live at the moment of a tool call?+
Nowhere in your process. Your agent holds an opaque reference. The token is attached to the outbound request inside our runtime, so it never reaches your logs or the model context.
How quickly does revocation take effect?+
Immediately, and it fails closed. Revoke the account and the next call is rejected at pre-check, before the request reaches the third-party API. No window where a cached token still works. No published wall-clock figure, since it varies by region and app; measure it during your evaluation.
Can a privileged user widen what the agent can reach?+
No. The agent's scope and the user's real permissions in the connected system both have to allow an action, so a finance agent invoked by someone with full payroll access still cannot read payroll. You can also cap what an agent sees: a per-user MCP endpoint exposes only the tools that user is allowed to invoke, rather than the whole catalog.
Can we enforce our own policy conditions on a tool call?+
Yes, through interceptors that run before a request reaches the third-party API. You can enforce your own conditions there, such as time windows, request volume, or workflow state, without forking anything or waiting on our roadmap.
How does this support offboarding and access reviews?+
Access dies with the account. Revoke a user or a connected account and the credential goes with it, so the agent loses that path on its next call. Connect, revoke, and tool-call events are queryable per user and per customer, which covers access reviews and offboarding evidence.
Can we manage the encryption keys ourselves?+
Yes, on Enterprise. Bring your own key using your GCP or AWS KMS, so rotation, revocation, and the audit trail on the keys stay yours. Without it, tokens are still AES-256 at rest and isolated per tenant.
What leaves our perimeter, and under which deployment model?+
On self-hosted, nothing. On cloud, tool calls route through us, which means accepting network egress to our control plane, and your security team should evaluate that explicitly. Two further constraints: VPC and on-prem are Enterprise arrangements, and EU residency on the cloud plans is a paid add-on.
Connectors and coverage · 4
What happens to the integration work we have already done?+
It stays. Tool definitions and agent logic do not change; only the credential source and the scope check move. Migrate one connector, run both paths in parallel, then move the rest.
What happens when a required tool is not in your catalog?+
In most cases it is already covered; the catalog holds 3,000+ tools across messaging, CRM, ticketing, files, calendars, and code, each defined for agent calling. For anything absent, you can register your own connector from the Growth plan up rather than waiting on our roadmap. If you need us to build one, get the turnaround commitment into your contract.
Who absorbs API and protocol changes?+
We do. Third-party APIs change their schemas and auth rules, and the MCP spec is still settling underneath them: how clients register and discover servers keeps being revised. Tracking all of that is part of what you are paying for.
Why not one shared connection per customer account?+
It works initially, but breaks down in two ways. Attribution disappears, so no downstream call maps to a person. And some apps cap live tokens per account, so a shared connection serving many users gets its tokens revoked by the app itself. One team hit exactly that and resolved it by moving to per-user connections.
Runtime and reliability · 3
What happens to in-flight runs during your maintenance?+
Nothing, for in-flight runs. Signing keys rotate with an overlap, so tokens issued under the previous key stay valid until they expire. The overlap window is a deployment setting, so request yours in writing.
What happens when a third-party API errors mid-run?+
We fail closed. An upstream 401 marks the account for re-authentication and the next call is rejected, so the agent stops instead of looping. The trade-off is that an API returning 401 for rate limiting triggers a re-authentication you did not need. Error normalization varies by connector, so send your integration list and we will confirm which are covered.
What latency do you add, and what uptime is contractual?+
Under 50ms at p95 on the tool-call path. The 99.99% uptime SLA is contractual on Enterprise, not every plan. Measure both against your own traffic with your current path behind a flag before you commit.
Ownership and compliance · 5
What does an audit record contain, and how long is it retained?+
Every call lands as a structured event: who authorized it, which agent ran it, which tool and scope, and what came back. Streamable to Datadog, Splunk, or any SIEM with no instrumentation on your end. Retention is 90 days by default, longer under an Enterprise agreement, so check that against your compliance window.
What drives the price as we scale?+
On tool calls, not customers or seats. 5,000 a month on Free, 100,000 on Growth at $99, then $0.50 per extra thousand. Call volume per run moves the bill more than customer count does, so model it from your busiest workflow rather than your account list.
What compliance evidence can you provide, and when?+
SOC 2 Type II and ISO 27001, HIPAA ready on request. The report and current pen test summary go out under NDA, and we can send both at the start of an evaluation.
What does self-hosted deployment include?+
The full runtime inside your perimeter: connectors, the credential vault, and audit logs. No data, logs, metrics, or telemetry reaches Scalekit infrastructure, and air-gapped environments are supported. Self-hosted and VPC deployments are Enterprise arrangements, so put the deployment model in your contract.
Which features are Enterprise-only?+
Bring your own key from your GCP or AWS KMS, the contractual 99.99% uptime SLA, VPC and self-hosted deployment, audit retention beyond the 90-day default, and HIPAA readiness. EU data residency on the cloud plans is a paid add-on rather than Enterprise-only. If any of these gate your launch, get them into the contract up front.

Take this into your decision doc

Copies your eight answers, the result, the fourteen components, and all nineteen questions as plain text for your internal decision doc.

Talk it through with an engineer. The same eight criteria we run before quoting.

If your answers point to building in-house, we will say so, and tell you which components to watch as you grow.

Copied