Examples ======== This section contains complete examples demonstrating how to use the Community DevOps Agent API. Basic Usage ----------- .. literalinclude:: ../examples/basic_usage.py :language: python :linenos: List Tasks ---------- .. literalinclude:: ../examples/list_tasks.py :language: python :linenos: Get Task -------- .. literalinclude:: ../examples/get_task.py :language: python :linenos: Interactive Monitoring ---------------------- Basic interactive monitoring: .. literalinclude:: ../examples/interactive_monitoring_timed_demo.py :language: python :linenos: Enhanced interactive monitoring: .. literalinclude:: ../examples/interactive_monitoring_enhanced.py :language: python :linenos: Knowledge Base Management ------------------------- .. literalinclude:: ../examples/knowledgebase_management.py :language: python :linenos: Test Execution Discovery ------------------------ .. literalinclude:: ../examples/test_execution_discovery.py :language: python :linenos: Goal Journal Timeline --------------------- .. literalinclude:: ../examples/goal_journal_timeline.py :language: python :linenos: Journal Timeline ---------------- .. literalinclude:: ../examples/journal_timeline.py :language: python :linenos: Configuration ------------- .. literalinclude:: ../examples/config.py :language: python :linenos: Running Examples ---------------- All examples can be run directly: .. code-block:: bash # Basic usage python examples/basic_usage.py # List tasks python examples/list_tasks.py # Interactive monitoring python examples/interactive_monitoring_enhanced.py Make sure to set your ``AGENT_SPACE_ID`` environment variable before running examples that require it. Example Output -------------- Here's what you can expect from running the basic usage example: .. code-block:: text Configuration: - Agent Space ID: your-agent-space-uuid - AWS Region: us-east-1 - User ID: 4be32b4a-9675-4dc0-97ff-7126ad28457c - Poll Interval: 2s - Default Limit: 10 - Timeout: 60s - Max Checks: 10 Service registered successfully Client created successfully Listing tasks... Found 3 tasks Task 1: - ID: task-123 - Title: Deploy application - Status: COMPLETED - Created: 2025-12-09T10:30:00Z Task 2: - ID: task-456 - Title: Run tests - Status: IN_PROGRESS - Created: 2025-12-09T11:15:00Z Task 3: - ID: task-789 - Title: Update documentation - Status: PENDING - Created: 2025-12-09T12:00:00Z