glaip-sdk 0.0.5__py3-none-any.whl → 0.0.6a0__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.
Files changed (42) hide show
  1. glaip_sdk/__init__.py +1 -1
  2. glaip_sdk/branding.py +3 -2
  3. glaip_sdk/cli/commands/__init__.py +1 -1
  4. glaip_sdk/cli/commands/agents.py +444 -268
  5. glaip_sdk/cli/commands/configure.py +12 -11
  6. glaip_sdk/cli/commands/mcps.py +28 -16
  7. glaip_sdk/cli/commands/models.py +5 -3
  8. glaip_sdk/cli/commands/tools.py +109 -102
  9. glaip_sdk/cli/display.py +38 -16
  10. glaip_sdk/cli/io.py +1 -1
  11. glaip_sdk/cli/main.py +26 -5
  12. glaip_sdk/cli/resolution.py +5 -4
  13. glaip_sdk/cli/utils.py +376 -157
  14. glaip_sdk/cli/validators.py +7 -2
  15. glaip_sdk/client/agents.py +184 -89
  16. glaip_sdk/client/base.py +24 -13
  17. glaip_sdk/client/validators.py +154 -94
  18. glaip_sdk/config/constants.py +0 -2
  19. glaip_sdk/models.py +4 -4
  20. glaip_sdk/utils/__init__.py +7 -7
  21. glaip_sdk/utils/client_utils.py +144 -78
  22. glaip_sdk/utils/display.py +4 -2
  23. glaip_sdk/utils/general.py +8 -6
  24. glaip_sdk/utils/import_export.py +55 -24
  25. glaip_sdk/utils/rendering/formatting.py +12 -6
  26. glaip_sdk/utils/rendering/models.py +1 -1
  27. glaip_sdk/utils/rendering/renderer/base.py +412 -248
  28. glaip_sdk/utils/rendering/renderer/console.py +6 -5
  29. glaip_sdk/utils/rendering/renderer/debug.py +94 -52
  30. glaip_sdk/utils/rendering/renderer/stream.py +93 -48
  31. glaip_sdk/utils/rendering/steps.py +103 -39
  32. glaip_sdk/utils/rich_utils.py +1 -1
  33. glaip_sdk/utils/run_renderer.py +1 -1
  34. glaip_sdk/utils/serialization.py +3 -1
  35. glaip_sdk/utils/validation.py +2 -2
  36. glaip_sdk-0.0.6a0.dist-info/METADATA +183 -0
  37. glaip_sdk-0.0.6a0.dist-info/RECORD +55 -0
  38. {glaip_sdk-0.0.5.dist-info → glaip_sdk-0.0.6a0.dist-info}/WHEEL +1 -1
  39. glaip_sdk-0.0.6a0.dist-info/entry_points.txt +3 -0
  40. glaip_sdk-0.0.5.dist-info/METADATA +0 -645
  41. glaip_sdk-0.0.5.dist-info/RECORD +0 -55
  42. glaip_sdk-0.0.5.dist-info/entry_points.txt +0 -2
