Skip to main content

AI Agent, AI Assistant and AI Tool

These variables hold the Fusion AI configuration that you can create and save from ODSL: agents, custom assistants and custom tools. They are typed objects, so you set their properties like any other object. See Fusion AI for what each one does.

Construction​

FunctionDescription
AIAgent()Creates a new AI Agent
AIAssistant()Creates a new AI Assistant
AITool()Creates a new AI Tool

Properties​

VariablePropertyDescriptionType
AIAgentnameThe name of the agentString
AIAgenticonThe icon shown for the agentString
AIAgentcronAn optional schedule to run the agent onString
AIAssistantnameThe name of the assistantString
AIAssistantdescriptionWhat the assistant is for, used to choose itString
AIAssistanticonThe icon shown for the assistantString
AIAssistantsystemPromptThe instructions given to Fusion when the assistant is usedString
AIAssistantonlyUseCustomToolsTrue to let the assistant use only your custom tools, defaults to falseBoolean
AIToolnameThe function name of the toolString
AITooldescriptionWhat the tool does, used by Fusion to decide when to call itString
AITooliconThe icon shown for the toolString
AIToolscriptThe private script, with category aitool, that implements the toolString

An agent also needs a messages list: the questions it asks, each an object with a content property.

Example​

agent = AIAgent()
agent.id = "morning-gas-check"
agent.name = "Morning gas check"
agent.cron = "30 7 * * 1-5 * Europe/London"
q = Object()
q.content = "Did the ICE Endex TTF settlement prices arrive yesterday?"
agent.messages = [q]
save ${aiagent:agent}

Further Reading​