How to Build Custom Tools for Optimizely Opal AI Using Node.js and Express
Velir's blog post explores how to extend Optimizely’s Opal AI by building custom tools that allow AI agents to interact with third-party systems and APIs.
Opal is Optimizely's AI assistant integrated across their digital platform, enabling accelerated content creation and experimentation. While the platform includes built-in agents, users can create their own "custom tools"—applications that agents can call—for tasks beyond the default capabilities.
The post walks through how to self-host these tools (e.g., on Azure or AWS) and outlines three SDK options—C#, Python, and JavaScript—explaining when to use each based on performance needs and integration context. Velir chose the JavaScript SDK, using Node.js and Express.js to build their tool.
The blog details how to create a simple web application that defines tool capabilities via a public /discovery endpoint. This endpoint is essential for Opal to identify what the tool does, while all other endpoints can remain secured.
Once deployed, the tool is registered through the Opal admin interface using its discovery URL and a bearer token. Agents can then be configured to use the tool, with specific instructions defined in their ‘Inputs’ section. Multiple tools can be chained or used independently across agents.

