@minded-ai/mindedjs 1.0.0-ec2-beta-1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +6 -0
- package/dist/agent.d.ts +256 -0
- package/dist/agent.d.ts.map +1 -0
- package/dist/agent.js +896 -0
- package/dist/agent.js.map +1 -0
- package/dist/browserTask/README.md +419 -0
- package/dist/browserTask/browserAgent.py +632 -0
- package/dist/browserTask/captcha_isolated.png +0 -0
- package/dist/browserTask/executeBrowserTask.d.ts +14 -0
- package/dist/browserTask/executeBrowserTask.d.ts.map +1 -0
- package/dist/browserTask/executeBrowserTask.js +195 -0
- package/dist/browserTask/executeBrowserTask.js.map +1 -0
- package/dist/browserTask/executeBrowserTask.py +153 -0
- package/dist/browserTask/executeBrowserTask.ts +79 -0
- package/dist/browserTask/localBrowserTask.d.ts +49 -0
- package/dist/browserTask/localBrowserTask.d.ts.map +1 -0
- package/dist/browserTask/localBrowserTask.js +284 -0
- package/dist/browserTask/localBrowserTask.js.map +1 -0
- package/dist/browserTask/requirements.txt +8 -0
- package/dist/browserTask/setup.sh +144 -0
- package/dist/browserTask/types.d.ts +35 -0
- package/dist/browserTask/types.d.ts.map +1 -0
- package/dist/browserTask/types.js +10 -0
- package/dist/browserTask/types.js.map +1 -0
- package/dist/checkpointer/checkpointSaverFactory.d.ts +7 -0
- package/dist/checkpointer/checkpointSaverFactory.d.ts.map +1 -0
- package/dist/checkpointer/checkpointSaverFactory.js +53 -0
- package/dist/checkpointer/checkpointSaverFactory.js.map +1 -0
- package/dist/cli/index.d.ts +3 -0
- package/dist/cli/index.d.ts.map +1 -0
- package/dist/cli/index.js +209 -0
- package/dist/cli/index.js.map +1 -0
- package/dist/cli/lambdaHandlerTemplate.d.ts +10 -0
- package/dist/cli/lambdaHandlerTemplate.d.ts.map +1 -0
- package/dist/cli/lambdaHandlerTemplate.js +76 -0
- package/dist/cli/lambdaHandlerTemplate.js.map +1 -0
- package/dist/cli/lambdaHandlerTemplate.ts +78 -0
- package/dist/cli/localOperatorSetup.d.ts +6 -0
- package/dist/cli/localOperatorSetup.d.ts.map +1 -0
- package/dist/cli/localOperatorSetup.js +310 -0
- package/dist/cli/localOperatorSetup.js.map +1 -0
- package/dist/debugging/index.d.ts +2 -0
- package/dist/debugging/index.d.ts.map +1 -0
- package/dist/debugging/index.js +6 -0
- package/dist/debugging/index.js.map +1 -0
- package/dist/debugging/llmCallbackHandler.d.ts +36 -0
- package/dist/debugging/llmCallbackHandler.d.ts.map +1 -0
- package/dist/debugging/llmCallbackHandler.js +101 -0
- package/dist/debugging/llmCallbackHandler.js.map +1 -0
- package/dist/edges/createDirectEdge.d.ts +4 -0
- package/dist/edges/createDirectEdge.d.ts.map +1 -0
- package/dist/edges/createDirectEdge.js +24 -0
- package/dist/edges/createDirectEdge.js.map +1 -0
- package/dist/edges/createLogicalRouter.d.ts +8 -0
- package/dist/edges/createLogicalRouter.d.ts.map +1 -0
- package/dist/edges/createLogicalRouter.js +194 -0
- package/dist/edges/createLogicalRouter.js.map +1 -0
- package/dist/edges/createPromptRouter.d.ts +12 -0
- package/dist/edges/createPromptRouter.d.ts.map +1 -0
- package/dist/edges/createPromptRouter.js +176 -0
- package/dist/edges/createPromptRouter.js.map +1 -0
- package/dist/edges/edgeFactory.d.ts +14 -0
- package/dist/edges/edgeFactory.d.ts.map +1 -0
- package/dist/edges/edgeFactory.js +125 -0
- package/dist/edges/edgeFactory.js.map +1 -0
- package/dist/events/AgentEvents.d.ts +56 -0
- package/dist/events/AgentEvents.d.ts.map +1 -0
- package/dist/events/AgentEvents.js +13 -0
- package/dist/events/AgentEvents.js.map +1 -0
- package/dist/events/index.d.ts +3 -0
- package/dist/events/index.d.ts.map +1 -0
- package/dist/events/index.js +5 -0
- package/dist/events/index.js.map +1 -0
- package/dist/index.d.ts +35 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +98 -0
- package/dist/index.js.map +1 -0
- package/dist/interfaces/zendesk.d.ts +35 -0
- package/dist/interfaces/zendesk.d.ts.map +1 -0
- package/dist/interfaces/zendesk.js +219 -0
- package/dist/interfaces/zendesk.js.map +1 -0
- package/dist/internalTools/appActionRunnerTool.d.ts +5 -0
- package/dist/internalTools/appActionRunnerTool.d.ts.map +1 -0
- package/dist/internalTools/appActionRunnerTool.js +88 -0
- package/dist/internalTools/appActionRunnerTool.js.map +1 -0
- package/dist/internalTools/documentExtraction/documentExtraction.d.ts +129 -0
- package/dist/internalTools/documentExtraction/documentExtraction.d.ts.map +1 -0
- package/dist/internalTools/documentExtraction/documentExtraction.js +736 -0
- package/dist/internalTools/documentExtraction/documentExtraction.js.map +1 -0
- package/dist/internalTools/documentExtraction/types.d.ts +29 -0
- package/dist/internalTools/documentExtraction/types.d.ts.map +1 -0
- package/dist/internalTools/documentExtraction/types.js +35 -0
- package/dist/internalTools/documentExtraction/types.js.map +1 -0
- package/dist/internalTools/libraryActionRunnerTool.d.ts +4 -0
- package/dist/internalTools/libraryActionRunnerTool.d.ts.map +1 -0
- package/dist/internalTools/libraryActionRunnerTool.js +53 -0
- package/dist/internalTools/libraryActionRunnerTool.js.map +1 -0
- package/dist/internalTools/retell.d.ts +12 -0
- package/dist/internalTools/retell.d.ts.map +1 -0
- package/dist/internalTools/retell.js +54 -0
- package/dist/internalTools/retell.js.map +1 -0
- package/dist/internalTools/sendPlaceholderMessage.d.ts +14 -0
- package/dist/internalTools/sendPlaceholderMessage.d.ts.map +1 -0
- package/dist/internalTools/sendPlaceholderMessage.js +61 -0
- package/dist/internalTools/sendPlaceholderMessage.js.map +1 -0
- package/dist/internalTools/timer.d.ts +99 -0
- package/dist/internalTools/timer.d.ts.map +1 -0
- package/dist/internalTools/timer.js +139 -0
- package/dist/internalTools/timer.js.map +1 -0
- package/dist/internalTools/voice/escalateVoiceCall.d.ts +2 -0
- package/dist/internalTools/voice/escalateVoiceCall.d.ts.map +1 -0
- package/dist/internalTools/voice/escalateVoiceCall.js +52 -0
- package/dist/internalTools/voice/escalateVoiceCall.js.map +1 -0
- package/dist/internalTools/voice/retell.d.ts +12 -0
- package/dist/internalTools/voice/retell.d.ts.map +1 -0
- package/dist/internalTools/voice/retell.js +54 -0
- package/dist/internalTools/voice/retell.js.map +1 -0
- package/dist/internalTools/voice/sendPlaceholderMessage.d.ts +14 -0
- package/dist/internalTools/voice/sendPlaceholderMessage.d.ts.map +1 -0
- package/dist/internalTools/voice/sendPlaceholderMessage.js +61 -0
- package/dist/internalTools/voice/sendPlaceholderMessage.js.map +1 -0
- package/dist/interrupts/BaseInterruptSessionManager.d.ts +49 -0
- package/dist/interrupts/BaseInterruptSessionManager.d.ts.map +1 -0
- package/dist/interrupts/BaseInterruptSessionManager.js +34 -0
- package/dist/interrupts/BaseInterruptSessionManager.js.map +1 -0
- package/dist/interrupts/MemoryInterruptSessionManager.d.ts +14 -0
- package/dist/interrupts/MemoryInterruptSessionManager.d.ts.map +1 -0
- package/dist/interrupts/MemoryInterruptSessionManager.js +60 -0
- package/dist/interrupts/MemoryInterruptSessionManager.js.map +1 -0
- package/dist/interrupts/MindedInterruptSessionManager.d.ts +13 -0
- package/dist/interrupts/MindedInterruptSessionManager.d.ts.map +1 -0
- package/dist/interrupts/MindedInterruptSessionManager.js +162 -0
- package/dist/interrupts/MindedInterruptSessionManager.js.map +1 -0
- package/dist/interrupts/interruptSessionManagerFactory.d.ts +3 -0
- package/dist/interrupts/interruptSessionManagerFactory.d.ts.map +1 -0
- package/dist/interrupts/interruptSessionManagerFactory.js +56 -0
- package/dist/interrupts/interruptSessionManagerFactory.js.map +1 -0
- package/dist/llm/createLlmInstance.d.ts +3 -0
- package/dist/llm/createLlmInstance.d.ts.map +1 -0
- package/dist/llm/createLlmInstance.js +31 -0
- package/dist/llm/createLlmInstance.js.map +1 -0
- package/dist/nodes/addAppToolNode.d.ts +13 -0
- package/dist/nodes/addAppToolNode.d.ts.map +1 -0
- package/dist/nodes/addAppToolNode.js +87 -0
- package/dist/nodes/addAppToolNode.js.map +1 -0
- package/dist/nodes/addBrowserTaskNode.d.ts +13 -0
- package/dist/nodes/addBrowserTaskNode.d.ts.map +1 -0
- package/dist/nodes/addBrowserTaskNode.js +167 -0
- package/dist/nodes/addBrowserTaskNode.js.map +1 -0
- package/dist/nodes/addBrowserTaskRunNode.d.ts +13 -0
- package/dist/nodes/addBrowserTaskRunNode.d.ts.map +1 -0
- package/dist/nodes/addBrowserTaskRunNode.js +167 -0
- package/dist/nodes/addBrowserTaskRunNode.js.map +1 -0
- package/dist/nodes/addHumanInTheLoopNode.d.ts +9 -0
- package/dist/nodes/addHumanInTheLoopNode.d.ts.map +1 -0
- package/dist/nodes/addHumanInTheLoopNode.js +22 -0
- package/dist/nodes/addHumanInTheLoopNode.js.map +1 -0
- package/dist/nodes/addJumpToNode.d.ts +7 -0
- package/dist/nodes/addJumpToNode.d.ts.map +1 -0
- package/dist/nodes/addJumpToNode.js +24 -0
- package/dist/nodes/addJumpToNode.js.map +1 -0
- package/dist/nodes/addJunctionNode.d.ts +7 -0
- package/dist/nodes/addJunctionNode.d.ts.map +1 -0
- package/dist/nodes/addJunctionNode.js +20 -0
- package/dist/nodes/addJunctionNode.js.map +1 -0
- package/dist/nodes/addPromptNode.d.ts +18 -0
- package/dist/nodes/addPromptNode.d.ts.map +1 -0
- package/dist/nodes/addPromptNode.js +253 -0
- package/dist/nodes/addPromptNode.js.map +1 -0
- package/dist/nodes/addRpaNode.d.ts +18 -0
- package/dist/nodes/addRpaNode.d.ts.map +1 -0
- package/dist/nodes/addRpaNode.js +180 -0
- package/dist/nodes/addRpaNode.js.map +1 -0
- package/dist/nodes/addToolNode.d.ts +13 -0
- package/dist/nodes/addToolNode.d.ts.map +1 -0
- package/dist/nodes/addToolNode.js +67 -0
- package/dist/nodes/addToolNode.js.map +1 -0
- package/dist/nodes/addToolRunNode.d.ts +17 -0
- package/dist/nodes/addToolRunNode.d.ts.map +1 -0
- package/dist/nodes/addToolRunNode.js +59 -0
- package/dist/nodes/addToolRunNode.js.map +1 -0
- package/dist/nodes/addTriggerNode.d.ts +7 -0
- package/dist/nodes/addTriggerNode.d.ts.map +1 -0
- package/dist/nodes/addTriggerNode.js +25 -0
- package/dist/nodes/addTriggerNode.js.map +1 -0
- package/dist/nodes/compilePrompt.d.ts +5 -0
- package/dist/nodes/compilePrompt.d.ts.map +1 -0
- package/dist/nodes/compilePrompt.js +76 -0
- package/dist/nodes/compilePrompt.js.map +1 -0
- package/dist/nodes/nodeFactory.d.ts +16 -0
- package/dist/nodes/nodeFactory.d.ts.map +1 -0
- package/dist/nodes/nodeFactory.js +45 -0
- package/dist/nodes/nodeFactory.js.map +1 -0
- package/dist/nodes/rpaStepsExecutor.d.ts +5 -0
- package/dist/nodes/rpaStepsExecutor.d.ts.map +1 -0
- package/dist/nodes/rpaStepsExecutor.js +156 -0
- package/dist/nodes/rpaStepsExecutor.js.map +1 -0
- package/dist/platform/config.d.ts +16 -0
- package/dist/platform/config.d.ts.map +1 -0
- package/dist/platform/config.js +80 -0
- package/dist/platform/config.js.map +1 -0
- package/dist/platform/mindedCheckpointSaver.d.ts +10 -0
- package/dist/platform/mindedCheckpointSaver.d.ts.map +1 -0
- package/dist/platform/mindedCheckpointSaver.js +137 -0
- package/dist/platform/mindedCheckpointSaver.js.map +1 -0
- package/dist/platform/mindedConnection.d.ts +15 -0
- package/dist/platform/mindedConnection.d.ts.map +1 -0
- package/dist/platform/mindedConnection.js +254 -0
- package/dist/platform/mindedConnection.js.map +1 -0
- package/dist/platform/mindedConnectionTypes.d.ts +404 -0
- package/dist/platform/mindedConnectionTypes.d.ts.map +1 -0
- package/dist/platform/mindedConnectionTypes.js +51 -0
- package/dist/platform/mindedConnectionTypes.js.map +1 -0
- package/dist/platform/models/mindedChatOpenAI.d.ts +20 -0
- package/dist/platform/models/mindedChatOpenAI.d.ts.map +1 -0
- package/dist/platform/models/mindedChatOpenAI.js +32 -0
- package/dist/platform/models/mindedChatOpenAI.js.map +1 -0
- package/dist/platform/models/parallelWrapper.d.ts +17 -0
- package/dist/platform/models/parallelWrapper.d.ts.map +1 -0
- package/dist/platform/models/parallelWrapper.js +105 -0
- package/dist/platform/models/parallelWrapper.js.map +1 -0
- package/dist/platform/piiGateway/gateway.d.ts +14 -0
- package/dist/platform/piiGateway/gateway.d.ts.map +1 -0
- package/dist/platform/piiGateway/gateway.js +117 -0
- package/dist/platform/piiGateway/gateway.js.map +1 -0
- package/dist/platform/piiGateway/index.d.ts +3 -0
- package/dist/platform/piiGateway/index.d.ts.map +1 -0
- package/dist/platform/piiGateway/index.js +7 -0
- package/dist/platform/piiGateway/index.js.map +1 -0
- package/dist/platform/piiGateway/types.d.ts +27 -0
- package/dist/platform/piiGateway/types.d.ts.map +1 -0
- package/dist/platform/piiGateway/types.js +3 -0
- package/dist/platform/piiGateway/types.js.map +1 -0
- package/dist/platform/toolExecutor.d.ts +29 -0
- package/dist/platform/toolExecutor.d.ts.map +1 -0
- package/dist/platform/toolExecutor.js +84 -0
- package/dist/platform/toolExecutor.js.map +1 -0
- package/dist/platform/utils/parseAttachments.d.ts +14 -0
- package/dist/platform/utils/parseAttachments.d.ts.map +1 -0
- package/dist/platform/utils/parseAttachments.js +53 -0
- package/dist/platform/utils/parseAttachments.js.map +1 -0
- package/dist/platform/utils/tools.d.ts +6 -0
- package/dist/platform/utils/tools.d.ts.map +1 -0
- package/dist/platform/utils/tools.js +57 -0
- package/dist/platform/utils/tools.js.map +1 -0
- package/dist/playbooks/playbooks.d.ts +15 -0
- package/dist/playbooks/playbooks.d.ts.map +1 -0
- package/dist/playbooks/playbooks.js +208 -0
- package/dist/playbooks/playbooks.js.map +1 -0
- package/dist/toolsLibrary/classifier.d.ts +74 -0
- package/dist/toolsLibrary/classifier.d.ts.map +1 -0
- package/dist/toolsLibrary/classifier.js +256 -0
- package/dist/toolsLibrary/classifier.js.map +1 -0
- package/dist/toolsLibrary/extraction.d.ts +83 -0
- package/dist/toolsLibrary/extraction.d.ts.map +1 -0
- package/dist/toolsLibrary/extraction.js +328 -0
- package/dist/toolsLibrary/extraction.js.map +1 -0
- package/dist/toolsLibrary/index.d.ts +9 -0
- package/dist/toolsLibrary/index.d.ts.map +1 -0
- package/dist/toolsLibrary/index.js +46 -0
- package/dist/toolsLibrary/index.js.map +1 -0
- package/dist/toolsLibrary/parseDocument.d.ts +30 -0
- package/dist/toolsLibrary/parseDocument.d.ts.map +1 -0
- package/dist/toolsLibrary/parseDocument.js +119 -0
- package/dist/toolsLibrary/parseDocument.js.map +1 -0
- package/dist/triggers/triggerTypeToDefaultMessage.d.ts +4 -0
- package/dist/triggers/triggerTypeToDefaultMessage.d.ts.map +1 -0
- package/dist/triggers/triggerTypeToDefaultMessage.js +10 -0
- package/dist/triggers/triggerTypeToDefaultMessage.js.map +1 -0
- package/dist/types/Agent.types.d.ts +60 -0
- package/dist/types/Agent.types.d.ts.map +1 -0
- package/dist/types/Agent.types.js +9 -0
- package/dist/types/Agent.types.js.map +1 -0
- package/dist/types/Flows.types.d.ts +232 -0
- package/dist/types/Flows.types.d.ts.map +1 -0
- package/dist/types/Flows.types.js +65 -0
- package/dist/types/Flows.types.js.map +1 -0
- package/dist/types/LLM.types.d.ts +7 -0
- package/dist/types/LLM.types.d.ts.map +1 -0
- package/dist/types/LLM.types.js +11 -0
- package/dist/types/LLM.types.js.map +1 -0
- package/dist/types/LangGraph.types.d.ts +45 -0
- package/dist/types/LangGraph.types.d.ts.map +1 -0
- package/dist/types/LangGraph.types.js +77 -0
- package/dist/types/LangGraph.types.js.map +1 -0
- package/dist/types/Platform.types.d.ts +7 -0
- package/dist/types/Platform.types.d.ts.map +1 -0
- package/dist/types/Platform.types.js +11 -0
- package/dist/types/Platform.types.js.map +1 -0
- package/dist/types/Tools.types.d.ts +26 -0
- package/dist/types/Tools.types.d.ts.map +1 -0
- package/dist/types/Tools.types.js +3 -0
- package/dist/types/Tools.types.js.map +1 -0
- package/dist/types/Voice.types.d.ts +5 -0
- package/dist/types/Voice.types.d.ts.map +1 -0
- package/dist/types/Voice.types.js +3 -0
- package/dist/types/Voice.types.js.map +1 -0
- package/dist/utils/agentUtils.d.ts +5 -0
- package/dist/utils/agentUtils.d.ts.map +1 -0
- package/dist/utils/agentUtils.js +97 -0
- package/dist/utils/agentUtils.js.map +1 -0
- package/dist/utils/extractStateMemoryResponse.d.ts +5 -0
- package/dist/utils/extractStateMemoryResponse.d.ts.map +1 -0
- package/dist/utils/extractStateMemoryResponse.js +91 -0
- package/dist/utils/extractStateMemoryResponse.js.map +1 -0
- package/dist/utils/history.d.ts +4 -0
- package/dist/utils/history.d.ts.map +1 -0
- package/dist/utils/history.js +33 -0
- package/dist/utils/history.js.map +1 -0
- package/dist/utils/logger.d.ts +3 -0
- package/dist/utils/logger.d.ts.map +1 -0
- package/dist/utils/logger.js +39 -0
- package/dist/utils/logger.js.map +1 -0
- package/dist/utils/schemaUtils.d.ts +15 -0
- package/dist/utils/schemaUtils.d.ts.map +1 -0
- package/dist/utils/schemaUtils.js +56 -0
- package/dist/utils/schemaUtils.js.map +1 -0
- package/dist/utils/wait.d.ts +2 -0
- package/dist/utils/wait.d.ts.map +1 -0
- package/dist/utils/wait.js +6 -0
- package/dist/utils/wait.js.map +1 -0
- package/dist/voice/elevenLabsUtils.d.ts +65 -0
- package/dist/voice/elevenLabsUtils.d.ts.map +1 -0
- package/dist/voice/elevenLabsUtils.js +4 -0
- package/dist/voice/elevenLabsUtils.js.map +1 -0
- package/dist/voice/voiceSession.d.ts +37 -0
- package/dist/voice/voiceSession.d.ts.map +1 -0
- package/dist/voice/voiceSession.js +306 -0
- package/dist/voice/voiceSession.js.map +1 -0
- package/docs/.gitbook/assets/ADLC.png +0 -0
- package/docs/.gitbook/assets/PII-masking.png +0 -0
- package/docs/.gitbook/assets/image.png +0 -0
- package/docs/.gitbook/assets/on-prem.svg +4 -0
- package/docs/README.md +54 -0
- package/docs/SUMMARY.md +56 -0
- package/docs/examples/order-refund-flow.md +566 -0
- package/docs/getting-started/environment-configuration.md +158 -0
- package/docs/getting-started/installation.md +44 -0
- package/docs/getting-started/project-configuration.md +206 -0
- package/docs/getting-started/quick-start.md +262 -0
- package/docs/integrations/zendesk.md +554 -0
- package/docs/low-code-editor/edges.md +396 -0
- package/docs/low-code-editor/flows.md +74 -0
- package/docs/low-code-editor/nodes.md +367 -0
- package/docs/low-code-editor/playbooks.md +280 -0
- package/docs/low-code-editor/tools.md +358 -0
- package/docs/low-code-editor/triggers.md +182 -0
- package/docs/platform/on-prem.md +182 -0
- package/docs/platform/operator.md +89 -0
- package/docs/platform/pii-masking.md +221 -0
- package/docs/platform/scenarios.md +43 -0
- package/docs/platform/secrets.md +99 -0
- package/docs/platform/sso.md +27 -0
- package/docs/resources/your-first-eval.md +108 -0
- package/docs/sdk/agent-api.md +540 -0
- package/docs/sdk/debugging.md +80 -0
- package/docs/sdk/events.md +595 -0
- package/docs/sdk/logging.md +72 -0
- package/docs/sdk/memory.md +271 -0
- package/docs/sdk/parallel-llm.md +242 -0
- package/docs/sdk/vectorstore-query.md +60 -0
- package/docs/tooling/classifier.md +217 -0
- package/docs/tooling/document-processing.md +389 -0
- package/docs/tooling/extraction.md +78 -0
- package/docs/tooling/timers.md +61 -0
- package/package.json +73 -0
- package/src/agent.ts +1019 -0
- package/src/browserTask/executeBrowserTask.py +153 -0
- package/src/browserTask/executeBrowserTask.ts +253 -0
- package/src/browserTask/localBrowserTask.ts +300 -0
- package/src/browserTask/profile/Default/Extension Rules/000003.log +0 -0
- package/src/browserTask/profile/Default/Extension Scripts/000003.log +0 -0
- package/src/browserTask/profile/Default/Extension State/000003.log +0 -0
- package/src/browserTask/profile/Default/GCM Store/000003.log +0 -0
- package/src/browserTask/profile/Default/Local Storage/leveldb/000004.log +0 -0
- package/src/browserTask/profile/Default/Session Storage/000003.log +0 -0
- package/src/browserTask/profile/Default/Site Characteristics Database/000003.log +0 -0
- package/src/browserTask/profile/Default/Sync Data/LevelDB/000003.log +0 -0
- package/src/browserTask/profile/Default/shared_proto_db/000003.log +0 -0
- package/src/browserTask/profile/Default/shared_proto_db/metadata/000003.log +0 -0
- package/src/browserTask/types.ts +37 -0
- package/src/checkpointer/checkpointSaverFactory.ts +18 -0
- package/src/cli/index.ts +188 -0
- package/src/cli/lambdaHandlerTemplate.ts +78 -0
- package/src/cli/localOperatorSetup.ts +308 -0
- package/src/debugging/index.ts +1 -0
- package/src/debugging/llmCallbackHandler.ts +125 -0
- package/src/edges/createDirectEdge.ts +22 -0
- package/src/edges/createLogicalRouter.ts +182 -0
- package/src/edges/createPromptRouter.ts +213 -0
- package/src/edges/edgeFactory.ts +167 -0
- package/src/events/AgentEvents.ts +58 -0
- package/src/events/index.ts +3 -0
- package/src/index.ts +105 -0
- package/src/interfaces/zendesk.ts +212 -0
- package/src/internalTools/appActionRunnerTool.ts +68 -0
- package/src/internalTools/documentExtraction/documentExtraction.ts +804 -0
- package/src/internalTools/documentExtraction/types.ts +59 -0
- package/src/internalTools/libraryActionRunnerTool.ts +62 -0
- package/src/internalTools/timer.ts +125 -0
- package/src/internalTools/voice/escalateVoiceCall.ts +15 -0
- package/src/internalTools/voice/retell.ts +28 -0
- package/src/internalTools/voice/sendPlaceholderMessage.ts +27 -0
- package/src/interrupts/BaseInterruptSessionManager.ts +80 -0
- package/src/interrupts/MemoryInterruptSessionManager.ts +63 -0
- package/src/interrupts/MindedInterruptSessionManager.ts +163 -0
- package/src/interrupts/interruptSessionManagerFactory.ts +20 -0
- package/src/llm/createLlmInstance.ts +33 -0
- package/src/nodes/addAppToolNode.ts +111 -0
- package/src/nodes/addBrowserTaskNode.ts +191 -0
- package/src/nodes/addBrowserTaskRunNode.ts +190 -0
- package/src/nodes/addHumanInTheLoopNode.ts +26 -0
- package/src/nodes/addJumpToNode.ts +26 -0
- package/src/nodes/addJunctionNode.ts +21 -0
- package/src/nodes/addPromptNode.ts +305 -0
- package/src/nodes/addRpaNode.ts +217 -0
- package/src/nodes/addToolNode.ts +84 -0
- package/src/nodes/addToolRunNode.ts +80 -0
- package/src/nodes/addTriggerNode.ts +27 -0
- package/src/nodes/compilePrompt.ts +44 -0
- package/src/nodes/nodeFactory.ts +61 -0
- package/src/nodes/rpaStepsExecutor.ts +175 -0
- package/src/platform/config.ts +89 -0
- package/src/platform/mindedCheckpointSaver.ts +146 -0
- package/src/platform/mindedConnection.ts +250 -0
- package/src/platform/mindedConnectionTypes.ts +495 -0
- package/src/platform/models/mindedChatOpenAI.ts +49 -0
- package/src/platform/models/parallelWrapper.ts +141 -0
- package/src/platform/piiGateway/gateway.ts +103 -0
- package/src/platform/piiGateway/index.ts +5 -0
- package/src/platform/piiGateway/types.ts +29 -0
- package/src/platform/toolExecutor.ts +106 -0
- package/src/platform/utils/parseAttachments.ts +56 -0
- package/src/platform/utils/tools.ts +55 -0
- package/src/playbooks/playbooks.ts +200 -0
- package/src/toolsLibrary/classifier.ts +326 -0
- package/src/toolsLibrary/extraction.ts +393 -0
- package/src/toolsLibrary/index.ts +10 -0
- package/src/toolsLibrary/parseDocument.ts +129 -0
- package/src/triggers/triggerTypeToDefaultMessage.ts +9 -0
- package/src/types/Agent.types.ts +73 -0
- package/src/types/Flows.types.ts +262 -0
- package/src/types/LLM.types.ts +15 -0
- package/src/types/LangGraph.types.ts +86 -0
- package/src/types/Platform.types.ts +6 -0
- package/src/types/Tools.types.ts +28 -0
- package/src/types/Voice.types.ts +4 -0
- package/src/utils/agentUtils.ts +69 -0
- package/src/utils/history.ts +38 -0
- package/src/utils/logger.ts +38 -0
- package/src/utils/schemaUtils.ts +68 -0
- package/src/utils/wait.ts +1 -0
- package/src/voice/elevenLabsUtils.ts +81 -0
- package/src/voice/voiceSession.ts +309 -0
|
@@ -0,0 +1,396 @@
|
|
|
1
|
+
# Edges
|
|
2
|
+
|
|
3
|
+
Edges are the **routing logic** that connects nodes in your MindedJS flows. They determine how your agent moves through the workflow, making intelligent decisions about which path to take based on different conditions and contexts.
|
|
4
|
+
|
|
5
|
+
## What are Edges?
|
|
6
|
+
|
|
7
|
+
Edges define the **transitions between nodes** in your flow. Each edge specifies:
|
|
8
|
+
|
|
9
|
+
- **Source** - The starting node
|
|
10
|
+
- **Target** - The destination node
|
|
11
|
+
- **Type** - The routing logic type
|
|
12
|
+
- **Condition** - The criteria for taking this path
|
|
13
|
+
- **Prompt** - The prompt for the LLM to make a decision
|
|
14
|
+
|
|
15
|
+
```yaml
|
|
16
|
+
edges:
|
|
17
|
+
- source: Customer Support Request
|
|
18
|
+
target: Classify Issue
|
|
19
|
+
type: stepForward
|
|
20
|
+
|
|
21
|
+
- source: Classify Issue
|
|
22
|
+
target: Technical Support
|
|
23
|
+
type: promptCondition
|
|
24
|
+
prompt: 'Is this a technical issue requiring troubleshooting?'
|
|
25
|
+
|
|
26
|
+
- source: Classify Issue
|
|
27
|
+
target: Billing Support
|
|
28
|
+
type: logicalCondition
|
|
29
|
+
condition: "state.memory.issueCategory === 'billing'"
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
## Edge Types
|
|
33
|
+
|
|
34
|
+
MindedJS provides three types of edges for different routing scenarios:
|
|
35
|
+
|
|
36
|
+
| Edge Type | Purpose | When to Use |
|
|
37
|
+
| --------------------------------------------------------- | ------------- | ------------------------------------------------ |
|
|
38
|
+
| [**Step Forward**](edges.md#step-forward-edges) | Unconditional | Sequential processing, guaranteed transitions |
|
|
39
|
+
| [**Prompt Condition**](edges.md#prompt-condition-edges) | LLM-based | Intelligent routing based on context and content |
|
|
40
|
+
| [**Logical Condition**](edges.md#logical-condition-edges) | Code-based | Deterministic routing based on memory/data |
|
|
41
|
+
|
|
42
|
+
## Step Forward Edges
|
|
43
|
+
|
|
44
|
+
Step forward edges create **unconditional transitions** between nodes. They're useful for sequential processing where you always want to move to the next step.
|
|
45
|
+
|
|
46
|
+
```yaml
|
|
47
|
+
- source: Customer Support Request
|
|
48
|
+
target: Support Agent
|
|
49
|
+
type: stepForward
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
**Use Cases:** Data transformation pipelines, required validation steps, guaranteed notifications, logging and audit trails.
|
|
53
|
+
|
|
54
|
+
## Prompt Condition Edges
|
|
55
|
+
|
|
56
|
+
Prompt condition edges use **language models** to make intelligent routing decisions based on conversation context, memory state, and complex reasoning.
|
|
57
|
+
|
|
58
|
+
```yaml
|
|
59
|
+
- source: Support Agent
|
|
60
|
+
target: Escalate to Human
|
|
61
|
+
type: promptCondition
|
|
62
|
+
prompt: 'Based on the conversation, should this be escalated to a human agent?'
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
### Context-Aware Routing
|
|
66
|
+
|
|
67
|
+
```yaml
|
|
68
|
+
- source: Customer Service Bot
|
|
69
|
+
target: VIP Support
|
|
70
|
+
type: promptCondition
|
|
71
|
+
prompt: |
|
|
72
|
+
Should this customer be routed to VIP support?
|
|
73
|
+
|
|
74
|
+
Consider:
|
|
75
|
+
- Customer tier: {{memory.customerTier}}
|
|
76
|
+
- Issue severity: {{memory.issueSeverity}}
|
|
77
|
+
- Previous escalations: {{memory.previousEscalations}}
|
|
78
|
+
- Current sentiment: (analyze from conversation)
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
### Multi-Path Routing
|
|
82
|
+
|
|
83
|
+
```yaml
|
|
84
|
+
# Route to different specialists based on issue type
|
|
85
|
+
- source: Issue Classifier
|
|
86
|
+
target: Technical Support
|
|
87
|
+
type: promptCondition
|
|
88
|
+
prompt: 'Is this a technical/software issue requiring troubleshooting?'
|
|
89
|
+
|
|
90
|
+
- source: Issue Classifier
|
|
91
|
+
target: Billing Support
|
|
92
|
+
type: promptCondition
|
|
93
|
+
prompt: 'Is this a billing, payment, or account-related issue?'
|
|
94
|
+
|
|
95
|
+
- source: Issue Classifier
|
|
96
|
+
target: General Support
|
|
97
|
+
type: promptCondition
|
|
98
|
+
prompt: "Is this a general inquiry that doesn't fit other categories?"
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
## Logical Condition Edges
|
|
102
|
+
|
|
103
|
+
Logical condition edges use **JavaScript expressions** to make deterministic routing decisions based on memory state, providing precise control over flow logic.
|
|
104
|
+
|
|
105
|
+
```yaml
|
|
106
|
+
- source: Order Lookup
|
|
107
|
+
target: Refund Processing
|
|
108
|
+
type: logicalCondition
|
|
109
|
+
condition: "state.memory.orderStatus === 'delivered'"
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
### How Condition Expressions Work
|
|
113
|
+
|
|
114
|
+
The condition field accepts a **JavaScript expression** that will be evaluated to determine if the edge should be taken. The expression has access to the current agent state through the `state` variable.
|
|
115
|
+
|
|
116
|
+
The condition is automatically wrapped in a function that provides the state context:
|
|
117
|
+
|
|
118
|
+
```javascript
|
|
119
|
+
// Your condition: state.memory.orderStatus === 'delivered'
|
|
120
|
+
// Becomes:
|
|
121
|
+
(function ({ state }) {
|
|
122
|
+
return state.memory.orderStatus === 'delivered';
|
|
123
|
+
});
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
### Supported Expression Types
|
|
127
|
+
|
|
128
|
+
#### Simple Comparisons
|
|
129
|
+
|
|
130
|
+
```yaml
|
|
131
|
+
# Equality check
|
|
132
|
+
condition: "state.memory.status === 'active'"
|
|
133
|
+
|
|
134
|
+
# Numeric comparison
|
|
135
|
+
condition: "state.memory.orderValue > 1000"
|
|
136
|
+
|
|
137
|
+
# String comparison
|
|
138
|
+
condition: "state.memory.customerTier !== 'basic'"
|
|
139
|
+
|
|
140
|
+
# Boolean check
|
|
141
|
+
condition: "state.memory.isVerified"
|
|
142
|
+
condition: "!state.memory.hasErrors"
|
|
143
|
+
```
|
|
144
|
+
|
|
145
|
+
#### Complex Expressions
|
|
146
|
+
|
|
147
|
+
```yaml
|
|
148
|
+
# Multiple conditions with AND
|
|
149
|
+
condition: "state.memory.orderValue > 500 && state.memory.customerAge < 30"
|
|
150
|
+
|
|
151
|
+
# OR conditions
|
|
152
|
+
condition: "state.memory.priority === 'high' || state.memory.customerTier === 'vip'"
|
|
153
|
+
|
|
154
|
+
# Nested property access
|
|
155
|
+
condition: "state.memory.order.items.length > 5"
|
|
156
|
+
|
|
157
|
+
# Array methods
|
|
158
|
+
condition: "state.memory.tags.includes('urgent')"
|
|
159
|
+
|
|
160
|
+
# String methods
|
|
161
|
+
condition: "state.memory.email.endsWith('@company.com')"
|
|
162
|
+
```
|
|
163
|
+
|
|
164
|
+
#### Advanced JavaScript Operations
|
|
165
|
+
|
|
166
|
+
```yaml
|
|
167
|
+
# Ternary operators
|
|
168
|
+
condition: "state.memory.score > 80 ? state.memory.level === 'expert' : state.memory.level === 'beginner'"
|
|
169
|
+
|
|
170
|
+
# Date comparisons
|
|
171
|
+
condition: "new Date(state.memory.orderDate) < new Date()"
|
|
172
|
+
|
|
173
|
+
# Regular expressions
|
|
174
|
+
condition: "/^[A-Z]{2}\\d{4}$/.test(state.memory.orderId)"
|
|
175
|
+
|
|
176
|
+
# Math operations
|
|
177
|
+
condition: "Math.abs(state.memory.temperature - 72) < 5"
|
|
178
|
+
|
|
179
|
+
# JSON operations
|
|
180
|
+
condition: "JSON.parse(state.memory.configString).enabled === true"
|
|
181
|
+
```
|
|
182
|
+
|
|
183
|
+
### Available Context
|
|
184
|
+
|
|
185
|
+
Your condition expressions have access to:
|
|
186
|
+
|
|
187
|
+
- **state**: The full agent state object (access as `state.memory`, `state.messages`, etc.)
|
|
188
|
+
- **Standard JavaScript globals**: `Math`, `Date`, `JSON`, `console`
|
|
189
|
+
- **String/Array/Object methods**: All standard JavaScript methods
|
|
190
|
+
|
|
191
|
+
#### Accessing State Properties
|
|
192
|
+
|
|
193
|
+
```yaml
|
|
194
|
+
# Access memory through state
|
|
195
|
+
condition: "state.memory.orderStatus === 'pending'"
|
|
196
|
+
|
|
197
|
+
# Access messages
|
|
198
|
+
condition: "state.messages.length > 10"
|
|
199
|
+
|
|
200
|
+
# Access other state properties
|
|
201
|
+
condition: "state.conversationId && state.memory.isAuthenticated"
|
|
202
|
+
```
|
|
203
|
+
|
|
204
|
+
**Note:** For security, the following are NOT available:
|
|
205
|
+
|
|
206
|
+
- `process`, `require`, `global`, `Buffer`
|
|
207
|
+
- File system or network operations
|
|
208
|
+
- Module imports
|
|
209
|
+
|
|
210
|
+
### Memory-Based Routing
|
|
211
|
+
|
|
212
|
+
```yaml
|
|
213
|
+
# Route based on customer tier
|
|
214
|
+
- source: Customer Routing
|
|
215
|
+
target: Premium Support
|
|
216
|
+
type: logicalCondition
|
|
217
|
+
condition: "state.memory.customerTier === 'premium'"
|
|
218
|
+
|
|
219
|
+
# Route based on order value
|
|
220
|
+
- source: Order Processing
|
|
221
|
+
target: Manual Review
|
|
222
|
+
type: logicalCondition
|
|
223
|
+
condition: 'state.memory.orderValue > 1000'
|
|
224
|
+
```
|
|
225
|
+
|
|
226
|
+
### Complex Logic Conditions
|
|
227
|
+
|
|
228
|
+
```yaml
|
|
229
|
+
# Multiple conditions with AND logic
|
|
230
|
+
- source: Payment Processor
|
|
231
|
+
target: Fraud Check
|
|
232
|
+
type: logicalCondition
|
|
233
|
+
condition: |
|
|
234
|
+
state.memory.orderValue > 500 &&
|
|
235
|
+
state.memory.customerAge < 30 &&
|
|
236
|
+
state.memory.shippingCountry !== state.memory.billingCountry
|
|
237
|
+
|
|
238
|
+
# Date-based conditions
|
|
239
|
+
- source: Order Validator
|
|
240
|
+
target: Late Order Handler
|
|
241
|
+
type: logicalCondition
|
|
242
|
+
condition: |
|
|
243
|
+
(Date.now() - new Date(state.memory.orderDate).getTime()) / (1000 * 60 * 60 * 24) > 30
|
|
244
|
+
```
|
|
245
|
+
|
|
246
|
+
### Debugging Logical Conditions
|
|
247
|
+
|
|
248
|
+
For comprehensive debugging of logical conditions, see the [Debugging Guide](../sdk/debugging.md#debugging-logical-conditions).
|
|
249
|
+
|
|
250
|
+
## Edge Evaluation Order
|
|
251
|
+
|
|
252
|
+
When multiple edges exist from the same source node, MindedJS evaluates them by **edge type priority**, not declaration order:
|
|
253
|
+
|
|
254
|
+
### Priority System
|
|
255
|
+
|
|
256
|
+
| Priority | Edge Type | Behavior |
|
|
257
|
+
| -------- | ------------------ | ------------------------------------------------------- |
|
|
258
|
+
| **1st** | `stepForward` | Always executes first (max 1 per source) |
|
|
259
|
+
| **2nd** | `logicalCondition` | Executes if no step forward edge |
|
|
260
|
+
| **3rd** | `promptCondition` | Executes if no step forward and logical conditions fail |
|
|
261
|
+
|
|
262
|
+
```yaml
|
|
263
|
+
# Priority-based evaluation regardless of declaration order
|
|
264
|
+
edges:
|
|
265
|
+
- source: Decision Node
|
|
266
|
+
target: AI Router # 3rd priority: Only if logical fails
|
|
267
|
+
type: promptCondition
|
|
268
|
+
prompt: 'Which handler should process this request?'
|
|
269
|
+
|
|
270
|
+
- source: Decision Node
|
|
271
|
+
target: Default Handler # 1st priority: Always executes
|
|
272
|
+
type: stepForward
|
|
273
|
+
|
|
274
|
+
- source: Decision Node
|
|
275
|
+
target: High Priority # 2nd priority: Checked if no stepForward are present
|
|
276
|
+
type: logicalCondition
|
|
277
|
+
condition: "state.memory.priority === 'high'"
|
|
278
|
+
```
|
|
279
|
+
|
|
280
|
+
### Logical Condition Order
|
|
281
|
+
|
|
282
|
+
Within logical condition edges from the same source, evaluation follows **declaration order**:
|
|
283
|
+
|
|
284
|
+
```yaml
|
|
285
|
+
edges:
|
|
286
|
+
# Logical conditions evaluated in declaration order: 1 -> 2 -> 3
|
|
287
|
+
- source: Order Processor
|
|
288
|
+
target: VIP Handler # 1st: Checked first
|
|
289
|
+
type: logicalCondition
|
|
290
|
+
condition: "state.memory.customerTier === 'vip'"
|
|
291
|
+
|
|
292
|
+
- source: Order Processor
|
|
293
|
+
target: Large Order # 2nd: Checked if VIP fails
|
|
294
|
+
type: logicalCondition
|
|
295
|
+
condition: 'state.memory.orderValue > 1000'
|
|
296
|
+
|
|
297
|
+
- source: Order Processor
|
|
298
|
+
target: Standard Handler # 3rd: Checked if both above fail
|
|
299
|
+
type: logicalCondition
|
|
300
|
+
condition: 'true' # Fallback condition
|
|
301
|
+
```
|
|
302
|
+
|
|
303
|
+
### Mixed Edge Example
|
|
304
|
+
|
|
305
|
+
```yaml
|
|
306
|
+
edges:
|
|
307
|
+
# This stepForward will ALWAYS execute first, regardless of order
|
|
308
|
+
- source: Payment Processor
|
|
309
|
+
target: Success Page
|
|
310
|
+
type: stepForward
|
|
311
|
+
|
|
312
|
+
# These will never execute because stepForward takes priority
|
|
313
|
+
- source: Payment Processor
|
|
314
|
+
target: Error Handler
|
|
315
|
+
type: logicalCondition
|
|
316
|
+
condition: "state.memory.status === 'error'"
|
|
317
|
+
|
|
318
|
+
- source: Payment Processor
|
|
319
|
+
target: AI Router
|
|
320
|
+
type: promptCondition
|
|
321
|
+
prompt: 'Should we route to error handling?'
|
|
322
|
+
```
|
|
323
|
+
|
|
324
|
+
## Advanced Patterns
|
|
325
|
+
|
|
326
|
+
### Fallback Chains
|
|
327
|
+
|
|
328
|
+
```yaml
|
|
329
|
+
# Try specific handlers first, fall back to general
|
|
330
|
+
- source: Issue Classifier
|
|
331
|
+
target: Billing Specialist
|
|
332
|
+
type: logicalCondition
|
|
333
|
+
condition: "state.memory.issueType === 'billing'"
|
|
334
|
+
|
|
335
|
+
- source: Issue Classifier
|
|
336
|
+
target: General Support
|
|
337
|
+
type: stepForward # Fallback for any unmatched cases
|
|
338
|
+
```
|
|
339
|
+
|
|
340
|
+
### Error Handling
|
|
341
|
+
|
|
342
|
+
```yaml
|
|
343
|
+
- source: Payment Processor
|
|
344
|
+
target: Success Handler
|
|
345
|
+
type: logicalCondition
|
|
346
|
+
condition: "state.memory.paymentStatus === 'success'"
|
|
347
|
+
|
|
348
|
+
- source: Payment Processor
|
|
349
|
+
target: Failure Handler
|
|
350
|
+
type: logicalCondition
|
|
351
|
+
condition: "state.memory.paymentStatus === 'failed' || state.memory.retryCount >= 3"
|
|
352
|
+
```
|
|
353
|
+
|
|
354
|
+
## Best Practices
|
|
355
|
+
|
|
356
|
+
### Use the Right Edge Type
|
|
357
|
+
|
|
358
|
+
- **stepForward** for guaranteed transitions
|
|
359
|
+
- **logicalCondition** for deterministic rules
|
|
360
|
+
- **promptCondition** for complex reasoning
|
|
361
|
+
|
|
362
|
+
### Order Edges Strategically
|
|
363
|
+
|
|
364
|
+
```yaml
|
|
365
|
+
# Most specific conditions first
|
|
366
|
+
edges:
|
|
367
|
+
- source: Router
|
|
368
|
+
target: Emergency Handler
|
|
369
|
+
type: logicalCondition
|
|
370
|
+
condition: "state.memory.priority === 'emergency'"
|
|
371
|
+
|
|
372
|
+
- source: Router
|
|
373
|
+
target: Standard Handler
|
|
374
|
+
type: stepForward # Catch-all last
|
|
375
|
+
```
|
|
376
|
+
|
|
377
|
+
### Always Provide Fallback Paths
|
|
378
|
+
|
|
379
|
+
```yaml
|
|
380
|
+
- source: Data Processor
|
|
381
|
+
target: Success Handler
|
|
382
|
+
type: logicalCondition
|
|
383
|
+
condition: "state.memory.status === 'success'"
|
|
384
|
+
|
|
385
|
+
- source: Data Processor
|
|
386
|
+
target: Failure Handler
|
|
387
|
+
type: stepForward # Handles any unexpected states
|
|
388
|
+
```
|
|
389
|
+
|
|
390
|
+
## Next Steps
|
|
391
|
+
|
|
392
|
+
- [**Tools**](tools.md) - Build powerful functions that your edges can route to
|
|
393
|
+
- [**Memory Types**](../platform/memory.md) - Design state that supports effective routing
|
|
394
|
+
- [**Implementation Examples**](../implementation-examples/edge-examples.md) - See complete edge examples
|
|
395
|
+
|
|
396
|
+
Master edges to create intelligent, responsive flows that adapt to any situation! 🔄
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
# Flows
|
|
2
|
+
|
|
3
|
+
Flows are the **core orchestration mechanism** in MindedJS that define how your AI agent processes conversations through a series of connected nodes. A flow represents a complete run of an AI agent that handles user interactions from trigger to completion.
|
|
4
|
+
|
|
5
|
+
## What are Flows?
|
|
6
|
+
|
|
7
|
+
Flows define the **conversation logic** and **decision-making pathways** for your AI agent. Each flow consists of:
|
|
8
|
+
|
|
9
|
+
* **Nodes** - Processing units that handle specific tasks
|
|
10
|
+
* **Edges** - Routing logic that connects nodes
|
|
11
|
+
* **Memory** - Shared state that persists throughout the flow
|
|
12
|
+
* **Configuration** - Settings that control flow behavior
|
|
13
|
+
|
|
14
|
+
```yaml
|
|
15
|
+
name: Customer Support Flow
|
|
16
|
+
nodes:
|
|
17
|
+
- type: trigger
|
|
18
|
+
triggerType: manual
|
|
19
|
+
name: Customer Request
|
|
20
|
+
|
|
21
|
+
- type: promptNode
|
|
22
|
+
name: Support Agent
|
|
23
|
+
prompt: |
|
|
24
|
+
You are a helpful customer support agent.
|
|
25
|
+
Assist the customer with their inquiry.
|
|
26
|
+
llmConfig:
|
|
27
|
+
name: ChatOpenAI
|
|
28
|
+
properties:
|
|
29
|
+
model: gpt-4o
|
|
30
|
+
|
|
31
|
+
edges:
|
|
32
|
+
- source: Customer Request
|
|
33
|
+
target: Support Agent
|
|
34
|
+
type: stepForward
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
## Flow Components Overview
|
|
38
|
+
|
|
39
|
+
| Component | Purpose | Description |
|
|
40
|
+
| ------------------------------------------------ | ---------- | ---------------------------------------------------- |
|
|
41
|
+
| [**Nodes**](nodes.md) | Processing | Handle specific tasks like LLM calls, tool execution |
|
|
42
|
+
| [**Edges**](edges.md) | Routing | Define transitions and decision logic between nodes |
|
|
43
|
+
| [**Memory**](../platform/memory.md) | State | Shared context that persists throughout the flow |
|
|
44
|
+
| [**Configuration**](flows.md#flow-configuration) | Settings | Flow-level settings and metadata |
|
|
45
|
+
|
|
46
|
+
## Basic Flow Structure
|
|
47
|
+
|
|
48
|
+
Every flow follows this YAML structure:
|
|
49
|
+
|
|
50
|
+
```yaml
|
|
51
|
+
name: Flow Name # Required: Human-readable flow identifier
|
|
52
|
+
nodes: # Required: Array of processing nodes
|
|
53
|
+
- type: trigger # Node type
|
|
54
|
+
name: Node Name # Unique node identifier
|
|
55
|
+
# ... node-specific config
|
|
56
|
+
|
|
57
|
+
edges: # Required: Array of routing connections
|
|
58
|
+
- source: Source Node # Source node name
|
|
59
|
+
target: Target Node # Target node name
|
|
60
|
+
type: stepForward # Edge type
|
|
61
|
+
# ... edge-specific config
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
## Nodes in Flows
|
|
65
|
+
|
|
66
|
+
Flows orchestrate different types of nodes to handle various aspects of conversation processing. For detailed information about each node type, see the [**Nodes documentation**](nodes.md).
|
|
67
|
+
|
|
68
|
+
## Edges in Flows
|
|
69
|
+
|
|
70
|
+
Edges define how your flow moves between nodes based on different conditions. For comprehensive information about edge types and routing logic, see the [**Edges documentation**](edges.md).
|
|
71
|
+
|
|
72
|
+
## Memory in Flows
|
|
73
|
+
|
|
74
|
+
Memory provides shared state that persists throughout flow execution, allowing nodes to access and modify data from previous steps.
|