zAI agent performs financial planning tasks. It uses Google's A2A Protocol framework to collaborate with dependant agents.
To run it you'll need to:
- Optionally update /etc/hosts
- Configure .env file.
- Run all dependant agents.
- Start this agent.
If running inside docker, you can skip this step. If running natively you'll need to add the following entries into /etc/hosts file. Feel free to change C class subnets (127.0.3, 127.0.4, 127.0.5), if you have something already running on them.
127.0.3.1 zai-ma
127.0.4.1 dr-ma
127.0.4.2 hr-ma
127.0.4.3 finance-ma
127.0.4.4 equity-ma
127.0.4.5 planning-ma
127.0.5.1 analysis-ma
zAI Agent uses Anthropic's Claude LLM. To work with Anthropic you'll need to provide ANTHROPIC_API_KEY. Copy .env.example to .env and enter ANTHROPIC_API_KEY before starting zAI agent.
cp .env.example .env
# edit .env and update ANTHROPIC_API_KEY and savezAI agent needs the following agents to be running (required agents are specified in src/agent/registered-agents.ts. They might have other dependencies, check their README.md files.
- dr-ma for data retrieval and modification
- analysis-ma for performing analysis
# activate .env
set -a
source .env
set +a
# start the agent
STAGE=local npm run start:devOnce everything is up and running (including dependent agents) run zAI Agent's CLI interface:
npm run cliRemove the folowing two lines from docker-compose.yml file:
volumes:
- .:/app
docker build --secret id=npmrc,src=$HOME/.npmrc -t zai-ma:latest .docker compose updocker compose exec -ti zai-ma npm run cli