-
-
Notifications
You must be signed in to change notification settings - Fork 2
AIChat Migration
Coyote originally started as a fork of AIChat but has since evolved into its own separate project with separate goals.
As a result, there's some changes you'll need to make to your AIChat configuration to be able to use Coyote.
Be sure you've run coyote at least once so that the Coyote configuration directory and subdirectories exist and is
populated with the built-in defaults.
You should be able to copy/paste your AIChat configuration file into your Coyote configuration directory. Since the location of the Coyote configuration directory varies between systems, you can use the following command to locate your config directory:
coyote --info | grep 'config_dir' | awk '{print $2}'Then, you'll need to make the following changes:
-
function_calling->function_calling_support -
use_tools->enabled_tools -
agent_prelude->agent_session -
compress_threshold->compression_threshold -
summarize_prompt->summarization_prompt -
summary_prompt->summary_context_prompt
Locate your roles directory using the following command:
coyote --info | grep 'roles_dir' | awk '{print $2}'Update any roles that have use_tools to enabled_tools.
Locate your sessions directory using the following command:
coyote --info | grep 'sessions_dir' | awk '{print $2}'Update the following settings:
-
use_tools->enabled_tools -
compress_threshold->compression_threshold -
summarize_prompt->summarization_prompt -
summary_prompt->summary_context_prompt
Probably the most significant difference between AIChat and Coyote is how tools are handled. So if you cloned the llm-functions repo, you'll need to make the following changes.
Note: JavaScript functions are not supported in Coyote.
The following guide assumes you're using the llm-functions repository as your base for custom functions, and thus
follows that directory structure.
Agents are now all handled in one place: the agents directory (<coyote-config-dir>/agents):
coyote --info | grep 'agents_dir' | awk '{print $2}'And instead of separate index.yaml and config.yaml files, they're now both in a single config.yaml file.
So now for all of your agents, copy all the contents of those directories to the corresponding directory in the Coyote
agents directory. Then make the following changes:
- Copy the contents of your
<aichat-config-dir>/functions/agentsdirectory into<coyote-config-dir/agents - Merge
index.yamlintoconfig.yaml- If you never created a custom
config.yamlfile, then simply renameindex.yamltoconfig.yaml - If you've defined an
agent_prelude, rename that field toagent_session
- If you never created a custom
- Convert all JavaScript tools to either Python or Bash
- For Bash
tools.sh: Remove the following line:eval "$(argc --argc-eval "$0" "$@")"
- Any
tools.txtfiles you have that define what global functions the agent uses is now replaced by theglobal_toolsfield in the agent'sconfig.yaml. So for example: If yourtools.txtlooks like this:then you need to add the following to your agent'sfs_mkdir.sh fs_ls.sh fs_patch.sh fs_cat.shconfig.yaml:global_tools: - fs_mkdir.sh - fs_ls.sh - fs_patch.sh - fs_cat.sh
- If you have any bash
tools.shthat depend on the utility scripts in thellm-functionsrepository, they've been replaced by built-in utility scripts. So use the following to replace any matching lines in yourtools.shfiles:################## ## Scripts file ## ################## ROOT_DIR="${LLM_ROOT_DIR:-$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)}" # replace with source "$LLM_PROMPT_UTILS_FILE" ####################### ## guard_path script ## ####################### "$ROOT_DIR/utils/guard_path.sh" # replace with guard_path ############################ ## guard_operation script ## ############################ "$ROOT_DIR/utils/guard_operation.sh" # replace with guard_operation ###################### ## patch.awk script ## ###################### awk -f "$ROOT_DIR/utils/patch.awk" # replace with patch_file
When you're done with this migration, you should have the following:
- No more
functions/agentsdirectory - No
functions/agents.txtfile (Coyote assumes that if the agent directory exists, it is loadable) - No
<coyote-config-dir>/agents/<agent-name>/tools.txt - No
<coyote-config-dir>/agents/<agent-name>/index.yaml
Coyote consolidates much of the llm-functions repo functionality into one binary. So this means
- There's no need to have
argcinstalled anymore - No separate repository to manage
- No
tools.txt - No
functions.json - No
functions/mcpdirectory at all - No
functions/scripts
Here's how to migrate your functions over to Coyote from the llm-functions repository.
- Copy your AIChat
<aichat-config-dir>/functionsdirectory into your Coyote config directory - Delete the following files and directories from your
<coyote-config-dir>/functionsdirectory:scripts/agents.txtfunctions.jsonArgcfile.sh-
README.md(irrelevant now) -
LICENSE(irrelevant now) utils/guard_operation.shutils/guard_path.shutils/patch.awk
- Everything in
tools.txtnow lives in the global config file under thevisible_toolssetting:becomes the following in yourget_current_weather.sh execute_command.sh web_search.sh #execute_py_code.py query_jira_issues.sh<coyote-config-dir>/config.yamlvisible_tools: - get_current_weather.sh - execute_command.sh - web_search.sh # - web_search.sh - query_jira_issues.sh
- If you've defined a
functions/mcp.jsonfile, you can leave it alone. - Similarly to agents, if you have any bash
tools.shthat depend on the utility scripts in thellm-functionsrepository, they've been replaced by built-in utility scripts. So use the following to replace any matching lines in yourtools.shfiles:################## ## Scripts file ## ################## ROOT_DIR="${LLM_ROOT_DIR:-$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)}" # replace with source "$LLM_PROMPT_UTILS_FILE" ####################### ## guard_path script ## ####################### "$ROOT_DIR/utils/guard_path.sh" # replace with guard_path ############################ ## guard_operation script ## ############################ "$ROOT_DIR/utils/guard_operation.sh" # replace with guard_operation ###################### ## patch.awk script ## ###################### awk -f "$ROOT_DIR/utils/patch.awk" # replace with patch_file
Refer to the custom bash tools docs to learn how to compile and test bash
tools in Coyote without needing to use argc.