xpander-sdk 2.0.152__py3-none-any.whl → 2.0.154__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -383,7 +383,10 @@ class AgentGraphItem(BaseModel):
383
383
  llm_settings: Optional[List[AgentGraphItemLLMSettings]] = []
384
384
  is_first: Optional[bool] = False
385
385
 
386
-
386
+ class LLMReasoningEffort(str, Enum):
387
+ Low = "low"
388
+ Medium = "medium"
389
+ High = "high"
387
390
 
388
391
  class AIAgentConnectivityDetailsA2AAuthType(str, Enum):
389
392
  NoAuth = "none"
@@ -40,6 +40,7 @@ from xpander_sdk.modules.agents.models.agent import (
40
40
  AgentType,
41
41
  DatabaseConnectionString,
42
42
  LLMCredentials,
43
+ LLMReasoningEffort,
43
44
  )
44
45
  from xpander_sdk.modules.agents.models.knowledge_bases import AgentKnowledgeBase
45
46
  from xpander_sdk.modules.knowledge_bases.knowledge_bases_module import KnowledgeBases
@@ -151,6 +152,7 @@ class Agent(XPanderSharedModel):
151
152
  using_nemo: Optional[bool]
152
153
  model_provider: str
153
154
  model_name: str
155
+ llm_reasoning_effort: Optional[LLMReasoningEffort] = LLMReasoningEffort.Medium
154
156
  llm_api_base: Optional[str]
155
157
  webhook_url: Optional[str]
156
158
  created_at: Optional[datetime]
@@ -192,6 +194,7 @@ class Agent(XPanderSharedModel):
192
194
  using_nemo: Optional[bool] = False
193
195
  model_provider: str
194
196
  model_name: str
197
+ llm_reasoning_effort: Optional[LLMReasoningEffort] = LLMReasoningEffort.Medium
195
198
  llm_api_base: Optional[str] = None
196
199
  webhook_url: Optional[str] = None
197
200
  created_at: Optional[datetime] = None
@@ -8,7 +8,7 @@ from loguru import logger
8
8
  from xpander_sdk import Configuration
9
9
  from xpander_sdk.models.shared import OutputFormat, ThinkMode
10
10
  from xpander_sdk.modules.agents.agents_module import Agents
11
- from xpander_sdk.modules.agents.models.agent import AgentGraphItemType
11
+ from xpander_sdk.modules.agents.models.agent import AgentGraphItemType, LLMReasoningEffort
12
12
  from xpander_sdk.modules.agents.sub_modules.agent import Agent
13
13
  from xpander_sdk.modules.backend.utils.mcp_oauth import authenticate_mcp_server
14
14
  from xpander_sdk.modules.tasks.sub_modules.task import Task
@@ -278,6 +278,10 @@ def _load_llm_model(agent: Agent, override: Optional[Dict[str, Any]]) -> Any:
278
278
  return env_llm_key or agent.llm_credentials.value
279
279
 
280
280
  llm_args = {}
281
+
282
+ if agent.llm_reasoning_effort and agent.llm_reasoning_effort != LLMReasoningEffort.Medium:
283
+ llm_args = { "reasoning_effort": agent.llm_reasoning_effort.value }
284
+
281
285
  if agent.llm_api_base and len(agent.llm_api_base) != 0:
282
286
  llm_args["base_url"] = agent.llm_api_base
283
287
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: xpander-sdk
3
- Version: 2.0.152
3
+ Version: 2.0.154
4
4
  Summary: xpander.ai Backend-as-a-service for AI Agents - SDK
5
5
  Home-page: https://www.xpander.ai
6
6
  Author: xpanderAI
@@ -417,6 +417,93 @@ load_dotenv()
417
417
  config = Configuration()
