@bernierllc/onboarding-agent-service
v0.1.0
Published
Orchestrator that composes AI runtime, tool registry, and onboarding config into a goal-directed streaming agent with completion detection and NeverHub integration.
Readme
@bernierllc/onboarding-agent-service
Orchestrator service that composes AI runtime, tool registry, onboarding config, plugins, and conversation store into a streaming onboarding agent with goal tracking, returning-user detection, attachment ingestion, completion detection, and NeverHub registration.
Status: scaffold — implementation pending.
Overview
OnboardingAgent is a goal-directed, streaming conversational agent for onboarding flows. It:
- Merges base config with enabled plugins via
onboarding-feature-plugin - Compiles system prompts with live goal-progress state (via
onboarding-config-core) - Streams chat via
ai-agent-runtimeandai-provider-router - Tracks goal completion and orchestrates post-completion handoffs
- Ingests file attachments (logo upload → URL resolution)
- Persists conversations via
agent-conversation-store - Registers and publishes events to NeverHub
Installation
npm install @bernierllc/onboarding-agent-serviceUsage
import { OnboardingAgent } from '@bernierllc/onboarding-agent-service';
const agent = new OnboardingAgent({
config,
plugins: [{ plugin: websiteBuilderPlugin, config: { siteTemplate: 'contractor-default' } }],
storeAdapter: createInMemoryStore(),
stateReaders: { async readState(sessionId) { return db.getOrgSetupState(sessionId); } },
handoffHandlers: {
async handle(target, state) {
if (target.type === 'task') await taskService.create({ label: target.label, orgId: state.orgId });
},
},
});
await agent.initialize();
for await (const chunk of agent.chat({ sessionId, userId, message, attachments })) {
res.write(chunk.delta);
}Error Classes
OnboardingAgentError— base errorOnboardingAgentInitError— initialization failure (ONBOARDING_AGENT_INIT_ERROR)OnboardingHandoffError— handoff handler failure (ONBOARDING_HANDOFF_ERROR)
License
Copyright (c) 2025 Bernier LLC. Limited-use license — see LICENSE for details.
