feat: add setup flow for dedicated research agent
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user