registerSwaigFunction
Register a pre-built SwaigFunction instance or a raw function descriptor (e.g.,
from a DataMap). Unlike defineTool(), this method
accepts pre-built objects rather than taking a handler callback.
Parameters
fn
A SwaigFunction instance or a plain object with a "function" key. Typically
generated by DataMap.toSwaigFunction(). A plain object with gates or
gate_fillers is checked like a defineTool() definition, and a checked copy is
stored; the object you pass is left unchanged. Throws for gates the platform
would refuse, or for a gated definition without a description.
Returns
AgentBase — Returns this for method chaining.