Skip to content

Recipes

Recipes start from a task you are likely to face while building an Action Engine. Each one uses code from a tested example in the Invokta repository, then shows how to run and verify the result locally.

Publish an atomic capability

Export one reusable capability from a package root or isolated ESM subpath.

Open recipe

Publish a capability library

Bundle related capabilities with literal default IDs and factory-injected dependencies.

Open recipe

Inject a dependency

Put a repository and classifier behind engine-owned ports, then wire their implementations at the composition root.

Open recipe

Authorize with domain data

Check a principal’s permission and resource constraint before the capability loads a ticket or calls a model.

Open recipe

Compose capabilities

Combine a local capability, atomic package exports, and a selected library without losing ID ownership.

Open recipe

Consume MCP stdio

Connect an independent harness with the official MCP client, discover a tool, invoke it, and close the child transport.

Open recipe

Build an outbound connector

Implement a provider behind engine-owned ports with explicit configuration, cancellation, bounded work, and safe errors.

Open recipe

Authenticate requests

Connect Supabase, Clerk, Auth0, Cognito, Firebase, Better Auth, Auth.js, WorkOS, API keys, or any OIDC issuer to the MCP HTTP boundary.

Browse the authentication recipes

Bootstrap a recipe example into a new project with create-invokta-engine --example:

Terminal window
npm create invokta-engine@latest my-engine -- --example auth-clerk-engine --yes

Or run the recipes from a full repository checkout with Node.js 22.20.0 or later and Yarn 1.22.22:

Terminal window
git clone https://github.com/vinilana/invokta.git
cd invokta
yarn install --frozen-lockfile
yarn build

If this is your first Invokta engine, build the first-engine walkthrough before using these patterns. Browse the complete example catalog when you want to compare domains, provider boundaries, and workflow designs.