- Step1: Install the package via pip or clone the GitHub repository.
- Step2: Set ZHIPUAI_API_KEY environment variable to your ZhipuAI API key.
- Step3: (Optional) Set OPENAI_API_KEY if using OpenAI fallback or tooling.
- Step4: Import ZhipuAIAgent from the library and initialize with API key.
- Step5: Define your custom tools or function schemas following OpenAI spec.
- Step6: Call agent.execute() or ChatCompletion method to run the agent.
- Step7: Process the returned messages and tool outputs in your app.