Agentforce代理服务器指南旨在帮助用户完成环境变量配置、GitHub推送脚本使用、Salesforce相关信息获取等操作,以顺利部署和使用代理服务器。
git clone https://github.com/agentforce/server.git
cd server
编辑~/.bash_profile
文件,添加以下内容:
export AGENTFORCE_HOME=$(pwd)
source ~/.bash_profile
进入项目目录后运行:
mvn clean install
cd $AGENTFORCE_HOME/bin
./start.sh
cd $AGENTFORCE_HOME/bin
./stop.sh
要配置环境变量,请按照以下步骤操作:
source ~/.bash_profile
git clone https://github.com/agentforce/server.git
cd server
~/.bash_profile
文件,添加以下内容:export AGENTFORCE_HOME=$(pwd)
source ~/.bash_profile
mvn clean install
该脚本帮助将本地仓库推送到GitHub,特别适合新项目初始化。
wget https://raw.githubusercontent.com/agentforce/server/master/bin/github_push.sh
chmod +x github_push.sh
./github_push.sh
按照提示输入GitHub仓库URL后,脚本会自动处理其余步骤。
# 设置代理服务器路径
export AGENTFORCE_HOME=/path/to/agentforce-server
# 设置运行环境
export ENV=development
# 启动服务器
$AGENTFORCE_HOME/bin/start.sh
https://localhost/oauth/callback
https://your-salesforce-instance.lightning.force.com/lightning/r/Agent__c/0XxXXXXXXXXXXXXX/view
0XxXXXXXXXXXXXXX
)作为代理IDDOMAIN-NAME.my.salesforce.com
.env
文件该脚本将执行以下操作:
.env
)不会被推送到GitHub(这些文件已添加到.gitignore
)文档中未提及相关许可证信息。
遇到问题时,请检查以下内容:
A: 确保本地已生成SSH密钥,并添加到GitHub的SSH Keys设置中。运行以下命令测试:
ssh -T git@github.com
A: 检查网络连接,确认仓库URL正确,然后重新运行脚本。
# 下载源码
git clone https://github.com/agentforce/server.git
cd server
# 配置环境变量
echo 'export AGENTFORCE_HOME=$(pwd)' >> ~/.bash_profile
source ~/.bash_profile
# 安装依赖
mvn clean install
# 启动服务器
cd $AGENTFORCE_HOME/bin
./start.sh
运行以上命令后,您将成功部署并启动Agentforce代理服务器。