AI Agents & MCPs & AI Workflow Automation • (~400 MCP servers for AI agents) • AI Automation / AI Agent with MCPs • AI Workflows & AI Agents • MCPs for AI Agents
TypeScript ai-agentai-agent-toolsai-agentsai-agents-frameworkmcpmcp-servermcp-toolsmcpsn8n-alternativeno-code-automationworkflowworkflow-automationworkflows
import { isObject } from '@activepieces/core-utils'
import { BeginAgentTaskRequest, BeginAgentTaskResponse, FinishAgentTaskRequest, SubagentTaskStatus } from '@activepieces/shared'
import { FastifyBaseLogger } from 'fastify'
import { agentTaskService } from '../agent-task-service'
export const taskRpc = (_log: FastifyBaseLogger) => ({
async beginAgentTask(input: BeginAgentTaskRequest): Promise<BeginAgentTaskResponse> {
return agentTaskService.begin(input)
},
async finishAgentTask(input: FinishAgentTaskRequest): Promise<void> {
await agentTaskService.finish({
...input,
status: SubagentTaskStatus[input.status],
messages: input.messages.filter(isObject),
})
},
})