Files
Danny AvilaandHanzo Dev 118e497b39 * WIP: supervisor/hand-off
* chore: test workers and concurrency, remove ESLint configuration and ignore files; add .gitattributes for line endings; introduce scripts for line ending fixes and Zone.Identifier removal

* WIP: first pass, StandardGraph rewrite to align with LangGraph patterns for Multi-Agent Composability

* fix: revert tool end handler changes

* chore: update model var name in StandardGraph's attemptInvoke method

* chore: remove unused PoC graph types

* fix: add 'emitted' flag to prevent manual tool stream double-call, rename single-agent node, optimize empty chunk check

* feat: enhance StandardGraph with new message reducer and system runnable, update LLM configurations

* feat: Introduce AgentContext for managing agent-specific state in multi-agent systems

- Added AgentContext class to encapsulate agent-specific state and configuration.
- Updated Graph and StandardGraph to support multiple agents and their contexts.
- Refactored event handling to utilize AgentContext for provider and token management.
- Modified run and stream handling to accommodate agent-specific configurations.
- Enhanced type definitions for agent inputs and graph configurations.
- Adjusted tool handling to integrate with the new agent context structure.

* fix: update toolsCondition to accept toolNode parameter

* chore: update LLM model from 'gpt-5-mini' to 'gpt-4.1' in llmConfigs

* ci: update tests with new configs

* refactor: AgentContext to calculate tool tokens and update instruction tokens with tokenCounter

* refactor: update agentNode and toolNode declarations to use 'as const' for improved type safety

* chore: update Run and StandardGraph classes to use CompiledStateWorkflow for improved type consistency

* WIP: first pass, multi-agent graph

* chore: update @langchain/core dependency to version 0.3.72

* chore: update @langchain/langgraph dependency to version 0.4.9

* chore: correct type name from CompiledStateWorkflow to CompiledAgentWorkflow in Graph and MultiAgentGraph classes

* chore: remove unused fanout concept code

* chore: improve paralell workflow prompts

* fix: update messages reducer to store result in class property

* feat: introduce promptInstructions feature for dynamic human prompts in multi-agent scenarios

* refactor: update event handler methods to return promises and await them, due to async nature of dispatchCustomEvent, and typing support MultiAgentGraph

* feat: implement custom event handling in Run class

* refactor: streamline edge categorization and enhance fan-in prompt handling in MultiAgentGraph

* chore: cleanup types, imports, comments

* chore: reorder imports for improved readability in MultiAgentGraph

* refactor: remove deprecated createGraphState method and adjust startIndex to be Graph field as defined by initial parent state

* refactor: token management by introducing a singleton token counter and a TokenEncoderManager for better resource control

* chore: remove unused handoff tool example

* chore: bun install

* chore: update version to 3.0.00-rc1 in package.json and types/package.json

* refactor: update edgeType from 'parallel' to 'direct', and add multi-agent-sequence script

* refactor: rename 'parallelEdges' to 'directEdges' and update related comments for clarity in MultiAgentGraph

Co-authored-by: Hanzo Dev <[email protected]>
2025-10-29 15:50:10 -04:00

455 KiB
Executable File