Skip to content

Feature/360 add function references#387

Merged
felix-schultz merged 7 commits intodevfrom
feature/360-add-function-references
Nov 16, 2025
Merged

Feature/360 add function references#387
felix-schultz merged 7 commits intodevfrom
feature/360-add-function-references

Conversation

@felix-schultz
Copy link
Copy Markdown
Member

Added function references. Mainly used for agentic behavior or dispatches.

This pull request refactors the agent and event node logic in the catalog package to improve how agent nodes reference and interact with function nodes, and to streamline event node organization. The most significant changes include removing the legacy api_event node, enhancing the SimpleAgentNode to dynamically generate tool schemas from referenced function nodes, and cleaning up unused input/output pins and update logic. These changes make agent nodes more flexible and maintainable while simplifying the event node structure.

Agent node improvements:

  • Added a new method generate_tool_from_function to SimpleAgentNode that dynamically generates OpenAI tool/function schemas from referenced function nodes, improving integration and reducing manual schema management.
  • Changed the agent node to get its tools from referenced function nodes instead of a static JSON input pin, and removed related input/output pins (tools, tool_call_id, tool_call_args). This also removes the need for complex pin update logic. [1] [2] [3] [4]
  • Updated the agent node execution flow to set arguments directly on referenced function nodes and trigger them via sub-contexts, instead of activating/deactivating execution pins. [1] [2]

Event node cleanup:

  • Removed the legacy api_event node implementation and its module registration, simplifying the event node structure. [1] [2]
  • Marked the chat event node as able to be referenced by functions, improving composability.

Miscellaneous:

  • Cleaned up unused imports and code, such as removing HashSet from agent node logic.

These changes collectively improve modularity, maintainability, and extensibility for agents and events in the catalog.

- Updated various interfaces to use more specific types (e.g., changed `IDataType` to `IVariableType`).
- Renamed interfaces for better clarity (e.g., `ICommentValue` to `IComment`, `IScoresObject` to `INodeScores`).
- Changed array types from `any[]` to more specific types (e.g., `number[]`).
- Consolidated timestamp interfaces into a single `ISystemTime` interface.
- Improved documentation comments for better understanding of score categories.
- Updated the schema generation script to handle type deduplication and shared types more effectively.
- Ensured consistent naming conventions across interfaces and enums.
- Adjusted the handling of optional properties and default values in interfaces.
…ge with improved path handling and animations; update global CSS for new animations; modify flow-board-utils for connection type differentiation
…erenced_functions method in ExecutionContext for retrieving referenced nodes; streamline tool generation and execution logic
- Added `fnRefsHash` to `FlowNode` type for efficient tracking of function references.
- Implemented memoization for connection states in `FlowNodeInner` to optimize rendering based on function reference connections.
- Introduced new helper functions in `flow-board-helpers.ts` to manage function reference connections and regular pin connections.
- Updated `handlePlaceNode` and `handlePlacePlaceholder` to support function reference connections when placing nodes.
- Enhanced `handleConnection` and `handleEdgesChange` to manage function reference edges correctly.
- Updated `parseBoard` to compute and store a hash of function references for nodes, ensuring accurate updates and rendering.
@felix-schultz felix-schultz linked an issue Nov 16, 2025 that may be closed by this pull request
@felix-schultz felix-schultz merged commit f811682 into dev Nov 16, 2025
3 of 9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

Add Function References

1 participant