Existing App
Use this path when you already have a Hono or Nitro app and want Junior to own the Slack runtime routes inside it.
The safest integration is still the scaffolded shape: a dedicated server entrypoint that exports the Hono app returned by createApp(), plus juniorNitro() in Nitro config.
Add the server entrypoint
Section titled “Add the server entrypoint”Create a Junior server module:
import { initSentry } from "@sentry/junior/instrumentation";initSentry();
import { createApp } from "@sentry/junior";import { plugins } from "./plugins.ts";
const app = await createApp({ allowedDomains: ["example.com"], plugins,});
export default app;Replace example.com with your company’s email domain. Only Slack users and
dashboard sign-ins on allowed domains
can use Junior.
createApp() mounts the supported Junior routes listed in Route & Handler Surface.
Add Nitro wiring
Section titled “Add Nitro wiring”Create a runtime-safe plugin set and point juniorNitro() at it so app files
and declared plugin packages are copied into the deployment bundle:
import { defineJuniorPlugins } from "@sentry/junior";import { sentryPlugin } from "@sentry/junior-sentry";
export const plugins = defineJuniorPlugins([sentryPlugin()]);import { defineConfig } from "nitro";import { juniorNitro, withSentryConfig } from "@sentry/junior/nitro";
const config = defineConfig({ modules: [ juniorNitro({ plugins: "./plugins", }), ], routes: { "/**": { handler: "./server.ts" }, },});
export default withSentryConfig(config, { authToken: process.env.SENTRY_AUTH_TOKEN, org: process.env.SENTRY_ORG, project: process.env.SENTRY_PROJECT,});withSentryConfig uploads source maps to Sentry when the build has
SENTRY_AUTH_TOKEN, SENTRY_ORG, and SENTRY_PROJECT. Import it from
@sentry/junior/nitro. Do not add @sentry/nitro or @sentry/node to your
app. Junior pins their versions, and a different version cannot use the Sentry
client that initSentry() creates.
Your app owns the nitro dependency. @sentry/junior lists the Nitro versions
that it supports as a peer dependency. Use one of those versions. If your
version is not in that list, your package manager shows a peer dependency
warning.
If your existing app already owns routes, make sure the Junior Hono app still receives the paths under /api/webhooks, /api/oauth/callback, /api/internal/agent-dispatch, /api/internal/agent/continue, /api/internal/plugin/tasks, /api/internal/heartbeat, and /health. Do not split those routes across independent runtime instances. When mounted, @sentry/junior-dashboard owns /, /conversations, /conversations/*, /locations, /locations/*, /people, /people/*, /system, /system/*, /_junior/dashboard/assets/*, /auth/login, /api/auth/*, and the authenticated product API routes /api/health, /api/runtime, /api/plugins, /api/plugins/*, /api/plugin-reports, /api/skills, /api/skills/*, /api/conversations, /api/conversations/*, /api/locations, /api/locations/*, /api/people, /api/people/*, /api/config, and /api/me.
Some packages export runtime hooks instead of plugin.yaml. Add those
plugin factories to the same plugins.ts set. For example, see
GitHub Plugin for the githubPlugin() setup.
Scheduled automations are built in; see Automations.
Add app files
Section titled “Add app files”Junior expects app context and local extension files under app/:
app/├── SOUL.md├── WORLD.md├── DESCRIPTION.md├── skills/└── plugins/Keep provider setup in plugin manifests and env vars, not in skill prose.
Add the build steps
Section titled “Add the build steps”A scaffolded app gets migrations and snapshot warmup from its build. Add the same steps to your app. Set the build script:
{ "scripts": { "build": "junior snapshot create && nitro build" }}On Vercel, set the build command in vercel.json so each deploy migrates the
database first:
{ "framework": "nitro", "buildCommand": "pnpm exec junior upgrade && pnpm build"}On another host, run pnpm exec junior upgrade before you start the new
release.
Verify integration
Section titled “Verify integration”Apply the schema to your local database, then run the same checks as a scaffolded app:
pnpm exec junior upgradepnpm exec junior checkpnpm devcurl http://localhost:3000/healthThen complete Slack App Setup and verify one real Slack mention.
Next step
Section titled “Next step”Review Config & Environment before deploying, then follow Deploy to Vercel.