Skip to content
Forward Deployed

Forward Deployed
Lessons and contents
Final Week ReviewLesson 8 of 22
22 lessons
Interview

Tools, Actions and Enterprise Integration

Source
From the Forward Deployed library
By
Sourav Banerjee
Last updated
3 Nov 2026

Report an issue

Interview Review

1. What the Interviewer Is Testing

  • Can you connect AI to enterprise systems through controlled interfaces?
  • Can you separate recommendations, permissions, and execution?
  • Can you handle timeouts and retries without duplicate business effects?
  • Can you explain the integration constraints before choosing a framework?

2. Core Mental Model

Diagram: Agent recommends; Validate, authorise, and check policy; Executor; Enterprise API; Confirm result; Record outcome and auditDiagram: Agent recommends; Validate, authorise, and check policy; Executor; Enterprise API; Confirm result; Record outcome and audit
  • Agent recommends → Policy decides → Executor acts.

For every integration, remember:

Diagram: Integration checklist; Contract and access; Read or write; Timeout and retry safety; Recovery and auditDiagram: Integration checklist; Contract and access; Read or write; Timeout and retry safety; Recovery and audit

3. Essential Concepts

1. Controlled Tool Layer: Expose Operations, Not Unlimited Access

  • Give the model approved operations with clear input and output schemas.
  • Validate arguments and enforce access in application code or the downstream system.

“I’d expose specific operations like get_order_status and request_refund, rather than unrestricted production access.”

Diagram: Model tool request; Validate; Authorise; ExecuteDiagram: Model tool request; Validate; Authorise; Execute
  • Tool results are data, not permission to bypass policy.
  • The model must not be able to supply its own trusted tenant identity or credentials.

2. Integration Contract: Discover the Real Constraints

  • Ask about API availability, authentication, schemas, limits, synchronous vs asynchronous behaviour, ownership, and error semantics.

“Does this API confirm completion, or only accept the operation for later processing?”

  • CRM: Customer context

  • Order system: Current order state

  • Payment system: Refund execution / status

  • CRM means customer relationship management; ERP means enterprise resource planning.

  • The integration may be harder than the reasoning step.

3. Read vs Write Tools: Different Consequences

  • Reads need access checks and freshness rules.
  • Writes also need policy, explicit action scope, duplicate protection, confirmation, and audit.

“Reading an order and issuing a refund have different risk and recovery requirements.”

Diagram: Authorised read lookup; Data; Authorised write proposal; Policy; Execute; ConfirmDiagram: Authorised read lookup; Data; Authorised write proposal; Policy; Execute; Confirm
  • Read calls still incur cost and may expose sensitive data; do not treat them as unrestricted.

4. Executor: Own the Business Side Effect

  • The executor turns a validated, permitted action into a concrete API operation.
  • Bind execution to the approved operation and inputs.

“The model proposes the action; the executor checks that the specific action is still permitted before sending it.”

Diagram: Refund proposal, approval, and action identifier; Controlled payment callDiagram: Refund proposal, approval, and action identifier; Controlled payment call
  • Keep secrets outside model context.
  • Record whether the action was accepted, completed, rejected, or remains unknown.

5. Idempotency: Make Repetition Safe

  • An idempotent operation produces no additional business effect when repeated as the same logical operation.
  • Use an action/idempotency key supported by the execution path.

“Retries of the same refund must reuse the same operation identifier.”

Diagram: Logical action refund_request_123; First call: create refund; Retry with same identifier: existing result or same operationDiagram: Logical action refund_request_123; First call: create refund; Retry with same identifier: existing result or same operation
  • Do not generate a new key for every retry.
  • Idempotency scope, retention, and changed-input behaviour must match the downstream contract.

6. Timeout: Stop Waiting Without Assuming Failure

  • Set dependency deadlines within the task's total time budget.
  • A timeout means the caller did not receive a result in time; the remote action may have succeeded.

“After a write timeout, I’d check operation status before sending another refund.”

Diagram: Refund call; Timeout; Status lookup and reconciliation; Completed; Failed; Still unknown: preserve stateDiagram: Refund call; Timeout; Status lookup and reconciliation; Completed; Failed; Still unknown: preserve state
  • If status cannot be determined, preserve the unknown state and escalate or reconcile later.
  • Never claim completion without confirmation.

