runAgentLoopCore (application/run.ts)

fastgpt · packages/service/core/workflow/dispatch/ai/agentLoopCore/application/run.ts · typescript · Apache-2.0
ai

Runs an agent loop core, collecting events and returning structured results for workflow dispatch.

// Source: https://github.com/labring/fastgpt | License: Apache-2.0 | Copyright 2023 Sealos
// Provided via justclaw.it.com; keep this notice with the code.
import type { AIChatItemValueItemType } from '@fastgpt/global/core/chat/type';
import type {
  AgentLoopInput,
  AgentLoopProviderName,
  AgentLoopRuntime
} from '../../../../../ai/llm/agentLoop/interface';
import { runAgentLoop } from '../../../../../ai/llm/agentLoop/interface';
import { createAgentLoopCoreAssistantEventCollector } from '../adapter/assistantResponses';
import { summarizeAgentLoopCoreResult, type AgentLoopCoreOutputSummary } from './output/result';
import { compactAgentLoopCorePlanSnapshots } from './output/assistantResponses';
import type { AgentLoopCoreResult } from '../domain/result';
import type { AgentLoopCoreTool

... (truncated -- full source via MCP)

See the full source, get the GitHub permalink, and search for more like it.

Get a free API key