418
418
  ```
419
419
 
420
+ ## 🏢 Self-Hosted Deployment
421
+
422
+ If you're using a self-hosted xpander.ai deployment, configure the SDK to point to your Agent Controller endpoint.
423
+
424
+ **Important**: Use the **Agent Controller API key** generated during Helm installation, not your xpander.ai cloud API key.
425
+
426
+ ### Configuration
427
+
428
+ ```bash
429
+ # Set environment variables
430
+ export XPANDER_API_KEY="your-agent-controller-api-key" # From Helm installation
431
+ export XPANDER_ORGANIZATION_ID="your-org-id"
432
+ export XPANDER_BASE_URL="https://agent-controller.my-company.com"
433
+ ```
434
+
435
+ Or configure explicitly:
436
+
437
+ ```python
438
+ from xpander_sdk import Configuration
439
+
440
+ config = Configuration(
441
+ api_key="your-agent-controller-api-key", # From Helm installation
442
+ organization_id="your-org-id",
443
+ base_url="https://agent-controller.my-company.com"
444
+ )
445
+ ```
446
+
447
+ ### Using with Agno Framework
448
+
449
+ ```python
450
+ from xpander_sdk import Backend, Configuration
451
+ from agno.agent import Agent
452
+
453
+ # Configure for self-hosted
454
+ config = Configuration(
455
+ api_key="your-agent-controller-api-key", # From Helm installation
456
+ organization_id="your-org-id",
457
+ base_url="https://agent-controller.my-company.com"
458
+ )
459
+
460
+ # Initialize Backend with self-hosted config
461
+ backend = Backend(configuration=config)
462
+
463
+ # Create agent - it will use your self-hosted infrastructure
464
+ agno_agent = Agent(**backend.get_args(agent_id="agent-123"))
465
+
466
+ # Run agent
467
+ result = await agno_agent.arun(
468
+ input="What can you help me with?",
469
+ stream=True
470
+ )
471
+ ```
472
+
473
+ ### Complete Self-Hosted Example
474
+
475
+ ```python
476
+ import asyncio
477
+ from xpander_sdk import Configuration, Agent
478
+
479
+ async def main():
480
+ # Configure for self-hosted deployment
481
+ config = Configuration(
482
+ api_key="your-agent-controller-api-key", # From Helm installation
483
+ organization_id="your-org-id",
484
+ base_url="https://agent-controller.my-company.com"
485
+ )
486
+
487
+ # Load agent from self-hosted deployment
488
+ agent = await Agent.aload("agent-123", configuration=config)
489
+ print(f"Agent: {agent.name}")
490
+
491
+ # Create and execute task
492
+ task = await agent.acreate_task(
493
+ prompt="Analyze Q4 sales data",
494
+ file_urls=["https://example.com/sales-q4.csv"]
495
+ )
496
+ print(f"Task created: {task.id}")
497
+ print(f"Status: {task.status}")
498
+
499
+ if __name__ == "__main__":
500
+ asyncio.run(main())
501
+ ```
502
+
503
+ **Important**: Make sure your `base_url` points to the Agent Controller endpoint (e.g., `https://agent-controller.{your-domain}`), not the root domain.
504
+
505
+ 📖 **Full Guide**: [Self-Hosted Configuration Documentation](https://docs.xpander.ai/api-reference/configuration/self-hosted)
506
+
420
507
  ## 🔄 Error Handling
421
508
 
422
509
  ```python
@@ -18,17 +18,17 @@ xpander_sdk/modules/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSu
18
18
  xpander_sdk/modules/agents/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
19
19
  xpander_sdk/modules/agents/agents_module.py,sha256=3EhKOIPb4c39GOrNt4zU4V6WbsGj7W_yWwRNSJBKmfc,6419
20
20
  xpander_sdk/modules/agents/models/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
21
- xpander_sdk/modules/agents/models/agent.py,sha256=AHHnVKML9f35mgZYBxfZ3xqK-PY1m8nhp7HLZLEKINw,14877
21
+ xpander_sdk/modules/agents/models/agent.py,sha256=tJXNogRjvwlxzJPzesdHm-NBhMOzDnWImC0ndWhyjx4,14969
22
22
  xpander_sdk/modules/agents/models/agent_list.py,sha256=byEayS2uLwDKaVT3lAHltrFocQFKpr8XEwQ6NTEEEMo,4081
23
23
  xpander_sdk/modules/agents/models/knowledge_bases.py,sha256=YimpjVJxWe8YTbGMD6oGQOA_YV8ztHQHTTBOaBB44ZM,1037
24
24
  xpander_sdk/modules/agents/sub_modules/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
25
- xpander_sdk/modules/agents/sub_modules/agent.py,sha256=yMK1xOZWoOSPBkbc2y5Ee4rvUBGsuCSu81WkFvQ3pCA,35900
25
+ xpander_sdk/modules/agents/sub_modules/agent.py,sha256=CKMIlytfDStAoCBzOeJp7VGK6Ti5523TLxK60ZxKink,36098
26
26
  xpander_sdk/modules/agents/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
27
27
  xpander_sdk/modules/agents/utils/generic.py,sha256=XbG4OeHMQo4gVYCsasMlW_b8OoqS1xL3MlUZSjXivu0,81
28
28
  xpander_sdk/modules/backend/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
29
29
  xpander_sdk/modules/backend/backend_module.py,sha256=wYghMuNXEtXgoyMXBgbMhgE7wYcbRwXJcpEyybF30kA,18927
30
30
  xpander_sdk/modules/backend/frameworks/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
31
- xpander_sdk/modules/backend/frameworks/agno.py,sha256=WGCdDnkN1R8cI1jEVHKt08B0v3Q3UUxCerEVeokhKdw,23566
31
+ xpander_sdk/modules/backend/frameworks/agno.py,sha256=YenX3C1qfmORLf4UL98QQc2dkx5wivdiDFXs3a4_gYM,23767
32
32
  xpander_sdk/modules/backend/frameworks/dispatch.py,sha256=5dP4c37C42U53VjM2kkwIRwEw1i0IN3G0YESHH7J3OE,1557
33
33
  xpander_sdk/modules/backend/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
34
34
  xpander_sdk/modules/backend/utils/mcp_oauth.py,sha256=a4xQGQwRGf2T9h38Vc9VNUwpIeY9y7Mn6B4D2G3tMQM,4387
@@ -78,8 +78,8 @@ xpander_sdk/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU
78
78
  xpander_sdk/utils/env.py,sha256=U_zIhqWgKs5fk2-HXjAaODj4oWMc5dRQ0fvw6fqVcFk,1522
79
79
  xpander_sdk/utils/event_loop.py,sha256=kJrN0upgBhyI86tkTdfHeajznrIZl44Rl6WDiDG3GHE,2516
80
80
  xpander_sdk/utils/tools.py,sha256=lyFkq2yP7DxBkyXYVlnFRwDhQCvf0fZZMDm5fBycze4,1244
81
- xpander_sdk-2.0.152.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
82
- xpander_sdk-2.0.152.dist-info/METADATA,sha256=YOG5ALyXL6eHRPKY0DacilOq6oQ0hAtb6AMBYONc_z4,12763
83
- xpander_sdk-2.0.152.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
84
- xpander_sdk-2.0.152.dist-info/top_level.txt,sha256=UCjnxQpsMy5Zoe7lmRuVDO6DI2V_6PgRFfm4oizRbVs,12
85
- xpander_sdk-2.0.152.dist-info/RECORD,,
81
+ xpander_sdk-2.0.154.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
82
+ xpander_sdk-2.0.154.dist-info/METADATA,sha256=M9KeDREZGfS-bXh6yOBMwoIo2o1T705i_aXTrcy_Yyk,15312
83
+ xpander_sdk-2.0.154.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
84
+ xpander_sdk-2.0.154.dist-info/top_level.txt,sha256=UCjnxQpsMy5Zoe7lmRuVDO6DI2V_6PgRFfm4oizRbVs,12
85
+ xpander_sdk-2.0.154.dist-info/RECORD,,