Installation
First, install thelyzr-agent-api package:
Initializing the Client
To start using the API, initialize theAgentAPI client with your Lyzr API key:
Tip: You can generate your API key from the Lyzr Agent API Studio.
Environment
Create an Environment
The environment is a fundamental building block of the Lyzr Agent API. It defines the modules, features, tools available, and other configurations for your agent.For more,click here.Update an Environment
This function updates the configuration of an existing environment by passing in the environment ID (env_id) and a JSON body containing the new environment settings (json_body).
Get an Environment
This function retrieves a list of all available environments. It returns the details of each environment, allowing you to view their configurations and statuses.Agent
Create an Agent
Once the environment is set up, create an agent within that environment. The agent uses the environment ID to operate and can be customized with a system prompt and a description:Update an Agent
This function updates the configuration of an existing agent by providing the agent ID (agent_id) and a JSON body containing the new settings (json_body). It allows you to modify an agent’s behavior or properties dynamically.
Get an Agent
This function retrieves a list of all available agents. It returns the details and configurations of each agent, allowing you to review and manage them.Delete an Agent
This function deletes an agent by specifying itsagent_id.