Skip to main content

Integration

openmolt


openmolt / Integration

Class: Integration

Defined in: Integration.ts:54

Runtime wrapper around an IntegrationDefinition. Created automatically by OpenMolt when an integration is registered.

Constructors

Constructor

new Integration(handle, definition): Integration

Defined in: Integration.ts:65

Parameters

handle

string

Unique identifier for this integration.

definition

IntegrationDefinition

Full integration definition.

Returns

Integration

Properties

definition

readonly definition: IntegrationDefinition

Defined in: Integration.ts:59

The underlying integration definition supplied by the user or built-in config.


handle

readonly handle: string

Defined in: Integration.ts:56

The integration's unique handle within an OpenMolt instance.

Methods

executeTool()

executeTool(toolHandle, input, credential, context): Promise<unknown>

Defined in: Integration.ts:83

Execute a tool for the given agent credential.

The method:

  1. Looks up the tool by handle.
  2. Validates the tool exists.
  3. Dispatches to either the custom execute function or the HTTP path.

Parameters

toolHandle

string

Handle of the tool to execute.

input

Record<string, unknown>

Tool input matching the tool's inputSchema.

credential

AgentCredential

Agent credential for authentication.

context

ToolContext

Execution context (agent name, etc.).

Returns

Promise<unknown>