Skip to content

Lazy Register Function Tools Node

AI/Agents/Builder

Lazy Register Function Tools

Indexes referenced Flow-Like functions into a vector DB so agents can discover tools via semantic search at runtime, keeping the context window lean.

agent_lazy_register_function_toolsllmLong running
Inputs3
Outputs2
Security exposure5/10
Packagellm

Ratings

Scores range from 0 to 10. Higher values mean more impact, exposure, or operational weight.

SecurityAttack surface and exposure impact.
5/10Medium
PrivacyPotential sensitivity of processed data.
5/10Medium
PerformanceRuntime or resource pressure.
4/10Medium
GovernancePolicy, audit, or compliance impact.
4/10Medium
ReliabilityOperational stability considerations.
3/10High
CostExternal or compute cost impact.
7/10Low

Input Pins

3

Input

Execution
exec_in

Execution trigger

Agent

Struct
agent_in

Agent object to register lazy function tools on

AgentAgent16 fields
modelBitrequired

The LLM model id backing this agent

idstring
default ""
typeBitTypes
enum "Llm", "Vlm", "Tts", "Stt"...default "Other"
metaMap<string, Metadata>
default {}
*Metadatamap value
namestringrequired
descriptionstringrequired
long_descriptionstring | null
release_notesstring | null
tagsArray<string>required
+11 more fields
authorsArray<string>
default []
itemsstringarray item
repositorystring | null
default null
+14 more fields
model_display_namestring | null

Model display name

max_iterationsinteger:uint64required

Maximum number of iterations/tool calls before stopping

format uint64min 0
system_promptstring | null

System prompt for the agent

toolsArray<Tool>

Registered tools (function calling schemas for non-function tools)

default []
itemsToolarray item
typeToolTyperequired
enum "function"
functionHistoryFunctionrequired
namestringrequired
descriptionstring | null
parametersHistoryFunctionParametersrequired
function_refsMap<string, string>

Function references (node_id -> node_name mapping) These are converted to tools at execution time to keep data slim

default {}
*stringmap value
mcp_serversArray<McpServerConfig>

MCP servers with optional tool filtering

default []
itemsMcpServerConfigarray item

MCP server registration with optional tool filtering

uristringrequired

URI of the MCP server

tool_filterarray | null

Optional tool filter - if None, all tools are used If Some, only tools in this set are used

itemsstringarray item
thinking_enabledboolean

Whether the thinking tool is enabled

default false
historyanyOf (2)

Optional conversation history to initialize with

variant 1Historyvariant
modelstringrequired
messagesArray<HistoryMessage>required
itemsHistoryMessagearray item
presetstring | null
streamboolean | null
stream_optionsanyOf (2)
variant 1StreamOptionsvariant
variant 2nullvariant
+14 more fields
variant 2nullvariant
datafusion_contextsArray<DataFusionContext>

DataFusion sessions for SQL-based data analysis Multiple sessions can be added to give the agent access to different data sources

default []
itemsDataFusionContextarray item

DataFusion session context for SQL-based data analysis

session_cache_keystringrequired

Cache key to look up the session in ExecutionContext.cache

descriptionstring | null

User-provided description of what this data represents e.g., "Sales data from 2020-2024 including customer demographics"

table_descriptionsMap<string, string>

Per-table descriptions for better LLM understanding Key is the table name, value is description

default {}
*stringmap value
example_queriesArray<string>

Example SQL queries that work well with this data

default []
itemsstringarray item
table_schemasMap<string, string>

Auto-discovered table schemas (populated at runtime) Key is table name, value is schema description

default {}
*stringmap value
infinite_contextboolean

Enable infinite context mode with automatic context window management. When enabled, applies the selected context management strategy.

default false
context_management_modeContextManagementMode

Strategy for managing context when it exceeds the token budget. - Truncate: Sliding window, removes oldest messages (fast, no extra cost) - Summarize: LLM compresses old messages (preserves info, adds latency/cost)

