ReadonlyisObservable indicating if the ambient agent is currently processing — delegated to the runtime's AgentRunner.
Synchronous read of the cached conversation-manager-agent name. Returns
null until getConversationManagerAgent has been called at least
once and resolved successfully. Used by MessageItemComponent.isConversationManager
to flag messages from the routing agent without hardcoding 'Sage'.
The metadata provider this service uses. When unset, falls back to Metadata.Provider. Setting it re-initializes the AI client and forwards the provider to the runtime's runner.
Check if user's latest message should continue with the previous agent or route through Sage. Uses fast inference (<500ms) to determine intent and avoid unnecessary Sage overhead.
Stays on the Angular shim because it directly uses GraphQLAIClient. Could move to the runtime in a follow-up.
Clear the session for a conversation (useful when starting a new topic)
Find the configuration preset ID from a previous
The agent ID to search for
The conversation history to search through
The configuration preset ID if found, undefined otherwise
Resolve the conversation manager agent via the runtime's 4-step DefaultAgentResolver chain (explicit input → app-scoped Application Setting → global Application Setting → code-const Sage fallback). The result is cached on this service for use by the synchronous ConversationManagerAgentName getter.
Existing callers expect a Promise<MJAIAgentEntityExtended | null> — we preserve that shape (returning null on failure rather than throwing) so the call sites don't need to change.
Invoke a sub-agent based on Sage Agent's payload. This is called when Sage decides to delegate to a specialist agent.
Stays on the Angular shim because it directly uses AgentClientService. Could move to the runtime in a follow-up if needed.
Optionalpayload: unknownOptionalonProgress: AgentExecutionProgressCallbackOptionalsourceArtifactId: stringOptionalsourceArtifactVersionId: stringOptionalagentConfigurationPresetId: stringOptionalappContext: Record<string, unknown> | nullOptionalplanMode: booleanOptionalrequestedSkillIDs: string[]Returns true if the supplied agent identifier (UUID or name) matches the
currently cached conversation manager agent. Robust to either input.
Process a message through the conversation manager agent. Delegates to
ConversationsRuntime.Instance.AgentRunner.processMessage(...).
Signature is preserved verbatim from the original service so existing
call sites continue to compile. The unused conversationHistory
parameter is kept for backwards compatibility (it was already
documented as "kept for backwards compatibility but not used" in the
original).
OptionalonProgress: AgentExecutionProgressCallbackOptionalappContext: Record<string, unknown> | nullOptionalplanMode: booleanOptionalrequestedSkillIDs: string[]
Angular DI service for conversation-level agent orchestration.
After PR 2 of the conversations-runtime extraction, the core
processMessageflow and the conversation-manager-agent resolution are delegated to@memberjunction/conversations-runtime. This service is primarily a shim for those operations PLUS the holder of the helpers that haven't been ported yet:invokeSubAgent(...)— used by Sage's routing decisions inmessage-input.component.checkAgentContinuityIntent(...)— fast intent classification when the user replies to a previous-agent thread.findConfigurationPresetFromHistory(...)— locates an agent's preset from priorMentions
in the conversation.
clearSession(...)— per-conversation session-id bookkeeping.These can move to the runtime in a follow-up; they aren't strictly needed to invoke an agent end-to-end and stay here so the shim has zero behavior difference vs. the original.