### Environment Variables Setup# Create a `.env` file in your project root:# Maxim API ConfigurationMAXIM_API_KEY=your_api_key_hereMAXIM_LOG_REPO_ID=your_repo_id_hereOPENAI_API_KEY=your_openai_api_key# You can also choose another LLM Provider (Gemini, Groq, Anthropic etc.)
# Create your agentresearcher = Agent( name="Research Agent", role="Senior Research Analyst", model=OpenAIChat(id="gpt-4o"), tools=[GoogleSearchTools()], instructions="You are an expert researcher at a tech think tank...", show_tool_calls=True, markdown=True)# Run your agentresponse = researcher.run("Research the latest AI advancements...")print(response.content)
That’s it! All your Agno agent interactions will now be logged and available in your Maxim dashboard.Check this Cookbook for a quick reference - Notebook
Here’s how to set up a multi-agent system with Maxim integration:
# Create individual agentsweb_search_agent = Agent( name="Web Agent", role="Search the web for information", model=OpenAIChat(id="gpt-4o"), tools=[GoogleSearchTools()], instructions="Always include sources", show_tool_calls=True, markdown=True,)finance_agent = Agent( name="Finance Agent", role="Get financial data", model=OpenAIChat(id="gpt-4o"), tools=[YFinanceTools(stock_price=True, analyst_recommendations=True, company_info=True)], instructions="Use tables to display data", markdown=True,)# Create multi-agent systemmulti_ai_agent = Agent( team=[web_search_agent, finance_agent], model=OpenAIChat(id="gpt-4o"), instructions="You are a helpful financial assistant. Answer user questions about stocks, companies, and financial data.", show_tool_calls=True, markdown=True)# Run the multi-agent systemresponse = multi_ai_agent.run("What's the current stock price of Apple?")print(response.content)