support tool nodes#52
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds first-class support for Retell's
function(tool-call) nodes andbranch(logic-router alias) nodes, then centralizes transition evaluation across every node type. Tool execution itself stays out of scope and is tracked at #51.Summary
NodeType.FUNCTIONwith importer (function→ FUNCTION), exporter (FUNCTION →function), engine handler (warning + delegate, no HTTP call), andis_function_node()helper.branchaliased toNodeType.LOGICin the Retell importer. Previously fell through toNodeType.CONVERSATIONsilently — a real correctness bug on newer Retell CF exports._evaluate_transitionsdispatcher invoicetest/engine/conversation.py. Every node type (logic / extract / function / conversation) routes through one method that dispatches percondition.type:equation→ deterministic viaevaluate_equationllm_prompt→ fires when caller-suppliedllm_decision.transition_tomatches the targettool_call→ skipped with a per-transition warning (until Tool execution for function nodes (Retell CFfunction, etc.) #51)always→ fallback (conversation nodes opt out — always edges still fire post-response)objectives_completegate still applies to all transition types.docs/development.md.AgentService:load_graphandget_graph_with_etagshared a "linked-file vs DB" pattern — extracted to_load_graph_payload.Behavior changes worth flagging
branchRetell nodes now route as LOGIC. Previously they silently became conversation nodes — anyone relying on that incorrect behavior will see a routing shift. Considered a bug fix, not a regression.tool_call-typed transitions (Telnyx/LiveKit handoff shape) are now skipped with a warning instead of being silently dropped on logic/extract nodes or LLM-reasoned on conversation nodes.Out of scope
function, etc.) #51 (mock-mode viaTestCase.tool_mocks, live HTTP execution behind a flag, result-driven branching).Test coverage
TestRetellImporterFunctionNodeandTestRetellImporterNodeTypeAliasesintests/unit/importers/test_retell.py.TestFunctionNodeExportintests/unit/exporters/test_retell_cf.py, with import → export → re-import round-trip.TestFunctionNodeHandlingandTestCentralizedTransitionDispatchintests/unit/engine/test_conversation.py. The dispatch tests cover: function-node equation routing on pre-existing variables,tool_callwarning + fallthrough, conversation-node equation firing deterministically over LLM pick.NodeType.FUNCTIONround-trip test intests/unit/models/test_agent.py.tests/fixtures/retell/sample_config_function_node.jsonminimal CF fixture.Stats
13 first-pass files + the centralization + the broad sweep:
+664 / −2482across 91 files (mostly comment removal)Issues touched
function, etc.) #51 — Tool execution for function nodes (referenced from engine warning + docs)