default "Truncate"
variant 1constvariant

Sliding window truncation - removes oldest messages to fit budget. Fast, deterministic, no extra API costs. May lose important early context.

const "Truncate"
variant 2constvariant

LLM summarization - compresses old messages into a summary. Preserves key information but adds latency and API cost.

const "Summarize"
max_context_tokensinteger | null

Maximum tokens to retain when truncating history in infinite context mode. Defaults to 32000 tokens if not specified. Only used when infinite_context is true.

format uint32default nullmin 0
lazy_function_refsArray<LazyFunctionRef>

Lazy function references backed by a vector DB index. At execution time the agent can search this index to dynamically discover and load only the tools it actually needs, keeping the context window lean.

default []
itemsLazyFunctionRefarray item

Reference to a lazy function tool index stored in a vector DB. Allows agents to do hybrid search over a large pool of tools at execution time instead of loading all tool schemas into the context upfront.

db_cache_keystringrequired

Cache key used to look up the LanceDB connection

lazy_embedding_modelanyOf (2)

Embedding model shared across all lazy function tool indexes. The model's cache key is encoded into the vector DB table name, so swapping the model automatically uses a fresh table (old embeddings are abandoned).

variant 1CachedEmbeddingModelvariant
cache_keystringrequired
model_typeBitTypesrequired
enum "Llm", "Vlm", "Tts", "Stt"...
variant 2nullvariant
memoryanyOf (2)

Persistent memory configuration. When set, the agent gains built-in `_memory_search`, `_memory_store`, and `_memory_compress` tools to autonomously store, recall, and compress observations across conversations.

variant 1MemoryConfigvariant
databaseNodeDBConnectionrequired
cache_keystringrequired
embedding_modelCachedEmbeddingModelrequired
cache_keystringrequired
model_typeBitTypesrequired
enum "Llm", "Vlm", "Tts", "Stt"...
max_context_tokensinteger:uint32required
format uint32min 0
recall_strategyRecallStrategyrequired
enum "RecentFirst", "Relevance", "Hybrid"
recall_top_kinteger:uint32required
format uint32min 0
+2 more fields
variant 2nullvariant
Schema enforced

Embedding Model

Struct
model

Embedding model used to index functions for semantic search

CachedEmbeddingModelCachedEmbeddingModel2 fields
cache_keystringrequired
model_typeBitTypesrequired
enum "Llm", "Vlm", "Tts", "Stt"...
Schema enforced

Output Pins

2

Done

Execution
exec_out

Fires when function indexing is complete

Agent

Struct
agent_out

Agent with lazy function tool references attached

AgentAgent16 fields
modelBitrequired

The LLM model id backing this agent

idstring
default ""
typeBitTypes
enum "Llm", "Vlm", "Tts", "Stt"...default "Other"
metaMap<string, Metadata>
default {}
*Metadatamap value
namestringrequired
descriptionstringrequired
long_descriptionstring | null
release_notesstring | null
tagsArray<string>required
+11 more fields
authorsArray<string>
default []
itemsstringarray item
repositorystring | null
default null
+14 more fields
model_display_namestring | null

Model display name

max_iterationsinteger:uint64required

Maximum number of iterations/tool calls before stopping

format uint64min 0
system_promptstring | null

System prompt for the agent

toolsArray<Tool>

Registered tools (function calling schemas for non-function tools)

default []
itemsToolarray item
typeToolTyperequired
enum "function"
functionHistoryFunctionrequired
namestringrequired
descriptionstring | null
parametersHistoryFunctionParametersrequired
function_refsMap<string, string>

Function references (node_id -> node_name mapping) These are converted to tools at execution time to keep data slim

default {}
*stringmap value
mcp_serversArray<McpServerConfig>

MCP servers with optional tool filtering

default []
itemsMcpServerConfigarray item

MCP server registration with optional tool filtering

uristringrequired

URI of the MCP server

tool_filterarray | null

