import { type AgentCapabilitySummary, type AgentJsonConfig, type AgentSkill, type ListAgentsQueryDto } from '@n8n/api-types'; import { Logger } from '@n8n/backend-common'; import { ProjectRelationRepository, type User } from '@n8n/db'; import { CredentialsService } from '../../credentials/credentials.service'; import { EventService } from '../../events/event.service'; import { AgentChatAttachmentService } from './agent-chat-attachment.service'; import { AgentExecutionService } from './agent-execution.service'; import { AgentKnowledgeService } from './agent-knowledge.service'; import { AgentRuntimeCacheService } from './agent-runtime-cache.service'; import { AgentTestChatService } from './agent-test-chat.service'; import { Agent } from './entities/agent.entity'; import { AgentTaskRepository } from './repositories/agent-task.repository'; import { AgentRepository, type AgentSummary, type AgentSummaryFilters } from './repositories/agent.repository'; import { SubAgentCleanupService } from './sub-agents/sub-agent-cleanup.service'; type CreateAgentOptions = { availableInMCP?: boolean; id?: string; adoptOnCollision?: boolean; defaultModel?: { model: string; credential: string; }; schema?: AgentJsonConfig; skills?: Record; tools?: Record; user?: User; }; export declare class AgentsService { private readonly logger; private readonly agentRepository; private readonly projectRelationRepository; private readonly agentChatAttachmentService; private readonly agentKnowledgeService; private readonly runtimeCacheService; private readonly testChatService; private readonly agentTaskRepository; private readonly subAgentCleanupService; private readonly eventService; private readonly agentExecutionService; private readonly credentialsService; constructor(logger: Logger, agentRepository: AgentRepository, projectRelationRepository: ProjectRelationRepository, agentChatAttachmentService: AgentChatAttachmentService, agentKnowledgeService: AgentKnowledgeService, runtimeCacheService: AgentRuntimeCacheService, testChatService: AgentTestChatService, agentTaskRepository: AgentTaskRepository, subAgentCleanupService: SubAgentCleanupService, eventService: EventService, agentExecutionService: AgentExecutionService, credentialsService: CredentialsService); create(projectId: string, name: string, options?: CreateAgentOptions): Promise; createOrAdopt(projectId: string, name: string, { availableInMCP, id, adoptOnCollision, defaultModel, schema, skills, tools, user, }?: CreateAgentOptions): Promise<{ agent: Agent; adopted: boolean; }>; private prepareDuplicateConfig; findByProjectId(projectId: string): Promise; findByProjectIdPaginated(projectId: string, options: ListAgentsQueryDto): Promise<{ count: number; data: Agent[]; }>; findById(agentId: string, projectId: string): Promise; getCapabilitySummary(agentId: string, projectId: string): Promise; findByUser(userId: string): Promise; findSummariesInProjects(projectIds: string[] | null, options?: AgentSummaryFilters): Promise; findByIdForUser(agentId: string, user: User): Promise; findByUserPaginated(userId: string, options: ListAgentsQueryDto): Promise<{ count: number; data: Agent[]; }>; findPublishedByUser(userId: string): Promise; delete(agentId: string, projectId: string): Promise; } export {};