feat: add setup flow for dedicated research agent

This commit is contained in:
William Valentin
2026-02-17 15:27:09 -08:00
parent a055f4d338
commit be993146c0
7 changed files with 94 additions and 2 deletions
+30
View File
@@ -33,6 +33,16 @@ export interface SetupConfig {
sandbox?: { enabled?: boolean };
pairing?: { enabled?: boolean };
tools?: { profile?: string };
agent_configs?: Record<string, {
model_tier?: 'fast' | 'default' | 'complex' | 'local';
tool_profile?: string;
system_prompt?: string;
}>;
intents?: {
enabled?: boolean;
match_threshold?: number;
rules?: Array<Record<string, unknown>>;
};
automation?: {
cron?: Array<Record<string, unknown>>;
webhooks?: Array<Record<string, unknown>>;
@@ -62,6 +72,10 @@ interface OperatorPackOptions {
enableMinioSync?: boolean;
}
interface ResearchAgentOptions {
modelTier: 'fast' | 'default' | 'complex' | 'local';
}
export class ConfigBuilder {
private config: SetupConfig;
@@ -157,6 +171,22 @@ export class ConfigBuilder {
this.config.tools = { profile };
}
setResearchAgentEnabled(options: ResearchAgentOptions): void {
const agentConfigs = (this.config.agent_configs ?? {}) as Record<string, Record<string, unknown>>;
const existing = (agentConfigs.research ?? {}) as Record<string, unknown>;
agentConfigs.research = {
...existing,
model_tier: options.modelTier,
tool_profile: 'messaging',
system_prompt: [
'You are a research agent. Find, verify, and synthesize information for the operator.',
'Prefer primary sources and include concrete dates and links when available.',
'Keep output structured and concise.',
].join(' '),
};
this.config.agent_configs = agentConfigs;
}
setWebhooksEnabled(secret?: string): void {
const automation = (this.config.automation ?? {}) as Record<string, unknown>;
if (secret) {