Skip to content

🤯 LobeHub - Super-Agents on Your Team. Add super-agents to the chats your team already uses.They take on work by themselves and get better every week.

938 B
Raw Blame
import { GroupAgentBuilderIdentifier } from '@lobechat/builtin-tool-group-agent-builder';
import { DEFAULT_PROVIDER } from '@lobechat/business-const';
import { DEFAULT_AGENT_BUILDER_AVATAR, DEFAULT_MODEL } from '@lobechat/const';

import type { BuiltinAgentDefinition } from '../../types';
import { BUILTIN_AGENT_SLUGS } from '../../types';
import { systemRoleTemplate } from './systemRole';

/**
 * Group Agent Builder - used for configuring group chat settings and managing group members
 */
export const GROUP_AGENT_BUILDER: BuiltinAgentDefinition = {
  avatar: DEFAULT_AGENT_BUILDER_AVATAR,

  // Persist config - stored in database
  persist: {
    model: DEFAULT_MODEL,
    provider: DEFAULT_PROVIDER,
  },

  // Runtime config - static systemRole
  runtime: (ctx) => ({
    plugins: [GroupAgentBuilderIdentifier, ...(ctx.plugins || [])],
    systemRole: systemRoleTemplate,
  }),

  slug: BUILTIN_AGENT_SLUGS.groupAgentBuilder,
};