Connect your application to the agent
Keep your existing business systems and expose their operations to people and agents through extensions.
Outcome: Define business actions, authentication and verifiable submission results.
Before you begin: Prepare the files and tools specified on this page. The previous page in the learning path is not automatically a dependency.
On this page
01Start with one business action
For example, look up a claim or submit one after confirmation. Declare inputs, outputs, callers, permissions and read/write effects. Implement the API request in a Node handler. This project-read example illustrates sharing an operation between a page and the agent.
import { defineExtension } from '@ambleloft/extension-sdk';
export const { activate } = defineExtension({
activate(context) {
context.subscriptions.push(
context.operations.register('describeProject',
async (input, invocation) => {
const project = await invocation.resources
.getProject(input.projectId as string);
return { ...project };
}
)
);
}
});02Choose the interaction surface
Use declarative forms for fields and linear steps, or an in-chat HTML page for custom layouts. An independent extension home can show service health, records and settings. Keep host authorization and write confirmation in the flow.
03Connect enterprise accounts and resources
enterprise-auth demonstrates host-managed account sessions and declared HTTPS resources. Replace baseUrl, audience and scopes, then configure issuer/clientId in host account settings. The identity provider must support PKCE S256, resource and loopback callbacks. Placeholder domains are not ready-made enterprise connectors.
Open the complete sample and instructions04Make submissions traceable
Your service owns persistence, idempotency and result lookup by the original execution record. If a response is lost after submission, query the original result before any further write. See the submission recovery example.
Open the complete sample and instructionsCheck the result and troubleshoot
Define business actions, authentication and verifiable submission results.
Check actual results using this page’s verification steps. For business integrations, inspect UI submission, tool receipts and server records separately.
Open the error reference →