AI21 LLM is not Runnable when using via LangChain
Dont pass AI21Client as the llm. Use the LangChain wrapper from the langchain_ai21 package instead: from langchain_ai21 import AI21LLM, then llm = AI21LLM(model="j2-ultra", your AI21 key parameter) and pass that llm to load_tools and initialize_agent. If you want the chat model (Jamba), use ChatAI21…