Write your own plugins. Integrate your own models.
The SDK handles the contract between your external systems, AI models, and Latch. You write the discover and execute functions. The platform handles governed permissions, approval workflows, and immutable audit logging — so the plugin code stays focused on the action itself. Host plugins on-prem alongside the platform or run them as separate services.
discover → authorize → execute → reflect
Move fast without turning the product into a custom integration maze
Teams should not need a core product release every time a new downstream action matters. Plugins keep the platform flexible while preserving a clear boundary around permissions, execution, and audit history.
Use the SDK that fits your stack instead of hand-rolling discovery and execution contracts.
The platform stays responsible for permissions and operator context, even when the action runs elsewhere.
export async function discover(ctx) {
// Only show the action when the ticket context says it matters.
if (ctx.ticket.issue_type?.name !== 'Payment Reprocess') {
return [];
}
return [{
id: 'reprocess-payment',
label: 'Reprocess Payment',
description: 'Run the external reprocess flow from the ticket.',
requires_confirmation: true,
}];
}
export async function execute(actionId, ctx) {
// The platform stays responsible for permissions and auditability.
return {
success: true,
message: 'Payment reprocess submitted.',
effects: {
add_comment: {
content: 'External reprocess started from plugin.',
is_public: false,
},
change_status: {
status: 'In Progress',
},
},
};
} Implementation questions developers ask
These answers cover the SDK, authentication, testing, side effects, and error handling — the details that matter when you are writing the code.
What languages does the SDK support?
TypeScript and Go. Both SDKs handle the discovery and execution contract, so the plugin code focuses on the action logic — not on serialization, auth handshakes, or response formatting.
How are plugin calls authenticated?
Plugin calls can use HMAC, API keys, or bearer tokens. Latch routes the execution through its own control layer instead of exposing a raw button-to-webhook flow. The SDK handles signature verification automatically.
Can a plugin return side effects?
Yes. A plugin can return effects such as comments, status changes, or structured field updates, and Latch applies and records them atomically. The plugin never writes directly to the case — it declares what should change.
How do I test a plugin locally?
The SDK includes a local test harness that simulates case context, role checks, and execution without needing a running Latch instance. You can also point a dev environment at a staging plugin endpoint for end-to-end testing.
What happens when a plugin times out or returns an error?
The failure response writes to the case timeline with the status code, error message, and timestamp. The operator sees exactly what happened. Retries are manual — the operator can re-trigger the action after reviewing the failure.
Bring one plugin action into the case experience
Pick the workflow your team relies on most and see how a plugin exposes it safely inside the case.