AdiSaan's Muse companion — platform first
Shared platform integration discovered during the AdiSaan public-site build. The undeployed custom agent, controller, conversation cache, and chat form were removed. The live barometer was preserved.
Existing features reused
- Agent Studio at
https://admin.adisaan.com/ai-agents, Client Experience, themirror-modeAmbassador card: title, personality, custom instructions, provider/model settings, and native profile persistence. AmbassadorAgent: tenant provider resolution, approved-public RAG filtering, execution, and existing observability.AskMuseController: public questions, session identifiers, IP/fingerprint limits, and daily budget checks.partials.home-ask-muse: question form, message rendering, explicit consent, typing state, session handling, and existing public API.
Verified shared gaps and fixes
- Public
ambassador_agentnormalized toambassador, while Studio savesmirror-mode. Map the public agent to the visible card in both instructions and runtime resolution; retain legacy Ambassador database settings when no native card settings exist. - The shared widget used an inline script, incompatible with this public site's existing script policy. Extract the same script to
public/js/ask-muse.js, support optional CSRF headers, and parameterize its existing copy/privacy link. The floating input can be hidden when a brand supplies an avatar launcher. - Public Ambassador had no server-provided page measurement context. Accept an internal request attribute populated by the hosting page, never visitor payloads. AdiSaan supplies the dated total and reporting-account coverage.
Presentation and boundaries
The right-hand avatar and thought cloud are theme presentation. Scroll reactions are prepared editorial comments evaluated locally. Clicking the avatar opens the native Muse widget; no AI call occurs just because someone scrolls. Visitor chat uses approved public knowledge, not private brand memory or personal recordings. No new social publishing, voting, payment, or background automation is enabled.
Validation and network rollout
Focused alias tests cover Ambassador and existing agent keys. Public-site tests cover host/tenant gating and private draft visibility. JavaScript syntax and theme lint checks pass. Before deployment, each shared production file was verified identical to its source base.
Ship the shared PHP files, shared view and new script together. Existing sites keep their default widget labels and floating input. Older Ambassador-only profile data remains a fallback; a saved native Studio card takes precedence. AdiSaan's personality and content are tenant configuration, not shared code. The public site's endpoint whitelist and theme remain its own integration. Commit the shared fix independently of unrelated platform work. This does not automatically publish a new stable release or update other AIOHM installations.
