### Install All Extras with uv Source: https://github.com/a2aproject/a2a-python/blob/main/README.md Install the A2A Python SDK with all available extras using uv. ```bash uv add "a2a-sdk[all]" ``` -------------------------------- ### Install All Extras with pip Source: https://github.com/a2aproject/a2a-python/blob/main/README.md Install the A2A Python SDK with all available extras using pip. ```bash pip install "a2a-sdk[all]" ``` -------------------------------- ### Install gRPC Support with uv Source: https://github.com/a2aproject/a2a-python/blob/main/README.md Install the A2A Python SDK with gRPC support using uv. ```bash uv add "a2a-sdk[grpc]" ``` -------------------------------- ### Install All SQL Drivers with uv Source: https://github.com/a2aproject/a2a-python/blob/main/README.md Install the A2A Python SDK with all SQL database drivers using uv. ```bash uv add "a2a-sdk[sql]" ``` -------------------------------- ### Install FastAPI Integration with uv Source: https://github.com/a2aproject/a2a-python/blob/main/README.md Install the A2A Python SDK with FastAPI integration using uv. ```bash uv add "a2a-sdk[fastapi]" ``` -------------------------------- ### Install All SQL Drivers with pip Source: https://github.com/a2aproject/a2a-python/blob/main/README.md Install the A2A Python SDK with all SQL database drivers using pip. ```bash pip install "a2a-sdk[sql]" ``` -------------------------------- ### Install Core SDK with uv Source: https://github.com/a2aproject/a2a-python/blob/main/README.md Use this command to install the core A2A Python SDK using uv. ```bash uv add a2a-sdk ``` -------------------------------- ### Install HTTP Server Support with uv Source: https://github.com/a2aproject/a2a-python/blob/main/README.md Install the A2A Python SDK with HTTP server support using uv. ```bash uv add "a2a-sdk[http-server]" ``` -------------------------------- ### Install Podman Source: https://github.com/a2aproject/a2a-python/blob/main/itk/README.md Installs Podman and its necessary components on Debian-based systems. ```bash sudo apt update && sudo apt install -y podman podman-docker podman-compose ``` -------------------------------- ### Install Encryption Support with uv Source: https://github.com/a2aproject/a2a-python/blob/main/README.md Install the A2A Python SDK with encryption support using uv. ```bash uv add "a2a-sdk[encryption]" ``` -------------------------------- ### Install gRPC Support with pip Source: https://github.com/a2aproject/a2a-python/blob/main/README.md Install the A2A Python SDK with gRPC support using pip. ```bash pip install "a2a-sdk[grpc]" ``` -------------------------------- ### Install OpenTelemetry Tracing with uv Source: https://github.com/a2aproject/a2a-python/blob/main/README.md Install the A2A Python SDK with OpenTelemetry tracing support using uv. ```bash uv add "a2a-sdk[telemetry]" ``` -------------------------------- ### Install MySQL Driver with uv Source: https://github.com/a2aproject/a2a-python/blob/main/README.md Install the A2A Python SDK with MySQL database driver support using uv. ```bash uv add "a2a-sdk[mysql]" ``` -------------------------------- ### Install FastAPI Integration with pip Source: https://github.com/a2aproject/a2a-python/blob/main/README.md Install the A2A Python SDK with FastAPI integration using pip. ```bash pip install "a2a-sdk[fastapi]" ``` -------------------------------- ### Install PostgreSQL Driver with uv Source: https://github.com/a2aproject/a2a-python/blob/main/README.md Install the A2A Python SDK with PostgreSQL database driver support using uv. ```bash uv add "a2a-sdk[postgresql]" ``` -------------------------------- ### Install Core SDK with pip Source: https://github.com/a2aproject/a2a-python/blob/main/README.md Use this command to install the core A2A Python SDK using pip. ```bash pip install a2a-sdk ``` -------------------------------- ### Install SQLite Driver with uv Source: https://github.com/a2aproject/a2a-python/blob/main/README.md Install the A2A Python SDK with SQLite database driver support using uv. ```bash uv add "a2a-sdk[sqlite]" ``` -------------------------------- ### Install Encryption Support with pip Source: https://github.com/a2aproject/a2a-python/blob/main/README.md Install the A2A Python SDK with encryption support using pip. ```bash pip install "a2a-sdk[encryption]" ``` -------------------------------- ### Install OpenTelemetry Tracing with pip Source: https://github.com/a2aproject/a2a-python/blob/main/README.md Install the A2A Python SDK with OpenTelemetry tracing support using pip. ```bash pip install "a2a-sdk[telemetry]" ``` -------------------------------- ### Install HTTP Server Support with pip Source: https://github.com/a2aproject/a2a-python/blob/main/README.md Install the A2A Python SDK with HTTP server support using pip. ```bash pip install "a2a-sdk[http-server]" ``` -------------------------------- ### Install SQLite Driver with pip Source: https://github.com/a2aproject/a2a-python/blob/main/README.md Install the A2A Python SDK with SQLite database driver support using pip. ```bash pip install "a2a-sdk[sqlite]" ``` -------------------------------- ### Install MySQL Driver with pip Source: https://github.com/a2aproject/a2a-python/blob/main/README.md Install the A2A Python SDK with MySQL database driver support using pip. ```bash pip install "a2a-sdk[mysql]" ``` -------------------------------- ### Run Install-smoke Harness Source: https://github.com/a2aproject/a2a-python/blob/main/tests/install_smoke/README.md Invoke the install-smoke harness as a standalone module from a clean virtual environment. Replace `` with the desired installation profile (e.g., 'base', 'http-server', 'grpc', 'telemetry', 'sql'). ```bash python -m tests.install_smoke ``` -------------------------------- ### Install PostgreSQL Driver with pip Source: https://github.com/a2aproject/a2a-python/blob/main/README.md Install the A2A Python SDK with PostgreSQL database driver support using pip. ```bash pip install "a2a-sdk[postgresql]" ``` -------------------------------- ### Set Database URL for Migrations Source: https://github.com/a2aproject/a2a-python/blob/main/src/a2a/migrations/README.md Set the DATABASE_URL environment variable with an async-compatible driver. Examples for SQLite, PostgreSQL, and MySQL are provided. ```bash export DATABASE_URL="sqlite+aiosqlite://user:pass@host:port/your_database_name" ``` ```bash export DATABASE_URL="postgresql+asyncpg://user:pass@localhost/your_database_name" ``` ```bash export DATABASE_URL="mysql+aiomysql://user:pass@localhost/your_database_name" ``` -------------------------------- ### Run A2A Agent Server Source: https://github.com/a2aproject/a2a-python/blob/main/samples/README.md Use this command to run the A2A agent server. Ensure the Python SDK is installed. ```bash uv run python samples/hello_world_agent.py ``` -------------------------------- ### Python Correct Typing Example Source: https://github.com/a2aproject/a2a-python/blob/main/docs/ai/coding_conventions.md Use type hints for all arguments and return values in Python function definitions. Ensure all code passes 'ty' checks. ```python async def get_task_status(task: Task) -> TaskStatus: return task.status ``` -------------------------------- ### Apply A2A SDK Database Migrations Source: https://github.com/a2aproject/a2a-python/blob/main/src/a2a/migrations/README.md Run this command after installing or upgrading the SDK to ensure your database schema is up-to-date. It upgrades the 'tasks' and 'push_notification_configs' tables. ```bash uv run a2a-db ``` -------------------------------- ### Run Database Integration Tests Source: https://github.com/a2aproject/a2a-python/blob/main/tests/README.md Execute tests that require PostgreSQL and MySQL databases. This script starts Docker containers, runs tests, and then stops the containers. Use flags to specify a database or to keep containers running for debugging. ```bash ./scripts/run_db_tests.sh ``` ```bash ./scripts/run_db_tests.sh --postgres ``` ```bash ./scripts/run_db_tests.sh --mysql ``` ```bash ./scripts/run_db_tests.sh --debug ``` -------------------------------- ### Python Incorrect Typing Example Source: https://github.com/a2aproject/a2a-python/blob/main/docs/ai/coding_conventions.md Avoid omitting type hints for function arguments and return values in Python. This violates the mandatory typing convention. ```python async def get_task_status(task): # Missing type hints for argument and return value return task.status ``` -------------------------------- ### Run A2A Client Source: https://github.com/a2aproject/a2a-python/blob/main/README.md Navigate to the Helloworld sample directory and run the client script using uv. ```bash cd a2a-samples/samples/python/agents/helloworld uv run test_client.py ``` -------------------------------- ### Run A2A Remote Agent Source: https://github.com/a2aproject/a2a-python/blob/main/README.md Clone the repository, navigate to the Helloworld sample directory, and run the remote agent using uv. ```bash git clone https://github.com/a2aproject/a2a-samples.git cd a2a-samples/samples/python/agents/helloworld uv run . ``` -------------------------------- ### Specify Database URL for a Single Command Source: https://github.com/a2aproject/a2a-python/blob/main/src/a2a/migrations/README.md Use the --database-url flag to specify the database URL for a single migration command execution. ```bash uv run a2a-db --database-url "sqlite+aiosqlite:///my_database.db" ``` -------------------------------- ### Enable Verbose Output for Migrations Source: https://github.com/a2aproject/a2a-python/blob/main/src/a2a/migrations/README.md Enable verbose output for migration commands by setting sqlalchemy.engine logging to INFO. ```bash uv run a2a-db -v ``` -------------------------------- ### Configure SubUIDs/SubGIDs for Rootless Podman Source: https://github.com/a2aproject/a2a-python/blob/main/itk/README.md Configures subuids and subgids for the current user to enable rootless Podman functionality. Replace $USER with your username if necessary. ```bash sudo usermod --add-subuids 100000-165535 --add-subgids 100000-165535 $USER ``` -------------------------------- ### Run All Tests Source: https://github.com/a2aproject/a2a-python/blob/main/tests/README.md Execute all tests, excluding those that require real databases. Use the -v flag for verbose output and -s to display print statements. ```bash uv run pytest ``` ```bash uv run pytest -v -s ``` -------------------------------- ### Execute ITK Tests Source: https://github.com/a2aproject/a2a-python/blob/main/itk/README.md Runs the main ITK test script. This script clones the repository, checks out the specified revision, builds the Docker image, and executes the tests. ```bash ./run_itk.sh ``` -------------------------------- ### Specify Custom Table Names for Migrations Source: https://github.com/a2aproject/a2a-python/blob/main/src/a2a/migrations/README.md Use --tasks-table and --push-notification-configs-table flags to specify custom table names for migrations if defaults are not used. ```bash uv run a2a-db --tasks-table "my_tasks" --push-notification-configs-table "my_configs" ``` -------------------------------- ### Run Linting and Tests Source: https://github.com/a2aproject/a2a-python/blob/main/docs/ai/mandatory_checks.md Execute linting checks and run all tests. This is the primary command for ensuring code quality and correctness. ```bash ./scripts/lint.sh # ruff check --fix, ruff format, ty check uv run pytest ``` -------------------------------- ### Migrate Podman System Source: https://github.com/a2aproject/a2a-python/blob/main/itk/README.md Runs Podman system migration, typically after adding subuids or encountering permission issues. ```bash podman system migrate ``` -------------------------------- ### Generate SQL Scripts for Migrations (Offline Mode) Source: https://github.com/a2aproject/a2a-python/blob/main/src/a2a/migrations/README.md Run migrations in offline mode using the --sql flag. Migrations are generated as SQL scripts and printed to stdout instead of being applied to the database. ```bash uv run a2a-db --sql ``` -------------------------------- ### Run Specific Tests Source: https://github.com/a2aproject/a2a-python/blob/main/tests/README.md Target specific test files, functions, or directories. Ensure the path to the test file or directory is correct. ```bash uv run pytest tests/client/test_client_factory.py ``` ```bash uv run pytest tests/client/test_client_factory.py::test_client_factory_connect_with_url ``` ```bash uv run pytest tests/client/ ``` -------------------------------- ### Generate New Migration Script for SDK Contributors Source: https://github.com/a2aproject/a2a-python/blob/main/src/a2a/migrations/README.md Developers modifying SDK models can use this command to detect changes and generate a new migration script. Ensure you are in the project root. ```bash # Detect changes in models.py and generate a script uv run alembic revision --autogenerate -m "description of changes" ``` -------------------------------- ### Run Tests with Coverage (Before Commit) Source: https://github.com/a2aproject/a2a-python/blob/main/docs/ai/mandatory_checks.md Run tests with code coverage enabled, specifically when changes are made to the 'src/' directory and before committing. CI enforces a minimum coverage of 88% for the 'a2a' package. ```bash # Only before commit, when src/ changed: uv run pytest --cov=src --cov-report=term-missing ``` -------------------------------- ### Run A2A Client (Local) Source: https://github.com/a2aproject/a2a-python/blob/main/samples/README.md Connect to the local A2A agent using the interactive terminal client. This command uses default settings. ```bash uv run python samples/cli.py ``` -------------------------------- ### Verify Current Database Migration Status Source: https://github.com/a2aproject/a2a-python/blob/main/src/a2a/migrations/README.md Check the current revision applied to your database. Use the -v flag for more detailed information. ```bash uv run a2a-db current ``` ```bash # To see more details (like revision dates, if available) uv run a2a-db current -v ``` -------------------------------- ### Run A2A Client (Remote with gRPC) Source: https://github.com/a2aproject/a2a-python/blob/main/samples/README.md Connect to a remote A2A agent using the interactive terminal client, specifying a custom URL and the gRPC transport protocol. ```bash uv run python samples/cli.py --url http://192.168.1.10:41241 --transport GRPC ``` -------------------------------- ### Add New Runtime Check Source: https://github.com/a2aproject/a2a-python/blob/main/tests/install_smoke/README.md To add a new runtime check, create a module in `tests/install_smoke/runtime/` that defines a `NAME` string and a `check()` function. Register this module in `RUNTIME_CHECKS` within `__main__.py` for the relevant profiles. ```python NAME: str check() -> None ``` -------------------------------- ### Clean Test Cache Source: https://github.com/a2aproject/a2a-python/blob/main/tests/README.md Commands to clean the project's cache and remove temporary files. This can be useful for resolving test-related issues. ```bash uv clean ``` ```bash rm -fR .pytest_cache .venv __pycache__ ``` -------------------------------- ### Customize Migration with Default Owner Value Source: https://github.com/a2aproject/a2a-python/blob/main/src/a2a/migrations/README.md Pass custom values for the new 'owner' column during migration. If not set, it defaults to 'legacy_v03_no_user_info'. ```bash uv run a2a-db --add_columns_owner_last_updated-default-owner "admin_user" ``` -------------------------------- ### Downgrade Database Migrations Source: https://github.com/a2aproject/a2a-python/blob/main/src/a2a/migrations/README.md Revert database schema changes. Supports stepping back one version, downgrading to a specific revision, reverting all migrations, or doing so in offline mode. ```bash # Step back one version uv run a2a-db downgrade -1 ``` ```bash # Downgrade to a specific revision ID uv run a2a-db downgrade ``` ```bash # Revert all migrations uv run a2a-db downgrade base ``` ```bash # Revert all migrations in offline mode uv run a2a-db downgrade head:base --sql ``` -------------------------------- ### Enable Debug Logging for ITK Tests Source: https://github.com/a2aproject/a2a-python/blob/main/itk/README.md Sets the ITK_LOG_LEVEL environment variable to DEBUG to enable detailed logging during test execution. Logs will be persisted in the logs/ directory. ```bash export ITK_LOG_LEVEL=DEBUG ``` -------------------------------- ### Set ITK Revision Environment Variable Source: https://github.com/a2aproject/a2a-python/blob/main/itk/README.md Sets the A2A_ITK_REVISION environment variable to specify the a2a-itk repository version for testing. This can be a branch, tag, or commit hash. ```bash export A2A_ITK_REVISION=main ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.