Skip to content

Decision guide / Architecture

Integrating AI into an existing enterprise platform

Add AI capabilities through existing identity, domain APIs and data contracts. Plan the migration, rollout and recovery before introducing autonomous writes.

A practical framework for an engineering decision.

The decision

Integrate at stable business boundaries. Reuse the platform’s identity, authorization and domain rules, then introduce AI through a narrow, observable workflow. A separate agent service can coordinate the work; it should not become a second source of business truth.

  • Map the current write path before adding an AI path.
  • Treat connectors as maintained product integrations.
  • Expand from observation to controlled action with explicit acceptance evidence.

Start with the platform that already exists

The first integration decision is where the business rules live. They may be in a service layer, database constraints, a workflow engine or a mixture. Identify how the product authenticates users, selects a tenant, validates mutations and records audit events. A new AI feature that bypasses those rules creates a parallel application with different behavior.

An integration inventory
ContractQuestions to resolve
IdentityWho initiates the task? Which user or service identity reaches each downstream system?
DataWhat is authoritative, cached, derived, restricted or stale?
MutationWhich API owns validation, concurrency and duplicate prevention?
EventsCan deliveries repeat or arrive out of order? What identifies an event and a business operation?
FailureHow is a timeout distinguished from a rejected request or an unknown outcome?
OwnershipWho maintains connector versions, schema changes and operational runbooks?

Choose a narrow integration boundary

A useful starting point is a task-oriented domain API: propose an account update, assemble an order exception or retrieve the records needed for a case. Avoid handing an agent broad database access because it is easier to demo. The narrow contract should still enforce the same business rules for every caller.

Resource-level permission checks belong on the server, using trusted caller context. If the AI runtime supplies an account or tenant identifier, the domain service must verify that it is in scope. Authentication alone does not establish permission to read or change that resource.[1]

Use a read model or index when it helps retrieval, but document its freshness and access rules. An index is a projection of business data, not an excuse to serve a revoked document or commit against an outdated account version.

Worked integration: account-change proposals

Imagine an established SaaS product with a customer-success console and a domain API for account changes. The proposed AI feature reads support history and drafts a configuration adjustment. The existing API already validates the account version and the operator’s permission to change each setting.

  1. Add a proposal endpoint that accepts a task ID and a constrained change schema. It records a suggestion without mutating the account.
  2. Use authorized read tools to gather account context. Preserve source versions and references with the proposal.
  3. Render the before/after change in the existing console. Let the operator reject, edit or approve it under the current policy.
  4. Commit through the existing domain API with a stable operation ID and the expected account version.
  5. Record the result and expose a clear status to the initiating user. An AI runtime failure should not leave the console claiming success.

This preserves one mutation path while allowing the user experience to improve. If the organization later permits selected low-consequence actions without individual review, the same contract can enforce that policy. The decision should be based on evidence for the specific action class, not the fact that the feature uses an agent.

Design event and timeout behavior explicitly

An event-triggered integration should distinguish the delivery ID from the business-operation ID. A duplicate delivery should not create a new task that repeats a committed action. A revised customer request, however, may be a genuinely different operation and should not be accidentally suppressed.

Idempotency requires more than storing a key after success. The mutation and operation record need appropriate transactional or downstream guarantees, and the key must remain associated with the intended payload. AWS’s treatment of idempotent APIs explains the importance of client intent when deciding whether two requests are the same operation.[2]

Outcome contract
OutcomeCaller behavior
Rejected before executionCorrect the request or stop; do not retry unchanged indefinitely.
Committed with a resultStore the result and complete the task.
Known transient failure before mutationRetry within the bounded policy using the same operation identity.
Outcome unknownQuery or reconcile the original operation before issuing another mutation.

Roll out without a second set of business rules

Begin with a narrow workflow and an observable acceptance criterion. A shadow phase can compare proposed actions with the existing process, provided shadow execution cannot produce real side effects. Then expose proposals to a limited group and inspect disagreement, review time and support burden before increasing authority.

Keep the old path available during the transition when the product can support it. Document what a rollback disables, what happens to in-flight work and which already-committed actions cannot be undone. Software delivery discipline—including repeatable builds and verification—still applies to the integration.[3]

The integration deliverable is a maintained contract

Require more than a working connector. Ask for field mappings, schemas, credential scope, rate-limit handling, failure-state examples, migration steps and a connector ownership record. Include representative fixtures so the next API revision can be tested before it breaks a live workflow.

The end state should be understandable to the team that runs the platform. They should know which system owns each record, how to disable the new workflow, how to reconcile a failed task and how to change the integration safely. Those are the conditions that make an AI feature part of a product rather than a permanent exception.

Sources and scope

Technical references inform the cited statements. The decision frameworks and synthetic examples are TeqEngine’s editorial guidance.

  1. OWASP: Authorization Cheat Sheethttps://cheatsheetseries.owasp.org/cheatsheets/Authorization_Cheat_Sheet.html
  2. AWS Builders’ Library: Making retries safe with idempotent APIshttps://aws.amazon.com/builders-library/making-retries-safe-with-idempotent-APIs/
  3. NIST: Secure Software Development Framework, SP 800-218https://csrc.nist.gov/pubs/sp/800/218/final

Have a system like this in front of you?

We can scope a platform engagement directly, or begin with an architecture review when the next decision needs more evidence.