Skip to main content
You’ll need Node.js 22 or later and access to a Platform developer organization. Use an existing Next.js 16 project with TypeScript and the App Router, or let the CLI create one. You can read the full developer reference before signing in. Platform console

1. Add the kit in test mode

Run the initializer in the root of your application.
For a new project, use npx openlegion init my-app and then cd my-app. When the browser opens, approve the code displayed in your terminal. The CLI installs @openlegion/platform, writes a test key to .env.local and adds these files to the application.

2. Start both development processes

Start the Next.js server with the command the initializer printed. For an npm project, use the development script.
Open a second terminal in the project directory and start the Platform CLI.
Leave both running. The CLI pushes the template to test mode and forwards signed calls to your local app. The first run also writes the connector secret into .env.local. If the CLI asks you to restart your application, restart the app server, then run the CLI command again.

3. Verify the round trip

Open http://localhost:3000/agent on the default development port and ask What’s my account? Look for get_account in the CLI output and the example customer information in the chat. That confirms the agent called code in your application. If the page opens but calls redirect to your login page, check whether your app’s sign-in middleware covers /api/openlegion. Let the kit handle that route’s signed requests and keep the browser session check in your server-side resolver. Before putting real customer data behind the example tool, replace the development session with your own authentication. Identity and tools Maintained quickstart and scaffold examples · Setup with a coding agent