Python GuidesBuild with AgentsCopy pageThis example shows a multi-step workflow with the General Agent, the default agent in Spaces. Key features: Use prebuilt tools like web browsing and search Compatible with LangChain message objects Support for multi-step conversations 1Install PackageJupyter NotebookTerminal/Shell1!pip install -U athena-intelligence2Set Up Client1from athena import GeneralAgentConfig, GeneralAgentRequest, Tool2from athena.client import Athena3from langchain_core.messages import HumanMessage4from langchain_core.load import load56athena = Athena(api_key="<YOUR_API_KEY>")3Run the Agent1# Enable tools2config = GeneralAgentConfig(3 enabled_tools=[Tool.SEARCH, Tool.BROWSE]4)56# Create message7messages = [{8 "type": "human", 9 "content": "Use the search tool to search for information about Athena Intelligence and summarize the results."10}]1112# Get response13response = athena.agents.general.invoke(14 request=GeneralAgentRequest(15 config=config,16 messages=messages17 )18).messages1920# Access the response dict directly21latest_response = response[-1]["kwargs"]["content"]4Continue ConversationPass the full message list to maintain context between steps.1# Add follow-up as LangChain message object2new_messages = load(response) + [HumanMessage(content="Tell me more about what you found")]34# Get response5continued_response = athena.agents.general.invoke(6 request=GeneralAgentRequest(7 config=config,8 messages=new_messages9 )10).messages