Optional tool filter - if None, all tools are used If Some, only tools in this set are used

itemsstringarray item
thinking_enabledboolean

Whether the thinking tool is enabled

default false
historyanyOf (2)

Optional conversation history to initialize with

variant 1Historyvariant
modelstringrequired
messagesArray<HistoryMessage>required
itemsHistoryMessagearray item
presetstring | null
streamboolean | null
stream_optionsanyOf (2)
variant 1StreamOptionsvariant
variant 2nullvariant
+14 more fields
variant 2nullvariant
datafusion_contextsArray<DataFusionContext>

DataFusion sessions for SQL-based data analysis Multiple sessions can be added to give the agent access to different data sources

default []
itemsDataFusionContextarray item

DataFusion session context for SQL-based data analysis

session_cache_keystringrequired

Cache key to look up the session in ExecutionContext.cache

descriptionstring | null

User-provided description of what this data represents e.g., "Sales data from 2020-2024 including customer demographics"

table_descriptionsMap<string, string>

Per-table descriptions for better LLM understanding Key is the table name, value is description

default {}
*stringmap value
example_queriesArray<string>

Example SQL queries that work well with this data

default []
itemsstringarray item
table_schemasMap<string, string>

Auto-discovered table schemas (populated at runtime) Key is table name, value is schema description

default {}
*stringmap value
infinite_contextboolean

Enable infinite context mode with automatic context window management. When enabled, applies the selected context management strategy.

default false
context_management_modeContextManagementMode

Strategy for managing context when it exceeds the token budget. - Truncate: Sliding window, removes oldest messages (fast, no extra cost) - Summarize: LLM compresses old messages (preserves info, adds latency/cost)

default "Truncate"
variant 1constvariant

Sliding window truncation - removes oldest messages to fit budget. Fast, deterministic, no extra API costs. May lose important early context.

const "Truncate"
variant 2constvariant

LLM summarization - compresses old messages into a summary. Preserves key information but adds latency and API cost.

const "Summarize"
max_context_tokensinteger | null

Maximum tokens to retain when truncating history in infinite context mode. Defaults to 32000 tokens if not specified. Only used when infinite_context is true.

format uint32default nullmin 0
lazy_function_refsArray<LazyFunctionRef>

Lazy function references backed by a vector DB index. At execution time the agent can search this index to dynamically discover and load only the tools it actually needs, keeping the context window lean.

default []
itemsLazyFunctionRefarray item

Reference to a lazy function tool index stored in a vector DB. Allows agents to do hybrid search over a large pool of tools at execution time instead of loading all tool schemas into the context upfront.

db_cache_keystringrequired

Cache key used to look up the LanceDB connection

lazy_embedding_modelanyOf (2)

Embedding model shared across all lazy function tool indexes. The model's cache key is encoded into the vector DB table name, so swapping the model automatically uses a fresh table (old embeddings are abandoned).

variant 1CachedEmbeddingModelvariant
cache_keystringrequired
model_typeBitTypesrequired
enum "Llm", "Vlm", "Tts", "Stt"...
variant 2nullvariant
memoryanyOf (2)

Persistent memory configuration. When set, the agent gains built-in `_memory_search`, `_memory_store`, and `_memory_compress` tools to autonomously store, recall, and compress observations across conversations.

variant 1MemoryConfigvariant
databaseNodeDBConnectionrequired
cache_keystringrequired
embedding_modelCachedEmbeddingModelrequired
cache_keystringrequired
model_typeBitTypesrequired
enum "Llm", "Vlm", "Tts", "Stt"...
max_context_tokensinteger:uint32required
format uint32min 0
recall_strategyRecallStrategyrequired
enum "RecentFirst", "Relevance", "Hybrid"
recall_top_kinteger:uint32required
format uint32min 0
+2 more fields
variant 2nullvariant
Schema enforced

Node Info

Internal name
agent_lazy_register_function_tools
Category
AI/Agents/Builder
Version
2
Function references
Can reference functions