Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Agent ¶
type Agent struct {
engine.BranchingNode
// contains filtered or unexported fields
}
Agent executes an LLM agent via llmproxy.
func NewAgent ¶
func NewAgent( id string, name string, model string, instructions *string, answer workflow.OutputBinding, outputDecls []workflow.OutputDeclaration, memoryRefs []workflow.MemoryRef, maxTurns *int, toolDescription string, client engine.LlmClient, mem *memory.Manager, ) *Agent
NewAgent constructs a new Agent node. memoryRefs lists the memory files the LLM is permitted to access at runtime; `mem` is the engine-scoped manager that backs read/append/edit. Both may be empty/nil for agents without memory. toolDescription is only consulted when this agent is wired as a tool to another agent.
func (*Agent) AddTool ¶
func (n *Agent) AddTool(t engine.ToolProvider)
AddTool registers a ToolProvider wired to this agent. Called by the builder when wiring tool edges.
type FunctionCall ¶
type FunctionCall struct {
engine.LinearNode
// contains filtered or unexported fields
}
FunctionCall invokes a compiled engine.Function. It evaluates input bindings in the surrounding scope, runs the function and applies output bindings back to the surrounding scope.
func NewFunctionCall ¶
func NewFunctionCall(id string, fn *engine.Function, inputBindings map[string]workflow.Expression, outputBindings map[string]workflow.OutputBinding, toolDescription string) (*FunctionCall, error)
NewFunctionCall builds a FunctionCall. Validates that every declared return has a matching output binding.
func (*FunctionCall) Tools ¶
func (n *FunctionCall) Tools() ([]llmproxy.FunctionTool, error)
Tools exposes this function as an LLM-callable tool.
type If ¶
type If struct {
engine.LinearNode
// contains filtered or unexported fields
}
If evaluates a boolean condition and advances via the "true" or "false" port.
type MqttPublish ¶
type MqttPublish struct {
engine.LinearNode
// contains filtered or unexported fields
}
MqttPublish evaluates a value expression, encodes it as bare JSON according to the declared dataType, and publishes to the bound MQTT channel. Topic prefixing ({networkID}/{agentID}/) is the channel's job.
func NewMqttPublish ¶
func NewMqttPublish(id string, ch *channel.MQTT, topic string, dataType workflow.DataType, value workflow.Expression, qos byte, retain bool) *MqttPublish
NewMqttPublish builds an MqttPublish bound to the given MQTT channel.
type ReadPin ¶
type ReadPin struct {
engine.LinearNode
// contains filtered or unexported fields
}
ReadPin reads a digital or analog value from a linked channel. Build picks one of the two pointers based on signalType; the other stays nil.
func NewReadPinAnalog ¶
func NewReadPinAnalog(id string, binding workflow.OutputBinding, toolDescription string, adc *channel.ADC) *ReadPin
NewReadPinAnalog builds a ReadPin bound to an ADC channel.
func NewReadPinDigital ¶
func NewReadPinDigital(id string, binding workflow.OutputBinding, toolDescription string, gpioin *channel.GPIOInput) *ReadPin
NewReadPinDigital builds a ReadPin bound to a GPIO input channel.
type Retriever ¶
type Retriever struct {
engine.LinearNode
// contains filtered or unexported fields
}
Retriever queries a RAG collection. In control-flow mode it evaluates the configured query expression against the scope and writes a formatted results string to the bound slot. As a tool, the LLM supplies the query directly and the output binding is bypassed — the tool returns the formatted string.
func NewRetriever ¶
func NewRetriever( id string, collectionID string, topK int, query workflow.Expression, binding workflow.OutputBinding, toolDescription string, ret engine.Retriever, ) *Retriever
NewRetriever builds a Retriever. Fails the build path if rag is nil; tool path will fail at invocation time through the same nil check.
type SerialRead ¶
type SerialRead struct {
engine.LinearNode
// contains filtered or unexported fields
}
SerialRead blocks on a serial port until one line arrives, then emits it through the output binding and advances. The receive buffer is flushed first so pre-existing chatter doesn't satisfy the read; when prompt is non-empty it is written next, then the blocking read runs. The driver's Read steals from the broadcast path while it is in flight, so any concurrent OnSerialReceive trigger pauses for the duration.
func NewSerialRead ¶
func NewSerialRead(id string, binding workflow.OutputBinding, prompt string, uart *channel.UART) *SerialRead
NewSerialRead builds a SerialRead bound to the given UART channel. prompt may be empty.
type SerialWrite ¶
type SerialWrite struct {
engine.LinearNode
// contains filtered or unexported fields
}
SerialWrite evaluates a value expression and writes the resulting string to a UART channel. No terminator is appended — the caller's expression is responsible for any newline / framing.
func NewSerialWrite ¶
func NewSerialWrite(id string, value workflow.Expression, uart *channel.UART) *SerialWrite
NewSerialWrite builds a SerialWrite bound to the given UART channel.
type SetVariable ¶
type SetVariable struct {
engine.LinearNode
// contains filtered or unexported fields
}
SetVariable evaluates an expression and assigns the result to a declared variable in the main scope.
func NewSetVariable ¶
func NewSetVariable(id string, variable workflow.Reference, value workflow.Expression) *SetVariable
NewSetVariable builds a SetVariable node.
type WebFetch ¶
type WebFetch struct {
engine.LinearNode
// contains filtered or unexported fields
}
WebFetch fetches an HTTP(S) URL and emits the cleaned page text. Evaluates the configured URL expression against the scope and writes the extracted text to the bound slot. Control-flow only — not exposed as an LLM tool.
func NewWebFetch ¶
func NewWebFetch(id string, urlExpr workflow.Expression, maxChars int, binding workflow.OutputBinding) *WebFetch
NewWebFetch builds a WebFetch node. maxChars <= 0 falls back to the default cap.
type WebSearchTool ¶
WebSearchTool exposes a web search engine as an LLM-callable tool. Tool-only — never participates in control flow, never emits a scope variable.
func NewWebSearchTool ¶
func NewWebSearchTool(id string, provider websearch.Provider, maxResults int) *WebSearchTool
NewWebSearchTool builds a WebSearchTool node bound to the given provider. provider may be nil; the build path is expected to reject that case so a misconfigured engine fails at deploy rather than at tool-call time.
func (*WebSearchTool) Tools ¶
func (n *WebSearchTool) Tools() ([]llmproxy.FunctionTool, error)
Tools exposes this node as `web_search(query, count?)` → string.
type WritePin ¶
type WritePin struct {
engine.LinearNode
// contains filtered or unexported fields
}
WritePin writes a digital or analog value to a linked channel. Build picks exactly one of the three pointers; the others stay nil.
- Digital → gpioout (binary)
- Analog (PWM) → pwm (duty cycle in [0,1])
- Analog (DAC) → dac (millivolts)
func NewWritePinDAC ¶
NewWritePinDAC builds a WritePin bound to a DAC output channel.
func NewWritePinDigital ¶
func NewWritePinDigital(id string, value workflow.Expression, gpioout *channel.GPIOOutput) *WritePin
NewWritePinDigital builds a WritePin bound to a GPIO output channel.
func NewWritePinPWM ¶
NewWritePinPWM builds a WritePin bound to a PWM output channel.