@@ -1,645 +0,0 @@
1
- Metadata-Version: 2.4
2
- Name: glaip-sdk
3
- Version: 0.0.5
4
- Summary: Python SDK for GL AIP (GDP Labs AI Agent Package) - Simplified CLI Design
5
- Author-email: Raymond Christopher <raymond.christopher@gdplabs.id>
6
- License: MIT
7
- Requires-Python: >=3.10
8
- Requires-Dist: click>=8.2.0
9
- Requires-Dist: httpx>=0.28.1
10
- Requires-Dist: pydantic>=2.0.0
11
- Requires-Dist: python-dotenv<2.0.0,>=1.1.1
12
- Requires-Dist: pyyaml>=6.0.0
13
- Requires-Dist: questionary<3.0.0,>=2.1.0
14
- Requires-Dist: readchar<5.0.0,>=4.2.1
15
- Requires-Dist: rich>=13.0.0
16
- Provides-Extra: dev
17
- Requires-Dist: pre-commit>=4.3.0; extra == 'dev'
18
- Requires-Dist: pytest-asyncio>=0.23.6; extra == 'dev'
19
- Requires-Dist: pytest-cov>=4.0.0; extra == 'dev'
20
- Requires-Dist: pytest-dotenv>=0.5.2; extra == 'dev'
21
- Requires-Dist: pytest-xdist>=3.8.0; extra == 'dev'
22
- Requires-Dist: pytest>=7.0.0; extra == 'dev'
23
- Description-Content-Type: text/markdown
24
-
25
- # GL AIP SDK — Enterprise AI Agent Package (Python)
26
-
27
- [![Python 3.10+](https://img.shields.io/badge/python-3.10+-blue.svg)](https://www.python.org/downloads/)
28
- [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
29
- [![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
30
-
31
- > **Build, run, and manage AI agents with a minimal, production-ready Python API.**
32
-
33
- - **Simple**: `Client()` → create resources → `agent.run("...")`
34
- - **Strong**: typed models (Pydantic), robust errors, clean streaming renderer
35
- - **Enterprise-ready**: shared HTTP session, timeouts/retries, consistent resource lifecycle
36
- - **Secure**: automatic recursive secret masking; no telemetry; TLS recommended
37
- - **Modern CLI**: rich terminal experience, subsequence-based fuzzy search, smart paging, multiple output formats
38
-
39
- ---
40
-
41
- ## 📋 Table of Contents
42
-
43
- - [Quick Start](#-quick-start-30-seconds)
44
- - [Features](#-features)
45
- - [Latest Improvements](#️-latest-improvements)
46
- - [Use Cases & Industries](#-use-cases--industries)
47
- - [Performance & Scalability](#-performance--scalability)
48
- - [Core API](#core-api-in-60-seconds)
49
- - [CLI](#cli)
50
- - [Configuration](#configuration)
51
- - [Learning Path](#learning-path)
52
- - [Development](#development)
53
- - [Error Handling](#️-error-handling)
54
- - [Troubleshooting](#️-troubleshooting)
55
- - [Getting Help & Support](#️-getting-help--support)
56
- - [Why Choose AIP SDK?](#️-why-choose-aip-sdk)
57
-
58
- ---
59
-
60
- ## 🚀 Installation
61
-
62
- > **📋 Current Status**: The AIP SDK is currently available for local development. Global installation from PyPI will be available once the package is published.
63
-
64
- ### Option 1: Local Development Setup (Recommended for developers - Available Now)
65
-
66
- ```bash
67
- # Clone the repository
68
- git clone <repository-url>
69
- cd ai-agent-platform-sdk
70
-
71
- # Install in editable mode - CLI command 'aip' will be available globally
72
- pip install -e .
73
-
74
- # Verify installation
75
- aip --help
76
- ```
77
-
78
- ### Option 2: Poetry Development Setup (Alternative for Poetry users - Available Now)
79
-
80
- ```bash
81
- # Clone the repository
82
- git clone <repository-url>
83
- cd ai-agent-platform-sdk
84
-
85
- # Install dependencies and package using Poetry
86
- poetry install
87
-
88
- # Run CLI through Poetry (CLI not available globally)
89
- poetry run aip --help
90
- ```
91
-
92
- ### Option 3: Global Installation from PyPI (Coming Soon)
93
-
94
- ```bash
95
- # Install globally - CLI command 'aip' will be available everywhere
96
- # ⚠️ This option will be available once the package is published to PyPI
97
- pip install glaip-sdk
98
-
99
- # Verify installation
100
- aip --help
101
- ```
102
-
103
- **Note**: All required dependencies including `click` and `rich` are automatically installed with the package. This resolves the previous "click and rich not installed" errors that users encountered.
104
-
105
- ## 🛠️ Local Development Setup
106
-
107
- ### Prerequisites
108
-
109
- - **Python 3.10+** installed on your system
110
- - **Git** for cloning the repository
111
- - **pip** or **Poetry** for package management
112
-
113
- ### Quick Local Setup
114
-
115
- ```bash
116
- # 1. Clone the repository
117
- git clone <repository-url>
118
- cd ai-agent-platform-sdk
119
-
120
- # 2. Install in editable mode (recommended)
121
- pip install -e .
122
-
123
- # 3. Verify CLI is working
124
- aip --version
125
- aip --help
126
-
127
- # 4. Test basic functionality
128
- aip status
129
- ```
130
-
131
- ### Development Workflow
132
-
133
- ```bash
134
- # After making changes to the code:
135
- pip install -e . --force-reinstall
136
-
137
- # Or simply reinstall:
138
- pip install -e .
139
-
140
- # Test your changes:
141
- aip --version
142
- ```
143
-
144
- ### Testing Examples
145
-
146
- ```bash
147
- # Run hello world examples
148
- python3 examples/getting-started/sdk/01_hello_world_agent.py
149
- python3 examples/getting-started/sdk/02_hello_world_tool.py
150
-
151
- # List all available examples
152
- python3 examples/run_examples.py --list
153
- ```
154
-
155
- ### Updating Local Development
156
-
157
- ```bash
158
- # Pull latest changes
159
- git pull origin main
160
-
161
- # Reinstall to get latest version
162
- pip install -e . --force-reinstall
163
-
164
- # Verify version
165
- aip --version
166
-
167
- # Test new features
168
- aip --help
169
- ```
170
-
171
- ### Troubleshooting Local Setup
172
-
173
- #### Common Issues
174
-
175
- **"aip command not found" after pip install -e .**
176
- ```bash
177
- # Check if the package was installed correctly
178
- pip list | grep glaip-sdk
179
-
180
- # Reinstall with force flag
181
- pip install -e . --force-reinstall
182
-
183
- # Verify the CLI script was created
184
- which aip
185
- ```
186
-
187
- **Permission errors during installation**
188
- ```bash
189
- # Use user installation (recommended)
190
- pip install -e . --user
191
-
192
- # Or use virtual environment
193
- python3 -m venv venv
194
- source venv/bin/activate
195
- pip install -e .
196
- ```
197
-
198
- **Dependency conflicts**
199
- ```bash
200
- # Clean install
201
- pip uninstall glaip-sdk -y
202
- pip install -e . --no-deps
203
- pip install -e .
204
- ```
205
-
206
- ## ⚡ Quick Start (30 seconds)
207
-
208
- ```bash
209
- # Option 1: Local development setup (Available Now)
210
- git clone <repository-url>
211
- cd ai-agent-platform-sdk
212
- pip install -e .
213
-
214
- # Option 2: Install globally from PyPI (Coming Soon)
215
- # pip install glaip-sdk
216
-
217
- export AIP_API_KEY="your-api-key"
218
- export AIP_API_URL="https://your-platform.com/api"
219
- ```
220
-
221
- **Python SDK:**
222
- ```python
223
- from glaip_sdk import Client
224
-
225
- client = Client()
226
- agent = client.create_agent(name="hello", instruction="You are a helpful assistant.")
227
- print(agent.run("Hello! What can you do?"))
228
- agent.delete()
229
- ```
230
-
231
- **CLI:**
232
- ```bash
233
- # Configure and create your first agent
234
- aip configure
235
- aip agents create --name "hello" --instruction "You are a helpful assistant"
236
- aip agents run <AGENT_ID> --input "Hello! What can you do?"
237
- aip agents delete <AGENT_ID>
238
- ```
239
-
240
- **That's it.** You created, ran, and cleaned up your first agent. 🎉
241
-
242
- ---
243
-
244
- ## 🔧 **Connection & Timeouts**
245
-
246
- ```python
247
- from glaip_sdk import Client
248
-
249
- # Auto-config from environment
250
- with Client(timeout=60.0) as client: # shared HTTP session, closes on exit
251
- print(len(client.list_agents()))
252
-
253
- # Or explicit configuration
254
- client = Client(
255
- api_url="https://your-platform.com/api",
256
- api_key="your-key",
257
- timeout=120.0
258
- )
259
- ```
260
-
261
- ---
262
-
263
- ## ✨ Features
264
-
265
- * **Python SDK**: Simple `Client()` → create resources → `agent.run("...")`
266
- * **CLI Interface**: Full command-line control with `aip` commands
267
- * **Typed Models**: Pydantic-powered `Agent`, `Tool`, `MCP` with `.run()`, `.update()`, and `.delete()` methods
268
- * **Streaming UX**: Live markdown, tool/sub-agent steps, and theme options (`AIP_THEME`, `AIP_NO_EMOJI`)
269
- * **Shared Session**: All sub-clients share one HTTP session for reliability and performance
270
- * **🔐 Enterprise Security**: Automatic recursive secret masking for sensitive data
271
- * **📱 Multiple Output Formats**: Rich, JSON, Plain text, and Markdown views
272
- * **🎯 Modern CLI Experience**: Subsequence-based fuzzy search, smart paging, and intuitive navigation
273
- * **⚡ Performance**: Optimized HTTP sessions, connection pooling, and efficient streaming
274
- * **🛡️ Reliability**: Comprehensive error handling, configurable timeouts, and graceful degradation
275
- * **🔧 Developer Tools**: Rich debugging, comprehensive logging, and testing utilities
276
-
277
- ---
278
-
279
- ## 🎯 **Use Cases & Industries**
280
-
281
- ### **🚀 Development & DevOps**
282
- - **CI/CD Automation**: Deploy agents to manage build pipelines and deployments
283
- - **Code Review**: Automated code analysis and quality checks
284
- - **Infrastructure Management**: Cloud resource provisioning and monitoring
285
- - **Testing Automation**: Intelligent test generation and execution
286
-
287
- ### **💼 Business Operations**
288
- - **Customer Support**: AI-powered customer service agents
289
- - **Data Analysis**: Automated insights and reporting
290
- - **Process Automation**: Streamline repetitive business workflows
291
- - **Document Processing**: Intelligent document analysis and summarization
292
-
293
- ### **🔬 Research & Analytics**
294
- - **Data Processing**: Automated data cleaning and transformation
295
- - **Research Automation**: Literature review and data synthesis
296
- - **Model Training**: Automated ML pipeline management
297
- - **Reporting**: Dynamic report generation and insights
298
-
299
- ### **🏢 Enterprise Applications**
300
- - **Compliance**: Automated regulatory compliance checking
301
- - **Security**: Threat detection and incident response
302
- - **Auditing**: Automated audit trail analysis
303
- - **Integration**: Connect with existing enterprise systems
304
-
305
- ---
306
-
307
- ## 🚀 **Performance & Scalability**
308
-
309
- ### **⚡ High Performance**
310
- - **Connection Pooling**: Efficient HTTP session reuse across requests
311
- - **Streaming Responses**: Real-time data processing without memory bloat
312
- - **Optimized Serialization**: Fast JSON parsing and response handling
313
- - **Concurrent Operations**: Support for parallel agent execution
314
-
315
- ### **📈 Scalability Features**
316
- - **Resource Management**: Automatic cleanup and lifecycle management
317
- - **Memory Efficiency**: Streaming processing for large datasets
318
- - **Timeout Handling**: Configurable timeouts for long-running operations
319
- - **Connection Management**: Efficient HTTP session reuse and connection pooling
320
-
321
- ### **🏗️ Enterprise Architecture**
322
- - **Microservices Ready**: Designed for distributed system integration
323
- - **API-First Design**: RESTful endpoints with consistent patterns
324
- - **Monitoring Support**: Built-in logging and debugging capabilities
325
- - **Security Compliance**: Enterprise-grade security and audit features
326
-
327
- **Security & Data Handling:**
328
-
329
- * **🔐 Secret Masking**: Sensitive data automatically masked in JSON, Plain, and Markdown outputs
330
- * **🔑 API Key Security**: API key read from env/config; **never logged or persisted** by default
331
- * **📊 No Telemetry**: Zero data collection or external reporting
332
- * **💡 Best Practice**: Use `export AIP_API_KEY="..."` instead of command-line flags
333
-
334
- **Windows Compatibility:**
335
-
336
- * **📄 Pager Behavior**: On Windows, automatically uses Rich's built-in pager for better ANSI support
337
-
338
- **Interactive Features (Optional Dependencies):**
339
-
340
- * **🔍 Fuzzy Search**: `prompt_toolkit` for intelligent subsequence-based search
341
- * **📋 Select Menus**: `questionary` for interactive selection menus
342
- * **🔄 Fallback Behavior**: Falls back to Rich tables when fuzzy search unavailable or non-TTY
343
-
344
- ---
345
-
346
- ## 🆕 **Latest Improvements**
347
-
348
- ### **🔐 Enhanced Security with Recursive Secret Masking**
349
- Automatically masks sensitive fields like API keys, tokens, and secrets at all levels of nested data structures:
350
-
351
- ```bash
352
- # Sensitive data is automatically masked in all views
353
- aip agents get <AGENT_ID> # API keys shown as "••••••••"
354
- aip agents list --view json # Recursive masking in JSON output
355
- ```
356
-
357
- ### **📱 Multiple Output Formats**
358
- Choose your preferred output format for any command:
359
-
360
- ```bash
361
- # Rich terminal experience (default)
362
- aip agents list
363
-
364
- # Clean JSON for scripting
365
- aip agents list --view json
366
-
367
- # Simple plain text
368
- aip agents list --view plain
369
-
370
- # Markdown tables
371
- aip agents list --view md
372
- ```
373
-
374
- ### **🎯 Enhanced CLI Experience**
375
- - **Fuzzy Search**: Intelligent search with typo tolerance
376
- - **Smart Paging**: Automatic paging for large datasets
377
- - **Rich Rendering**: Beautiful tables and panels with proper TTY detection
378
-
379
- ---
380
-
381
- ## Core API in 60 seconds
382
-
383
- ### Create & run an agent
384
-
385
- ```python
386
- from glaip_sdk import Client
387
-
388
- client = Client()
389
- agent = client.create_agent(
390
- name="helper",
391
- instruction="You are a helpful assistant."
392
- )
393
- print(agent.run("Summarize why streaming is useful."))
394
- ```
395
-
396
- ### Add a tool, then use it
397
-
398
- ```python
399
- tool = client.create_tool(
400
- file_path="my_tool.py",
401
- name="my_tool", # Optional: extracted from file if not provided
402
- description="Custom business logic" # Optional: extracted from file if not provided
403
- )
404
-
405
- agent = client.create_agent(
406
- name="tool-user",
407
- instruction="Use tools when helpful.",
408
- tools=[tool.id]
409
- )
410
-
411
- print(agent.run("Use the custom tool to process today's data."))
412
- ```
413
-
414
- ### Discover models
415
-
416
- ```python
417
- for lm in client.list_language_models():
418
- print(lm["name"], lm["provider"])
419
- ```
420
-
421
- ### Update & delete
422
-
423
- ```python
424
- agent.update(instruction="Be concise.")
425
- agent.delete()
426
- tool.delete()
427
- ```
428
-
429
- ---
430
-
431
- ## CLI
432
-
433
- ```bash
434
- # Configure
435
- aip configure
436
-
437
- # Agents
438
- aip agents create --name "helper" --instruction "You are helpful"
439
- aip agents run <AGENT_ID> --input "Hello!"
440
- aip agents delete <AGENT_ID>
441
-
442
- # Tools
443
- aip tools create --file my_tool.py --name my_tool --description "Custom logic"
444
- aip tools list
445
-
446
- # Multiple output formats
447
- aip agents list --view json # JSON for scripting
448
- aip agents list --view plain # Simple text
449
- aip agents list --view md # Markdown tables
450
- ```
451
-
452
- > Run full examples: `python -m examples`
453
- > Getting started: `examples/getting-started/sdk/01_hello_world_agent.py`
454
-
455
- ---
456
-
457
- ## Configuration
458
-
459
- * **Environment variables**
460
-
461
- ```bash
462
- # Copy the example file and fill in your values
463
- cp .env.example .env
464
-
465
- # Or set manually
466
- export AIP_API_KEY="your-api-key"
467
- export AIP_API_URL="https://your-platform.com/api"
468
- ```
469
- * **Optional config file**: `~/.aip/config.yaml`
470
-
471
- ```yaml
472
- api_url: https://your-platform.com/api
473
- api_key: your-api-key
474
- ```
475
-
476
- **Configuration precedence:** CLI context flags ⟶ environment variables ⟶ `~/.aip/config.yaml`
477
- * **Renderer options**
478
-
479
- ```bash
480
- export AIP_THEME=dark # or "light"
481
- export AIP_NO_EMOJI=true # disable emojis in streaming view
482
- export AIP_PAGER_HEADER=0 # disable pager headers
483
- ```
484
- * **Security options**
485
-
486
- ```bash
487
- export AIP_MASK_OFF=1 # disable secret masking (not recommended)
488
- export AIP_MASK_FIELDS="custom_field,another_secret" # add custom fields to mask
489
- ```
490
-
491
- **Environment Variables Reference:**
492
-
493
- | Variable | Default | Purpose |
494
- | ------------------------- | ------- | ---------------------------------------- |
495
- | `AIP_API_URL` | — | Base API endpoint |
496
- | `AIP_API_KEY` | — | API key used for auth (never logged) |
497
- | `AIP_TIMEOUT` | `30.0` | Request timeout (s) |
498
- | `AIP_THEME` | `dark` | Streaming code theme (`dark`/`light`) |
499
- | `AIP_NO_EMOJI` | `false` | Disable emojis in the stream view |
500
- | `AIP_PAGER_HEADER` | `1` | Show pager header (`0/1`) |
501
- | `AIP_PAGER_WRAP` | `0` | Wrap lines in pager (drops `-S`) |
502
- | `AIP_LESS_FLAGS` | auto | Override default `less` flags |
503
- | `AIP_MASK_OFF` | `0` | Disable secret masking (not recommended) |
504
- | `AIP_MASK_FIELDS` | — | Extra comma-separated keys to mask |
505
- | `AIP_TABLE_NO_SORT` | `0` | Disable automatic table sorting |
506
- * **Enterprise features**
507
-
508
- * Single shared HTTP session across sub-clients for reliability & connection reuse
509
- * Configurable timeouts and SSE streaming out of the box
510
- * Proxy support: `HTTP_PROXY` / `HTTPS_PROXY` supported by `httpx`
511
- * **Python**: 3.10–3.12
512
- * **Versioning**: semantic versioning; breaking changes bump MAJOR
513
- * **Security**: API key only read from env/config, never logged; no telemetry by default; TLS recommended
514
-
515
- ---
516
-
517
- ## Learning Path
518
-
519
- * **Start here**
520
-
521
- * `examples/getting-started/sdk/01_hello_world_agent.py`
522
- * `examples/getting-started/sdk/02_hello_world_tool.py`
523
- * `examples/getting-started/sdk/03_hello_world_mcp.py`
524
- * **Build skills**
525
-
526
- * `examples/intermediate/sdk/01_conversation_memory.py`
527
- * `examples/intermediate/sdk/02_streaming_execution.py`
528
- * `examples/intermediate/sdk/04_agent_tool_integration.py`
529
- * **Go deeper**
530
-
531
- * `examples/advanced/sdk/01_agent_workflow_orchestration.py`
532
- * `examples/advanced/sdk/02_error_handling_patterns.py`
533
- * `examples/advanced/sdk/03_performance_optimization.py`
534
- * `examples/advanced/sdk/04_metadata_patterns.py`
535
- * **SDK Testing Scenario**
536
- See: [`SDK_TESTING_SCENARIO.md`](SDK_TESTING_SCENARIO.md) (complete end-to-end coverage plan)
537
-
538
- ---
539
-
540
- ## Development
541
-
542
- ```bash
543
- make install
544
- make test-unit
545
- make test-integration
546
- make pre-commit
547
- ```
548
-
549
- ### Versioning
550
-
551
- Single source of truth: `pyproject.toml` under `[project].version`.
552
-
553
- The SDK resolves its runtime version from installed package metadata
554
- (`glaip_sdk/_version.py`), so you do not need to edit any code files when
555
- changing the version. Update once in `pyproject.toml`, then build/reinstall.
556
-
557
- Release by tagging (e.g., `v0.0.3`) and creating a GitHub Release that
558
- matches the tag.
559
-
560
- ---
561
-
562
- ## 🚨 **Error Handling**
563
-
564
- ```python
565
- from glaip_sdk import Client
566
- from glaip_sdk.exceptions import (
567
- AuthenticationError, NotFoundError, ValidationError,
568
- RateLimitError, TimeoutError, ServerError, AIPError
569
- )
570
-
571
- try:
572
- client = Client()
573
- agent = client.create_agent(name="demo", instruction="...")
574
- print(agent.run("hello"))
575
- except AuthenticationError:
576
- print("Invalid API key or insufficient permissions.")
577
- except NotFoundError:
578
- print("Resource not found.")
579
- except RateLimitError:
580
- print("Rate limited — retry later.")
581
- except TimeoutError:
582
- print("Request timed out.")
583
- except ValidationError as e:
584
- print(f"Bad request: {e}")
585
- except ServerError as e:
586
- print(f"Server issue: {e}")
587
- except AIPError as e:
588
- print(f"SDK error: {e}")
589
- ```
590
-
591
- ---
592
-
593
- ## 🔍 **Troubleshooting**
594
-
595
- ```bash
596
- # Test the connection (auth header is required)
597
- curl -s -H "X-API-Key: $AIP_API_KEY" "$AIP_API_URL/health-check"
598
-
599
- # Verify your configuration
600
- echo "API URL: $AIP_API_URL"
601
- echo "API Key length: ${#AIP_API_KEY}"
602
-
603
- # Test CLI functionality
604
- aip --version
605
- aip agents list --view json
606
- ```
607
-
608
- ---
609
-
610
- ## 🆘 **Getting Help & Support**
611
-
612
- ### **📚 Documentation & Examples**
613
- - **Comprehensive Examples**: Run `python -m examples` for complete working samples
614
- - **Getting Started**: Start with `examples/getting-started/` for basic concepts
615
- - **Advanced Patterns**: Explore `examples/advanced/` for complex use cases
616
- - **Testing Guide**: See `SDK_TESTING_SCENARIO.md` for testing strategies
617
-
618
- ### **🔧 Troubleshooting**
619
- - **Connection Issues**: Check API URL and authentication
620
- - **Performance**: Monitor timeouts and connection pooling
621
- - **Security**: Verify secret masking and access controls
622
- - **CLI Issues**: Test with `--view json` for debugging
623
-
624
- ### **💡 Best Practices**
625
- - **Resource Management**: Always clean up resources with `.delete()`
626
- - **Error Handling**: Use try-catch blocks for robust applications
627
- - **Configuration**: Use environment variables for sensitive data
628
- - **Testing**: Test with small datasets before scaling up
629
-
630
- ---
631
-
632
- ## 🏆 **Why Choose AIP SDK?**
633
-
634
- * **🚀 Production Ready**: Built for enterprise with proper error handling, timeouts, and security
635
- * **🔐 Security First**: Automatic secret masking, no sensitive data logging
636
- * **💻 Developer Experience**: Intuitive CLI with fuzzy search and multiple output formats
637
- * **📊 Rich Streaming**: Beautiful terminal experience with live updates and tool visualization
638
- * **🔧 Simple API**: Minimal boilerplate, maximum functionality
639
- * **🏗️ Enterprise Features**: Shared sessions, proxy support, comprehensive error handling
640
-
641
- ---
642
-
643
- ## License
644
-
645
- MIT — see [LICENSE](LICENSE)
@@ -1,55 +0,0 @@
1
- glaip_sdk/__init__.py,sha256=AmY3ggfFTMzWNiHc6RYkdr-IgDqU6CZvU7PGdoyVULg,370
2
- glaip_sdk/_version.py,sha256=Rb9YLDvK1DXCVFrjlLDbtucpwKh_PyCnmZ-ia9VX3Cc,1650
3
- glaip_sdk/branding.py,sha256=TLx2j4q3QJrmsbQsvtbd9Ta99rQkX8HzYIDwy-D8tz4,5301
4
- glaip_sdk/exceptions.py,sha256=QTVtwxRHMN4e8gGn0icXphZvdugiRvcSrlMYylwGsDc,1993
5
- glaip_sdk/models.py,sha256=d8VSE1lm8jR0p_ep8cNaPZ6h2FfKudeAtCZlTxrw_wc,8729
6
- glaip_sdk/rich_components.py,sha256=pmJd-81OQE8bC9UOXtga5rsax4zphKlzCZ1JoWbbQzQ,803
7
- glaip_sdk/cli/__init__.py,sha256=xCCfuF1Yc7mpCDcfhHZTX0vizvtrDSLeT8MJ3V7m5A0,156
8
- glaip_sdk/cli/agent_config.py,sha256=VHjebw68wAdhGUzYdPH8qz10oADZPRgUQcPW6F7iHIU,2421
9
- glaip_sdk/cli/display.py,sha256=wFYReJQ0VTiQYepWd6uFLvHdYkpAj321o8e7P2zSvfY,8058
10
- glaip_sdk/cli/io.py,sha256=9DxJsuJyl_kDkxXCt661mZIpBxnfT7rvJ6Xq2a1ie5M,3326
11
- glaip_sdk/cli/main.py,sha256=U13On-zpLZLTDbruWHDhkgo6HYbcxrc5SL9ttiXsnlw,10414
12
- glaip_sdk/cli/resolution.py,sha256=FlWEg7Frtw2jwdLLfed58mTXsUv73loI677CezDp4KM,1619
13
- glaip_sdk/cli/utils.py,sha256=dwiZ6P6j75fcE_hDmLmV2IfrIlXsVdFWR4EI_1LMhqU,29653
14
- glaip_sdk/cli/validators.py,sha256=0VXG91hVlFVGYMfk5gm1XpiRqDKS_3wWfmfjPZmWPYw,5446
15
- glaip_sdk/cli/commands/__init__.py,sha256=ZAzgT9y68_BbSpuIClPoZureIxEM8gqmG9qL3iFkCyQ,173
16
- glaip_sdk/cli/commands/agents.py,sha256=xd8zFF8J7Qdes5ywFGhqSpEpe9UhB9oLJfrhT3kbr-I,33989
17
- glaip_sdk/cli/commands/configure.py,sha256=5Rr_gGc7j53CipCC9shE4uyvpX-06Sif0p2YpbAz33s,7306
18
- glaip_sdk/cli/commands/mcps.py,sha256=HK3XCnVajjnU02eFHzVtqCEJK5X39ozt9ag-fe32tRM,12476
19
- glaip_sdk/cli/commands/models.py,sha256=JhVhH-c5V-VkxJu4jXvm2hmaeU7LXuT9KOH9XWcpubg,1417
20
- glaip_sdk/cli/commands/tools.py,sha256=1Qm-FrWkxF-pjsU0jP9MSW4L1gfzqIYDiZdDy7qhQRg,17475
21
- glaip_sdk/client/__init__.py,sha256=nYLXfBVTTWwKjP0e63iumPYO4k5FifwWaELQPaPIKIg,188
22
- glaip_sdk/client/agents.py,sha256=j6MljkfVIDAL5sAa0fcIre_ZjQ_1co9pGhqFphBPT8c,30702
23
- glaip_sdk/client/base.py,sha256=NcxiM2oGKXktNi4zubljO5OhD3DCEP-X0KfuJ9QY4xg,12098
24
- glaip_sdk/client/main.py,sha256=LlvYHP7-Hy7Eq1ep1kfk337K-Oue5SdKWJpqYfX9eXY,7993
25
- glaip_sdk/client/mcps.py,sha256=yxwrAtztElYDEGhp2EHRpeYUxNsOlTLTqtw9jSKJmcI,8936
26
- glaip_sdk/client/tools.py,sha256=ZvRRbXHvd33XUKqmKAIFSvz_IO-1glTvJNyxOeivK9Q,15962
27
- glaip_sdk/client/validators.py,sha256=3MtOt11IivEwQAgzmdRGWUBzP223ytECOLU_a77x7IU,7101
28
- glaip_sdk/config/constants.py,sha256=mOH2conxcj8t-bGhwgP_iFX4NMkNEm-9k5QN2F8yqyY,925
29
- glaip_sdk/utils/__init__.py,sha256=9Y4eCjXx9_t_29CfnH-ChCf2b0YsYCLSJN9s9_HnzLo,926
30
- glaip_sdk/utils/agent_config.py,sha256=b7_J5DELyk0b_XEoi7tsxbS3wqzAKbMa-3_C-65pPIY,6791
31
- glaip_sdk/utils/client_utils.py,sha256=JdmP2OolXy83lzXxKDvswRw3bCorh2c3Gm5uy-sDeXQ,11839
32
- glaip_sdk/utils/display.py,sha256=BHVD194MS1vEWm5oaLfEx_vxGoUyHGMGcQJDnKLh2AI,3071
33
- glaip_sdk/utils/general.py,sha256=YolKDCs1wNcefQ9fOk5wd9prSxJZe1-PHsZSH1a8wDQ,2186
34
- glaip_sdk/utils/import_export.py,sha256=-XX21D0emPyC6EWpBsxySU1-lb3dkY1jJEjx11oLa6I,4503
35
- glaip_sdk/utils/resource_refs.py,sha256=0YzblJNfRhz9xhpaKE9aE68XEV-6_ssr0fIkiMVOka0,5489
36
- glaip_sdk/utils/rich_utils.py,sha256=8jPG8HsDTr6nj2vh4_be5ULCGxG1ZSinJqHZT6pdXsY,755
37
- glaip_sdk/utils/run_renderer.py,sha256=JGQzXymsptgr927-F49H1AOT5bzqErDXZMF2pOxqbfw,1365
38
- glaip_sdk/utils/serialization.py,sha256=eqbxPOBxuJ88NpES_rGWs1m7QJcs00IwhFOk1GHoZyE,7803
39
- glaip_sdk/utils/validation.py,sha256=QjBRsYFrP8MLl-xMq68Sk-Gyev-EGLGiY2l5t0ALySc,6990
40
- glaip_sdk/utils/rendering/__init__.py,sha256=vXjwk5rPhhfPyD8S0DnV4GFFEtPJp4HCCg1Um9SXfs0,70
41
- glaip_sdk/utils/rendering/formatting.py,sha256=zTF5E7BcswaIHHGFMjy1ylo6kJfpLQmeeAgFYITthcU,7165
42
- glaip_sdk/utils/rendering/models.py,sha256=ffPMv4XrKY4V2-THL69KONZf1NL7msIa-jVZAVuz2Js,1559
43
- glaip_sdk/utils/rendering/steps.py,sha256=SPImcV6f-TY_ITLyi4mSTeTu4SJxlMN7fWEKfDLL3Z8,5862
44
- glaip_sdk/utils/rendering/renderer/__init__.py,sha256=EXwVBmGkSYcype4ocAXo69Z1kXu0gpNXmhH5LW0_B7A,2939
45
- glaip_sdk/utils/rendering/renderer/base.py,sha256=LjtJmEs_pAw4uux1XgfZRJGA-myPzCCpwmYbBg0io98,34067
46
- glaip_sdk/utils/rendering/renderer/config.py,sha256=E4ER8TJJbqr1hcWjkwG7XROqLuccQy4EL99CbuLvSXE,783
47
- glaip_sdk/utils/rendering/renderer/console.py,sha256=ibQU07rmrWw-MMX6n3J2ewxuOEY-Z6RnKEfzMH2-IrA,1744
48
- glaip_sdk/utils/rendering/renderer/debug.py,sha256=VqpQAmBA3DtHVIqIeWJSgrycmzORUBk1kJ5m6b3tz4s,2884
49
- glaip_sdk/utils/rendering/renderer/panels.py,sha256=_KJohKOsyOBkqKzlC-hOSwZt1SGsJRhQwizlrRgWMis,3040
50
- glaip_sdk/utils/rendering/renderer/progress.py,sha256=i4HG_iNwtK4c3Gf2sviLCiOJ-5ydX4t-YE5dgtLOxNI,3438
51
- glaip_sdk/utils/rendering/renderer/stream.py,sha256=ZKitYkt_7OirNeERu3cc_NybQ8mWUMoEstg9UL1S090,7323
52
- glaip_sdk-0.0.5.dist-info/METADATA,sha256=GQzSBnzl6crtUAyodylGBwhWEDLQrS2BUvM93CGHSjA,19584
53
- glaip_sdk-0.0.5.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
54
- glaip_sdk-0.0.5.dist-info/entry_points.txt,sha256=65vNPUggyYnVGhuw7RhNJ8Fp2jygTcX0yxJBcBY3iLU,48
55
- glaip_sdk-0.0.5.dist-info/RECORD,,
@@ -1,2 +0,0 @@
1
- [console_scripts]
2
- aip = glaip_sdk.cli.main:main