11"""
22Quick Start Script - Get up and running with AXM Agent in seconds!
33
4- Run this script to see AXM Agent in action.
5- Set your OPENAI_COMPATIBLE_BASE_URL and OPENAI_COMPATIBLE_API_KEY environment variables.
6- Or use OPENAI_BASE_URL and OPENAI_API_KEY as fallback.
4+ Set environment variables:
5+ export AXM_OPENAI_COMPATIBLE_BASE_URL="https://ark.cn-beijing.volces.com/api/v3"
6+ export AXM_OPENAI_COMPATIBLE_API_KEY="your-api-key"
7+
8+ Then run: python qq.py
79"""
810
911import os
1214from axm .core .multi_agent import MultiAgent
1315from axm .llm .openai_compatible import OpenAICompatibleProvider
1416
17+ # Configuration
1518MODEL = "deepseek-v3-250324"
16- # Note: The base_url should end with /v1 (or similar version endpoint)
17- # not include /chat/completions - that's added automatically by the provider
18- BASE_URL = "https://ark.cn-beijing.volces.com/api/v3"
19- API_KEY = os .environ .get ("OPENAI_API_KEY" , "test-key-please-set-env-var" )
20-
2119
2220def demo_basic_agent ():
2321 """Demo 1: Basic agent usage"""
2422 print ("\n " + "=" * 60 )
2523 print ("DEMO 1: Basic Agent" )
2624 print ("=" * 60 + "\n " )
2725
28- agent = Agent (model = MODEL , base_url = BASE_URL , api_key = API_KEY )
26+ agent = Agent (model = MODEL )
2927
3028 assert isinstance (agent .llm , OpenAICompatibleProvider )
3129
@@ -41,7 +39,7 @@ def demo_agent_with_tools():
4139 print ("DEMO 2: Agent with Custom Tools" )
4240 print ("=" * 60 + "\n " )
4341
44- agent = Agent (model = MODEL , base_url = BASE_URL , api_key = API_KEY )
42+ agent = Agent (model = MODEL )
4543
4644 @agent .tool
4745 def get_user_info (user_id : int ) -> dict :
@@ -78,7 +76,7 @@ class MovieRecommendation(BaseModel):
7876 rating : float
7977 why_recommended : str
8078
81- agent = Agent (model = MODEL , base_url = BASE_URL , api_key = API_KEY )
79+ agent = Agent (model = MODEL )
8280 movie = agent .run (
8381 "Recommend a sci-fi movie for someone who loves AI themes" ,
8482 response_format = MovieRecommendation ,
@@ -97,7 +95,7 @@ def demo_planning_agent():
9795 print ("DEMO 4: Planning Agent" )
9896 print ("=" * 60 + "\n " )
9997
100- agent = PlanningAgent (model = MODEL , base_url = BASE_URL , api_key = API_KEY )
98+ agent = PlanningAgent (model = MODEL )
10199
102100 agent .execute_plan (
103101 "Research the benefits of Python for data science and create a summary" ,
@@ -111,14 +109,12 @@ def demo_multi_agent():
111109 print ("DEMO 5: Multi-Agent Collaboration" )
112110 print ("=" * 60 + "\n " )
113111
114- researcher = Agent (model = MODEL , role = "researcher" , base_url = BASE_URL , api_key = API_KEY )
115- writer = Agent (model = MODEL , role = "writer" , base_url = BASE_URL , api_key = API_KEY )
112+ researcher = Agent (model = MODEL , role = "researcher" )
113+ writer = Agent (model = MODEL , role = "writer" )
116114
117115 team = MultiAgent (
118116 [researcher , writer ],
119- orchestrator_model = MODEL ,
120- base_url = BASE_URL ,
121- api_key = API_KEY ,
117+ orchestrator_model = MODEL
122118 )
123119
124120 result = team .collaborate (
0 commit comments