This Documentation is Being Deprecated
This page is being phased out as part of our documentation reorganization.
Click this card to be redirected to the updated version with the most current information.
If you notice any discrepancies or areas needing improvement in the new documentation, please use the “Report an issue” button at the bottom of the page.
Adding Fields in Manifest
To add Agent strategies in a plugin, add theplugins.agent_strategies field in the manifest.yaml file and define the Agent provider. Example code:
Defining the Agent Provider
Create an agent.yaml file with basic Agent provider information:Defining and Implementing Agent Strategy
Definition
Create a function_calling.yaml file to define the Agent strategy code:model, tools, query, and max_iterations to implement the most basic Agent strategy. This means that users can:
- Select which model to use
- Choose which tools to utilize
- Configure the maximum number of iterations
- Input a query to start executing the Agent
Functional Implementation Coding
Retrieving Parameters Based on the four parameters defined earlier, the model type parameter is model-selector, and the tool type parameter is a special array[tools]. The retrieved parameters can be converted using the SDK’s built-in AgentModelConfig and list[ToolEntity].- This interface creates and returns an
AgentLogMessage, which represents a node in the log tree. - If a parent is passed in, it indicates this node has a parent node.
- The default status is “Success”. However, if you want to better display the task execution process, you can first set the status to “start” to show a “in progress” log, then update the log status to “Success” after the task is completed. This way, users can clearly see the entire process from start to finish.
- The label will be used as the log title shown to users.
Edit this page | Report an issue