Skip to Content
GuidesContextual AccessRunning an Extension

Running an Server

The fastest way to get started with Contextual Access is to run one of the open-source example servers. These are example Go implementations you can use as-is or as a starting point for your own server.

Example servers

The ArcadeAI/logic-extensions-examples  repository contains runnable servers that implement the Contextual Access webhook contract.

A single server that demonstrates access control, PII redaction, A/B testing, and includes a browser-based dashboard for configuration.

Focused examples

Minimal servers, each demonstrating one capability:

ExampleDescriptionHook points
user_blocking Block specific users from toolsAccess, Pre
content_filter Filter or block based on contentAccess, Pre, Post
pii_redactor Detect and redact PII in tool outputsPost
ab_testing A/B and canary test tool versionsPre
basic_rules Configurable rules for all hooks (YAML/config)Access, Pre, Post

Quick start

Clone the repo and run a server:

Terminal
git clone https://github.com/ArcadeAI/logic-extensions-examples.git cd logic-extensions-examples/

Advanced server (with web dashboard):

Terminal
go run ./examples/contextual_access/advanced_server -config ./examples/advanced_server/example-config.yaml

Focused examples:

Terminal
# PII redactor (post-hook only) go run ./examples/contextual_access/pii_redactor -types "email,ssn,credit_card" # User blocking (access + pre) go run ./examples/contextual_access/user_blocking -block "user1,user2" # Content filter (access, pre, post) go run ./examples/contextual_access/content_filter -config ./examples/content_filter/example-config.yaml # A/B testing (pre-hook) go run ./examples/contextual_access/ab_testing -config ./examples/ab_testing/example-config.yaml # Basic rules (all hooks, configurable via YAML) go run ./examples/contextual_access/basic_rules -config ./examples/basic_rules/example-config.yaml

Each server exposes GET /health, POST /access, POST /pre, and POST /post (or a subset, depending on which hook points it implements).

Connect to the Arcade

Once your server is running:

  1. Open the Arcade Dashboard and navigate to Contextual Access
  2. Click Create Extension and enter your server’s base URL and endpoint paths
  3. Create hook configurations to attach the extension to the hook points you want

See How Hooks Work for details on configuring extensions and hook points.

Next steps

  • Build your own — Implement the webhook contract in any language
  • API Reference — Interactive schema documentation for the webhook contract
Last updated on