import { AgentBuildResumeDto, AgentChatMessageDto, type AgentBuilderMessagesResponse, type AgentIntegrationStatusResponse, type AgentPersistedMessageDto, type AgentScheduleConfig, type AgentSkill, type ChatIntegrationDescriptor, CreateSlackAgentAppDto, type CreateSlackAgentAppResponse, type SlackAgentAppManifestResponse, CreateAgentDto, CreateAgentSkillDto, UpdateAgentConfigDto, UpdateAgentDto, UpdateAgentScheduleDto, UpdateAgentSkillDto, AgentDisconnectIntegrationDto, PublishAgentDto } from '@n8n/api-types'; import type { AuthenticatedRequest } from '@n8n/db'; import type { Request, Response } from 'express'; import { CredentialsService } from '../../credentials/credentials.service'; import { AgentExecutionService } from './agent-execution.service'; import { type FlushableResponse } from './agent-sse-stream'; import { AgentsService } from './agents.service'; import { AgentsBuilderService } from './builder/agents-builder.service'; import { ChatIntegrationRegistry } from './integrations/agent-chat-integration'; import { AgentScheduleService } from './integrations/agent-schedule.service'; import { ChatIntegrationService } from './integrations/chat-integration.service'; import { SlackAppSetupService } from './integrations/slack-app-setup.service'; import { AgentRepository } from './repositories/agent.repository'; import type { Agent } from './entities/agent.entity'; export declare class AgentsController { private readonly agentsService; private readonly agentsBuilderService; private readonly credentialsService; private readonly chatIntegrationService; private readonly agentScheduleService; private readonly agentRepository; private readonly agentExecutionService; private readonly chatIntegrationRegistry; private readonly slackAppSetupService; constructor(agentsService: AgentsService, agentsBuilderService: AgentsBuilderService, credentialsService: CredentialsService, chatIntegrationService: ChatIntegrationService, agentScheduleService: AgentScheduleService, agentRepository: AgentRepository, agentExecutionService: AgentExecutionService, chatIntegrationRegistry: ChatIntegrationRegistry, slackAppSetupService: SlackAppSetupService); private validateIntegration; private withRunnableState; create(req: AuthenticatedRequest<{ projectId: string; }>, _res: Response, payload: CreateAgentDto): Promise; list(req: AuthenticatedRequest<{ projectId: string; }, unknown, unknown, { all?: string; }>): Promise; getConfig(req: AuthenticatedRequest<{ projectId: string; agentId: string; }>): Promise<{ model: string; name: string; instructions: string; description?: string | undefined; credential?: string | undefined; memory?: { enabled: boolean; storage: "n8n"; lastMessages?: number | undefined; semanticRecall?: { topK: number; scope?: "thread" | "resource" | undefined; messageRange?: { before: number; after: number; } | undefined; embedder?: string | undefined; } | undefined; observationalMemory?: { enabled?: boolean | undefined; observerThresholdTokens?: number | undefined; reflectorThresholdTokens?: number | undefined; renderTokenBudget?: number | undefined; observationLogTailLimit?: number | undefined; lockTtlMs?: number | undefined; } | undefined; episodicMemory?: { enabled: false; } | { enabled: true; credential: string; topK?: number | undefined; maxEntriesPerRun?: number | undefined; } | undefined; } | undefined; tools?: ({ type: "custom"; id: string; requireApproval?: boolean | undefined; } | { type: "workflow"; workflow: string; description?: string | undefined; name?: string | undefined; requireApproval?: boolean | undefined; allOutputs?: boolean | undefined; } | { type: "node"; name: string; node: { nodeType: string; nodeTypeVersion: number; nodeParameters: Record; credentials?: Record | undefined; }; description?: string | undefined; requireApproval?: boolean | undefined; })[] | undefined; skills?: { type: "skill"; id: string; }[] | undefined; providerTools?: Record> | undefined; integrations?: ({ type: "schedule"; active: boolean; cronExpression: string; wakeUpPrompt: string; } | { type: "telegram"; credentialId: string; settings?: { accessMode: "private" | "public"; allowedUsers: string[]; } | undefined; } | { type: "slack"; credentialId: string; } | { type: "linear"; credentialId: string; })[] | undefined; config?: { thinking?: { provider: "anthropic" | "openai"; budgetTokens?: number | undefined; reasoningEffort?: string | undefined; } | undefined; toolCallConcurrency?: number | undefined; maxIterations?: number | undefined; nodeTools?: { enabled: boolean; } | undefined; } | undefined; }>; putConfig(req: AuthenticatedRequest<{ projectId: string; agentId: string; }>, _res: Response, agentId: string, payload: UpdateAgentConfigDto): Promise<{ config: import("@n8n/api-types").AgentJsonConfig; updatedAt: string; versionId: string | null; }>; deleteTool(req: AuthenticatedRequest<{ projectId: string; agentId: string; toolId: string; }>, _res: Response, agentId: string, toolId: string): Promise<{ ok: boolean; }>; listSkills(req: AuthenticatedRequest<{ projectId: string; agentId: string; }>): Promise>; getSkill(req: AuthenticatedRequest<{ projectId: string; agentId: string; skillId: string; }>, _res: Response, agentId: string, skillId: string): Promise; createSkill(req: AuthenticatedRequest<{ projectId: string; agentId: string; }>, _res: Response, agentId: string, payload: CreateAgentSkillDto): Promise; updateSkill(req: AuthenticatedRequest<{ projectId: string; agentId: string; skillId: string; }>, _res: Response, agentId: string, skillId: string, payload: UpdateAgentSkillDto): Promise; deleteSkill(req: AuthenticatedRequest<{ projectId: string; agentId: string; skillId: string; }>, _res: Response, agentId: string, skillId: string): Promise<{ ok: boolean; }>; getModelCatalog(): Promise; listIntegrations(): ChatIntegrationDescriptor[]; listThreads(req: AuthenticatedRequest<{ projectId: string; }, {}, {}, { cursor?: string; limit?: string; agentId?: string; }>): Promise<{ threads: import("./agent-execution.service").ThreadListItem[]; nextCursor: string | null; }>; getThread(req: AuthenticatedRequest<{ projectId: string; threadId: string; }, {}, {}, { agentId?: string; }>): Promise; deleteThread(req: AuthenticatedRequest<{ projectId: string; threadId: string; }>): Promise<{ success: boolean; }>; get(req: AuthenticatedRequest<{ projectId: string; }>, _res: Response, agentId: string): Promise; update(req: AuthenticatedRequest<{ projectId: string; }>, _res: Response, agentId: string, payload: UpdateAgentDto): Promise; delete(req: AuthenticatedRequest<{ projectId: string; }>, _res: Response, agentId: string): Promise<{ success: boolean; }>; publish(req: AuthenticatedRequest<{ projectId: string; }>, _res: Response, agentId: string, payload: PublishAgentDto): Promise; unpublish(req: AuthenticatedRequest<{ projectId: string; }>, _res: Response, agentId: string): Promise; revertToPublished(req: AuthenticatedRequest<{ projectId: string; }>, _res: Response, agentId: string): Promise; chat(req: AuthenticatedRequest<{ projectId: string; }>, res: FlushableResponse, agentId: string, payload: AgentChatMessageDto): Promise; getChatMessages(req: AuthenticatedRequest<{ projectId: string; agentId: string; threadId: string; }>): Promise; getBuilderMessages(req: AuthenticatedRequest<{ projectId: string; agentId: string; }>): Promise; clearBuilderMessages(req: AuthenticatedRequest<{ projectId: string; agentId: string; }>): Promise<{ ok: boolean; }>; getTestChatMessages(req: AuthenticatedRequest<{ projectId: string; agentId: string; }>): Promise; clearTestChatMessages(req: AuthenticatedRequest<{ projectId: string; agentId: string; }>): Promise<{ ok: boolean; }>; build(req: AuthenticatedRequest<{ projectId: string; }>, res: FlushableResponse, agentId: string, payload: AgentChatMessageDto): Promise; buildResume(req: AuthenticatedRequest<{ projectId: string; }>, res: FlushableResponse, agentId: string, payload: AgentBuildResumeDto): Promise; connectIntegration(req: AuthenticatedRequest<{ projectId: string; }>, _res: Response, agentId: string): Promise<{ status: string; }>; createSlackApp(req: AuthenticatedRequest<{ projectId: string; }>, _res: Response, agentId: string, payload: CreateSlackAgentAppDto): Promise; getSlackAppManifest(req: AuthenticatedRequest<{ projectId: string; }>, _res: Response, agentId: string): Promise; handleSlackAppOAuthCallback(req: Request<{ projectId: string; agentId: string; }, unknown, unknown, { code?: string; state?: string; error?: string; error_description?: string; }>, res: Response, agentId: string): Promise; disconnectIntegration(req: AuthenticatedRequest<{ projectId: string; }>, _res: Response, agentId: string, payload: AgentDisconnectIntegrationDto): Promise<{ status: string; }>; getScheduleIntegration(req: AuthenticatedRequest<{ projectId: string; }>, _res: Response, agentId: string): Promise; updateScheduleIntegration(req: AuthenticatedRequest<{ projectId: string; }>, _res: Response, agentId: string, payload: UpdateAgentScheduleDto): Promise; activateScheduleIntegration(req: AuthenticatedRequest<{ projectId: string; }>, _res: Response, agentId: string): Promise; deactivateScheduleIntegration(req: AuthenticatedRequest<{ projectId: string; }>, _res: Response, agentId: string): Promise; integrationStatus(req: AuthenticatedRequest<{ projectId: string; }>, _res: Response, agentId: string): Promise; handleWebhook(req: Request<{ projectId: string; agentId: string; platform: string; }>, res: Response): Promise; }