7. Retry: Retry Only When Safe and Useful

  • Retry transient failures within a bounded budget, with backoff and jitter.
  • Do not blindly retry invalid input, denied permission, or policy rejection.

“I’d distinguish transient dependency failures from permanent errors and uncertain writes.”

Diagram: Transient read failure; Bounded retry; Invalid arguments; Correct or clarify; Unknown write result; Reconcile and recover idempotentlyDiagram: Transient read failure; Bounded retry; Invalid arguments; Correct or clarify; Unknown write result; Reconcile and recover idempotently
  • Avoid nested retry loops at the tool, orchestrator, and model layers multiplying attempts.

8. Circuit Breaker: Protect a Failing Dependency

  • After repeated failures, temporarily stop normal calls and later probe recovery.
  • Combine this with a defined fallback or safe stop.

“If the ERP is repeatedly failing, I’d stop hammering it and return a defined unavailable or deferred state.”

Diagram: Repeated failures; Open breaker; Fast failure or defer; Recovery probeDiagram: Repeated failures; Open breaker; Fast failure or defer; Recovery probe
  • A breaker does not repair the API, confirm an unknown write, or replace authorisation.

4. Requirement → Component Reasoning

Requirement Pattern / component Why Trade-off
Safe enterprise access Validated tool layer + scoped authorisation Restrict operations Integration effort
Execute approved refunds Policy + executor Separate reasoning and side effects More workflow state
Prevent duplicate refunds Idempotency + action records Safe repeated operation Downstream support and retention
Handle slow dependencies Deadlines + async work where acceptable Bound waiting Deferred completion
Recover uncertain writes Status query / reconciliation Establish actual outcome Recovery delay
Protect failing ERP Circuit breaker + bounded retries Avoid repeated load Temporary unavailability
Diagram: User; API Gateway: application-entry controls; Application; Model Gateway: model-call controls; Model provider; Enterprise operation; Controlled tool layerDiagram: User; API Gateway: application-entry controls; Application; Model Gateway: model-call controls; Model provider; Enterprise operation; Controlled tool layer

For a refund request:

  • Retrieve the policy and read live order state.
  • Propose the refund, then authorise it and check policy.
  • Execute with a stable action identifier.
  • Confirm status and audit the result.

5. Important Distinctions and Gotchas

  1. Recommendation vs execution: eligibility text is not a completed refund.
  2. Timeout vs failure: no response does not prove the remote action failed.
  3. Idempotency vs retry: idempotency makes repeated effects safe; retry makes another attempt. Both must follow the API contract.
  4. Accepted vs completed: asynchronous acceptance needs status tracking before reporting success.
  5. Circuit breaker vs timeout: stop calls during repeated failure vs stop waiting for one call.

6. Trigger → Concept Table

Hear… Think… Discuss…
“Access production CRM” Controlled tools Operations, scopes, secrets
“Issue refund” Write execution Policy, approval, confirmation
“Refund timed out” Unknown outcome Reconcile before retry
“Duplicate request” Idempotency Same logical action identifier
“ERP takes 30 seconds” Deadline / async User waiting budget and status
“Repeated API failures” Circuit breaker Recovery probes and fallback
“API returns accepted” Async contract Completion tracking

7. Interview Phrases

“I’d expose only the approved operations this task needs.”

“A write timeout is an unknown outcome until we reconcile it.”

“The same logical action must keep the same idempotency identifier across retries.”

“I’d bound retries and protect a failing dependency instead of amplifying the outage.”

8. Practice Questions

  1. What controls belong around a CRM lookup versus a refund write?
  2. A refund succeeds remotely, but the caller times out. How do you recover without issuing another refund?
  3. An ERP sometimes takes 30 seconds. What do you ask about deadlines, async completion, and fallback?
  4. Why separate the agent's recommendation from policy and execution?
  5. Tool and orchestrator layers both retry. What can go wrong, and how do you bound total attempts?

Sources (checked 27 Sep 2026)

Rate your confidence and keep notes on the module page.