xpander-sdk 2.0.152__py3-none-any.whl → 2.0.153__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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: xpander-sdk
3
- Version: 2.0.152
3
+ Version: 2.0.153
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
@@ -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.153.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
82
+ xpander_sdk-2.0.153.dist-info/METADATA,sha256=fm7JEBws1xp_mnW7EUAo7Q25xbRpBAmf8q_GzvCCRtc,15312
83
+ xpander_sdk-2.0.153.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
84
+ xpander_sdk-2.0.153.dist-info/top_level.txt,sha256=UCjnxQpsMy5Zoe7lmRuVDO6DI2V_6PgRFfm4oizRbVs,12
85
+ xpander_sdk-2.0.153.dist-info/RECORD,,