agentkit-sdk-python 0.7.3__tar.gz → 0.7.5__tar.gz
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.
- {agentkit_sdk_python-0.7.3 → agentkit_sdk_python-0.7.5}/PKG-INFO +42 -1
- {agentkit_sdk_python-0.7.3 → agentkit_sdk_python-0.7.5}/README.md +34 -0
- agentkit_sdk_python-0.7.5/agentkit/frameworks/__init__.py +34 -0
- agentkit_sdk_python-0.7.5/agentkit/frameworks/_common.py +136 -0
- agentkit_sdk_python-0.7.5/agentkit/frameworks/langchain.py +170 -0
- agentkit_sdk_python-0.7.5/agentkit/frameworks/langgraph.py +377 -0
- agentkit_sdk_python-0.7.5/agentkit/frameworks/migration.py +86 -0
- agentkit_sdk_python-0.7.5/agentkit/frameworks/serving/__init__.py +6 -0
- agentkit_sdk_python-0.7.5/agentkit/frameworks/serving/fastapi_mount.py +65 -0
- agentkit_sdk_python-0.7.5/agentkit/frameworks/serving/langserve.py +502 -0
- {agentkit_sdk_python-0.7.3 → agentkit_sdk_python-0.7.5}/agentkit/version.py +1 -1
- {agentkit_sdk_python-0.7.3 → agentkit_sdk_python-0.7.5}/agentkit_sdk_python.egg-info/PKG-INFO +42 -1
- {agentkit_sdk_python-0.7.3 → agentkit_sdk_python-0.7.5}/agentkit_sdk_python.egg-info/SOURCES.txt +8 -4
- {agentkit_sdk_python-0.7.3 → agentkit_sdk_python-0.7.5}/agentkit_sdk_python.egg-info/requires.txt +10 -0
- {agentkit_sdk_python-0.7.3 → agentkit_sdk_python-0.7.5}/pyproject.toml +8 -1
- agentkit_sdk_python-0.7.3/agentkit/toolkit/resources/samples/__pycache__/customer_support_assistant.cpython-312.pyc +0 -0
- agentkit_sdk_python-0.7.3/agentkit/toolkit/resources/samples/__pycache__/financial_analyst.cpython-312.pyc +0 -0
- agentkit_sdk_python-0.7.3/agentkit/toolkit/resources/samples/__pycache__/simple_app_veadk.cpython-312.pyc +0 -0
- agentkit_sdk_python-0.7.3/agentkit/toolkit/resources/samples/__pycache__/simple_mcp_veadk.cpython-312.pyc +0 -0
- {agentkit_sdk_python-0.7.3 → agentkit_sdk_python-0.7.5}/LICENSE +0 -0
- {agentkit_sdk_python-0.7.3 → agentkit_sdk_python-0.7.5}/MANIFEST.in +0 -0
- {agentkit_sdk_python-0.7.3 → agentkit_sdk_python-0.7.5}/agentkit/__init__.py +0 -0
- {agentkit_sdk_python-0.7.3 → agentkit_sdk_python-0.7.5}/agentkit/apps/__init__.py +0 -0
- {agentkit_sdk_python-0.7.3 → agentkit_sdk_python-0.7.5}/agentkit/apps/a2a_app/__init__.py +0 -0
- {agentkit_sdk_python-0.7.3 → agentkit_sdk_python-0.7.5}/agentkit/apps/a2a_app/a2a_app.py +0 -0
- {agentkit_sdk_python-0.7.3 → agentkit_sdk_python-0.7.5}/agentkit/apps/a2a_app/telemetry.py +0 -0
- {agentkit_sdk_python-0.7.3 → agentkit_sdk_python-0.7.5}/agentkit/apps/agent_server_app/__init__.py +0 -0
- {agentkit_sdk_python-0.7.3 → agentkit_sdk_python-0.7.5}/agentkit/apps/agent_server_app/agent_server_app.py +0 -0
- {agentkit_sdk_python-0.7.3 → agentkit_sdk_python-0.7.5}/agentkit/apps/agent_server_app/middleware.py +0 -0
- {agentkit_sdk_python-0.7.3 → agentkit_sdk_python-0.7.5}/agentkit/apps/agent_server_app/origin.py +0 -0
- {agentkit_sdk_python-0.7.3 → agentkit_sdk_python-0.7.5}/agentkit/apps/agent_server_app/telemetry.py +0 -0
- {agentkit_sdk_python-0.7.3 → agentkit_sdk_python-0.7.5}/agentkit/apps/base_app.py +0 -0
- {agentkit_sdk_python-0.7.3 → agentkit_sdk_python-0.7.5}/agentkit/apps/mcp_app/__init__.py +0 -0
- {agentkit_sdk_python-0.7.3 → agentkit_sdk_python-0.7.5}/agentkit/apps/mcp_app/mcp_app.py +0 -0
- {agentkit_sdk_python-0.7.3 → agentkit_sdk_python-0.7.5}/agentkit/apps/mcp_app/telemetry.py +0 -0
- {agentkit_sdk_python-0.7.3 → agentkit_sdk_python-0.7.5}/agentkit/apps/simple_app/__init__.py +0 -0
- {agentkit_sdk_python-0.7.3 → agentkit_sdk_python-0.7.5}/agentkit/apps/simple_app/simple_app.py +0 -0
- {agentkit_sdk_python-0.7.3 → agentkit_sdk_python-0.7.5}/agentkit/apps/simple_app/simple_app_handlers.py +0 -0
- {agentkit_sdk_python-0.7.3 → agentkit_sdk_python-0.7.5}/agentkit/apps/simple_app/telemetry.py +0 -0
- {agentkit_sdk_python-0.7.3 → agentkit_sdk_python-0.7.5}/agentkit/apps/utils.py +0 -0
- {agentkit_sdk_python-0.7.3 → agentkit_sdk_python-0.7.5}/agentkit/auth/__init__.py +0 -0
- {agentkit_sdk_python-0.7.3 → agentkit_sdk_python-0.7.5}/agentkit/auth/_openapi.py +0 -0
- {agentkit_sdk_python-0.7.3 → agentkit_sdk_python-0.7.5}/agentkit/auth/_redact.py +0 -0
- {agentkit_sdk_python-0.7.3 → agentkit_sdk_python-0.7.5}/agentkit/auth/_sigv4.py +0 -0
- {agentkit_sdk_python-0.7.3 → agentkit_sdk_python-0.7.5}/agentkit/auth/admin.py +0 -0
- {agentkit_sdk_python-0.7.3 → agentkit_sdk_python-0.7.5}/agentkit/auth/credential_hosting.py +0 -0
- {agentkit_sdk_python-0.7.3 → agentkit_sdk_python-0.7.5}/agentkit/auth/errors.py +0 -0
- {agentkit_sdk_python-0.7.3 → agentkit_sdk_python-0.7.5}/agentkit/auth/model_login.py +0 -0
- {agentkit_sdk_python-0.7.3 → agentkit_sdk_python-0.7.5}/agentkit/auth/oauth.py +0 -0
- {agentkit_sdk_python-0.7.3 → agentkit_sdk_python-0.7.5}/agentkit/auth/profile.py +0 -0
- {agentkit_sdk_python-0.7.3 → agentkit_sdk_python-0.7.5}/agentkit/auth/providers.py +0 -0
- {agentkit_sdk_python-0.7.3 → agentkit_sdk_python-0.7.5}/agentkit/auth/resolve.py +0 -0
- {agentkit_sdk_python-0.7.3 → agentkit_sdk_python-0.7.5}/agentkit/auth/session.py +0 -0
- {agentkit_sdk_python-0.7.3 → agentkit_sdk_python-0.7.5}/agentkit/auth/ssl_trust.py +0 -0
- {agentkit_sdk_python-0.7.3 → agentkit_sdk_python-0.7.5}/agentkit/auth/sso.py +0 -0
- {agentkit_sdk_python-0.7.3 → agentkit_sdk_python-0.7.5}/agentkit/auth/store.py +0 -0
- {agentkit_sdk_python-0.7.3 → agentkit_sdk_python-0.7.5}/agentkit/auth/sts.py +0 -0
- {agentkit_sdk_python-0.7.3 → agentkit_sdk_python-0.7.5}/agentkit/client/__init__.py +0 -0
- {agentkit_sdk_python-0.7.3 → agentkit_sdk_python-0.7.5}/agentkit/client/base_agentkit_client.py +0 -0
- {agentkit_sdk_python-0.7.3 → agentkit_sdk_python-0.7.5}/agentkit/client/base_iam_client.py +0 -0
- {agentkit_sdk_python-0.7.3 → agentkit_sdk_python-0.7.5}/agentkit/client/base_service_client.py +0 -0
- {agentkit_sdk_python-0.7.3 → agentkit_sdk_python-0.7.5}/agentkit/errors.py +0 -0
- {agentkit_sdk_python-0.7.3 → agentkit_sdk_python-0.7.5}/agentkit/platform/__init__.py +0 -0
- {agentkit_sdk_python-0.7.3 → agentkit_sdk_python-0.7.5}/agentkit/platform/configuration.py +0 -0
- {agentkit_sdk_python-0.7.3 → agentkit_sdk_python-0.7.5}/agentkit/platform/console_urls.py +0 -0
- {agentkit_sdk_python-0.7.3 → agentkit_sdk_python-0.7.5}/agentkit/platform/constants.py +0 -0
- {agentkit_sdk_python-0.7.3 → agentkit_sdk_python-0.7.5}/agentkit/platform/context.py +0 -0
- {agentkit_sdk_python-0.7.3 → agentkit_sdk_python-0.7.5}/agentkit/platform/provider.py +0 -0
- {agentkit_sdk_python-0.7.3 → agentkit_sdk_python-0.7.5}/agentkit/sdk/__init__.py +0 -0
- {agentkit_sdk_python-0.7.3 → agentkit_sdk_python-0.7.5}/agentkit/sdk/account/client.py +0 -0
- {agentkit_sdk_python-0.7.3 → agentkit_sdk_python-0.7.5}/agentkit/sdk/account/types.py +0 -0
- {agentkit_sdk_python-0.7.3 → agentkit_sdk_python-0.7.5}/agentkit/sdk/identity/__init__.py +0 -0
- {agentkit_sdk_python-0.7.3 → agentkit_sdk_python-0.7.5}/agentkit/sdk/identity/auth.py +0 -0
- {agentkit_sdk_python-0.7.3 → agentkit_sdk_python-0.7.5}/agentkit/sdk/identity/client.py +0 -0
- {agentkit_sdk_python-0.7.3 → agentkit_sdk_python-0.7.5}/agentkit/sdk/identity/types.py +0 -0
- {agentkit_sdk_python-0.7.3 → agentkit_sdk_python-0.7.5}/agentkit/sdk/knowledge/__init__.py +0 -0
- {agentkit_sdk_python-0.7.3 → agentkit_sdk_python-0.7.5}/agentkit/sdk/knowledge/client.py +0 -0
- {agentkit_sdk_python-0.7.3 → agentkit_sdk_python-0.7.5}/agentkit/sdk/knowledge/types.py +0 -0
- {agentkit_sdk_python-0.7.3 → agentkit_sdk_python-0.7.5}/agentkit/sdk/mcp/__init__.py +0 -0
- {agentkit_sdk_python-0.7.3 → agentkit_sdk_python-0.7.5}/agentkit/sdk/mcp/client.py +0 -0
- {agentkit_sdk_python-0.7.3 → agentkit_sdk_python-0.7.5}/agentkit/sdk/mcp/types.py +0 -0
- {agentkit_sdk_python-0.7.3 → agentkit_sdk_python-0.7.5}/agentkit/sdk/memory/__init__.py +0 -0
- {agentkit_sdk_python-0.7.3 → agentkit_sdk_python-0.7.5}/agentkit/sdk/memory/client.py +0 -0
- {agentkit_sdk_python-0.7.3 → agentkit_sdk_python-0.7.5}/agentkit/sdk/memory/types.py +0 -0
- {agentkit_sdk_python-0.7.3 → agentkit_sdk_python-0.7.5}/agentkit/sdk/runtime/__init__.py +0 -0
- {agentkit_sdk_python-0.7.3 → agentkit_sdk_python-0.7.5}/agentkit/sdk/runtime/client.py +0 -0
- {agentkit_sdk_python-0.7.3 → agentkit_sdk_python-0.7.5}/agentkit/sdk/runtime/types.py +0 -0
- {agentkit_sdk_python-0.7.3 → agentkit_sdk_python-0.7.5}/agentkit/sdk/skills/__init__.py +0 -0
- {agentkit_sdk_python-0.7.3 → agentkit_sdk_python-0.7.5}/agentkit/sdk/skills/client.py +0 -0
- {agentkit_sdk_python-0.7.3 → agentkit_sdk_python-0.7.5}/agentkit/sdk/skills/types.py +0 -0
- {agentkit_sdk_python-0.7.3 → agentkit_sdk_python-0.7.5}/agentkit/sdk/tools/__init__.py +0 -0
- {agentkit_sdk_python-0.7.3 → agentkit_sdk_python-0.7.5}/agentkit/sdk/tools/client.py +0 -0
- {agentkit_sdk_python-0.7.3 → agentkit_sdk_python-0.7.5}/agentkit/sdk/tools/types.py +0 -0
- {agentkit_sdk_python-0.7.3 → agentkit_sdk_python-0.7.5}/agentkit/toolkit/__init__.py +0 -0
- {agentkit_sdk_python-0.7.3 → agentkit_sdk_python-0.7.5}/agentkit/toolkit/builders/__init__.py +0 -0
- {agentkit_sdk_python-0.7.3 → agentkit_sdk_python-0.7.5}/agentkit/toolkit/builders/base.py +0 -0
- {agentkit_sdk_python-0.7.3 → agentkit_sdk_python-0.7.5}/agentkit/toolkit/builders/local_docker.py +0 -0
- {agentkit_sdk_python-0.7.3 → agentkit_sdk_python-0.7.5}/agentkit/toolkit/builders/ve_pipeline.py +0 -0
- {agentkit_sdk_python-0.7.3 → agentkit_sdk_python-0.7.5}/agentkit/toolkit/cli/__init__.py +0 -0
- {agentkit_sdk_python-0.7.3 → agentkit_sdk_python-0.7.5}/agentkit/toolkit/cli/__main__.py +0 -0
- {agentkit_sdk_python-0.7.3 → agentkit_sdk_python-0.7.5}/agentkit/toolkit/cli/cli.py +0 -0
- {agentkit_sdk_python-0.7.3 → agentkit_sdk_python-0.7.5}/agentkit/toolkit/cli/cli_add.py +0 -0
- {agentkit_sdk_python-0.7.3 → agentkit_sdk_python-0.7.5}/agentkit/toolkit/cli/cli_auth.py +0 -0
- {agentkit_sdk_python-0.7.3 → agentkit_sdk_python-0.7.5}/agentkit/toolkit/cli/cli_build.py +0 -0
- {agentkit_sdk_python-0.7.3 → agentkit_sdk_python-0.7.5}/agentkit/toolkit/cli/cli_config.py +0 -0
- {agentkit_sdk_python-0.7.3 → agentkit_sdk_python-0.7.5}/agentkit/toolkit/cli/cli_delete.py +0 -0
- {agentkit_sdk_python-0.7.3 → agentkit_sdk_python-0.7.5}/agentkit/toolkit/cli/cli_deploy.py +0 -0
- {agentkit_sdk_python-0.7.3 → agentkit_sdk_python-0.7.5}/agentkit/toolkit/cli/cli_destroy.py +0 -0
- {agentkit_sdk_python-0.7.3 → agentkit_sdk_python-0.7.5}/agentkit/toolkit/cli/cli_init.py +0 -0
- {agentkit_sdk_python-0.7.3 → agentkit_sdk_python-0.7.5}/agentkit/toolkit/cli/cli_invoke.py +0 -0
- {agentkit_sdk_python-0.7.3 → agentkit_sdk_python-0.7.5}/agentkit/toolkit/cli/cli_knowledge.py +0 -0
- {agentkit_sdk_python-0.7.3 → agentkit_sdk_python-0.7.5}/agentkit/toolkit/cli/cli_launch.py +0 -0
- {agentkit_sdk_python-0.7.3 → agentkit_sdk_python-0.7.5}/agentkit/toolkit/cli/cli_list.py +0 -0
- {agentkit_sdk_python-0.7.3 → agentkit_sdk_python-0.7.5}/agentkit/toolkit/cli/cli_logs.py +0 -0
- {agentkit_sdk_python-0.7.3 → agentkit_sdk_python-0.7.5}/agentkit/toolkit/cli/cli_memory.py +0 -0
- {agentkit_sdk_python-0.7.3 → agentkit_sdk_python-0.7.5}/agentkit/toolkit/cli/cli_runtime.py +0 -0
- {agentkit_sdk_python-0.7.3 → agentkit_sdk_python-0.7.5}/agentkit/toolkit/cli/cli_skill.py +0 -0
- {agentkit_sdk_python-0.7.3 → agentkit_sdk_python-0.7.5}/agentkit/toolkit/cli/cli_skills.py +0 -0
- {agentkit_sdk_python-0.7.3 → agentkit_sdk_python-0.7.5}/agentkit/toolkit/cli/cli_skills_workflow.py +0 -0
- {agentkit_sdk_python-0.7.3 → agentkit_sdk_python-0.7.5}/agentkit/toolkit/cli/cli_status.py +0 -0
- {agentkit_sdk_python-0.7.3 → agentkit_sdk_python-0.7.5}/agentkit/toolkit/cli/cli_tools.py +0 -0
- {agentkit_sdk_python-0.7.3 → agentkit_sdk_python-0.7.5}/agentkit/toolkit/cli/cli_version.py +0 -0
- {agentkit_sdk_python-0.7.3 → agentkit_sdk_python-0.7.5}/agentkit/toolkit/cli/console_reporter.py +0 -0
- {agentkit_sdk_python-0.7.3 → agentkit_sdk_python-0.7.5}/agentkit/toolkit/cli/interactive_config.py +0 -0
- {agentkit_sdk_python-0.7.3 → agentkit_sdk_python-0.7.5}/agentkit/toolkit/cli/sandbox/__init__.py +0 -0
- {agentkit_sdk_python-0.7.3 → agentkit_sdk_python-0.7.5}/agentkit/toolkit/cli/sandbox/a2a_client.py +0 -0
- {agentkit_sdk_python-0.7.3 → agentkit_sdk_python-0.7.5}/agentkit/toolkit/cli/sandbox/agentkit_client.py +0 -0
- {agentkit_sdk_python-0.7.3 → agentkit_sdk_python-0.7.5}/agentkit/toolkit/cli/sandbox/cli.py +0 -0
- {agentkit_sdk_python-0.7.3 → agentkit_sdk_python-0.7.5}/agentkit/toolkit/cli/sandbox/cli_create.py +0 -0
- {agentkit_sdk_python-0.7.3 → agentkit_sdk_python-0.7.5}/agentkit/toolkit/cli/sandbox/cli_exec.py +0 -0
- {agentkit_sdk_python-0.7.3 → agentkit_sdk_python-0.7.5}/agentkit/toolkit/cli/sandbox/cli_file.py +0 -0
- {agentkit_sdk_python-0.7.3 → agentkit_sdk_python-0.7.5}/agentkit/toolkit/cli/sandbox/cli_get.py +0 -0
- {agentkit_sdk_python-0.7.3 → agentkit_sdk_python-0.7.5}/agentkit/toolkit/cli/sandbox/cli_invoke.py +0 -0
- {agentkit_sdk_python-0.7.3 → agentkit_sdk_python-0.7.5}/agentkit/toolkit/cli/sandbox/cli_model_login.py +0 -0
- {agentkit_sdk_python-0.7.3 → agentkit_sdk_python-0.7.5}/agentkit/toolkit/cli/sandbox/cli_mount.py +0 -0
- {agentkit_sdk_python-0.7.3 → agentkit_sdk_python-0.7.5}/agentkit/toolkit/cli/sandbox/cli_run.py +0 -0
- {agentkit_sdk_python-0.7.3 → agentkit_sdk_python-0.7.5}/agentkit/toolkit/cli/sandbox/cli_shell.py +0 -0
- {agentkit_sdk_python-0.7.3 → agentkit_sdk_python-0.7.5}/agentkit/toolkit/cli/sandbox/cli_web.py +0 -0
- {agentkit_sdk_python-0.7.3 → agentkit_sdk_python-0.7.5}/agentkit/toolkit/cli/sandbox/env_config.py +0 -0
- {agentkit_sdk_python-0.7.3 → agentkit_sdk_python-0.7.5}/agentkit/toolkit/cli/sandbox/git_config.py +0 -0
- {agentkit_sdk_python-0.7.3 → agentkit_sdk_python-0.7.5}/agentkit/toolkit/cli/sandbox/model_config.py +0 -0
- {agentkit_sdk_python-0.7.3 → agentkit_sdk_python-0.7.5}/agentkit/toolkit/cli/sandbox/sandbox_client.py +0 -0
- {agentkit_sdk_python-0.7.3 → agentkit_sdk_python-0.7.5}/agentkit/toolkit/cli/sandbox/session_create.py +0 -0
- {agentkit_sdk_python-0.7.3 → agentkit_sdk_python-0.7.5}/agentkit/toolkit/cli/sandbox/session_sync.py +0 -0
- {agentkit_sdk_python-0.7.3 → agentkit_sdk_python-0.7.5}/agentkit/toolkit/cli/sandbox/tool_resolve.py +0 -0
- {agentkit_sdk_python-0.7.3 → agentkit_sdk_python-0.7.5}/agentkit/toolkit/cli/sandbox/tos_config.py +0 -0
- {agentkit_sdk_python-0.7.3 → agentkit_sdk_python-0.7.5}/agentkit/toolkit/cli/utils.py +0 -0
- {agentkit_sdk_python-0.7.3 → agentkit_sdk_python-0.7.5}/agentkit/toolkit/config/__init__.py +0 -0
- {agentkit_sdk_python-0.7.3 → agentkit_sdk_python-0.7.5}/agentkit/toolkit/config/choice_resolvers.py +0 -0
- {agentkit_sdk_python-0.7.3 → agentkit_sdk_python-0.7.5}/agentkit/toolkit/config/cloud_provider.py +0 -0
- {agentkit_sdk_python-0.7.3 → agentkit_sdk_python-0.7.5}/agentkit/toolkit/config/config.py +0 -0
- {agentkit_sdk_python-0.7.3 → agentkit_sdk_python-0.7.5}/agentkit/toolkit/config/config_handler.py +0 -0
- {agentkit_sdk_python-0.7.3 → agentkit_sdk_python-0.7.5}/agentkit/toolkit/config/config_validator.py +0 -0
- {agentkit_sdk_python-0.7.3 → agentkit_sdk_python-0.7.5}/agentkit/toolkit/config/constants.py +0 -0
- {agentkit_sdk_python-0.7.3 → agentkit_sdk_python-0.7.5}/agentkit/toolkit/config/dataclass_utils.py +0 -0
- {agentkit_sdk_python-0.7.3 → agentkit_sdk_python-0.7.5}/agentkit/toolkit/config/docker_build_config.py +0 -0
- {agentkit_sdk_python-0.7.3 → agentkit_sdk_python-0.7.5}/agentkit/toolkit/config/global_config.py +0 -0
- {agentkit_sdk_python-0.7.3 → agentkit_sdk_python-0.7.5}/agentkit/toolkit/config/region_defaults.py +0 -0
- {agentkit_sdk_python-0.7.3 → agentkit_sdk_python-0.7.5}/agentkit/toolkit/config/region_resolver.py +0 -0
- {agentkit_sdk_python-0.7.3 → agentkit_sdk_python-0.7.5}/agentkit/toolkit/config/strategy_configs.py +0 -0
- {agentkit_sdk_python-0.7.3 → agentkit_sdk_python-0.7.5}/agentkit/toolkit/config/utils.py +0 -0
- {agentkit_sdk_python-0.7.3 → agentkit_sdk_python-0.7.5}/agentkit/toolkit/context.py +0 -0
- {agentkit_sdk_python-0.7.3 → agentkit_sdk_python-0.7.5}/agentkit/toolkit/docker/__init__.py +0 -0
- {agentkit_sdk_python-0.7.3 → agentkit_sdk_python-0.7.5}/agentkit/toolkit/docker/base_images.py +0 -0
- {agentkit_sdk_python-0.7.3 → agentkit_sdk_python-0.7.5}/agentkit/toolkit/docker/container.py +0 -0
- {agentkit_sdk_python-0.7.3 → agentkit_sdk_python-0.7.5}/agentkit/toolkit/docker/dockerfile/__init__.py +0 -0
- {agentkit_sdk_python-0.7.3 → agentkit_sdk_python-0.7.5}/agentkit/toolkit/docker/dockerfile/manager.py +0 -0
- {agentkit_sdk_python-0.7.3 → agentkit_sdk_python-0.7.5}/agentkit/toolkit/docker/dockerfile/metadata.py +0 -0
- {agentkit_sdk_python-0.7.3 → agentkit_sdk_python-0.7.5}/agentkit/toolkit/docker/utils.py +0 -0
- {agentkit_sdk_python-0.7.3 → agentkit_sdk_python-0.7.5}/agentkit/toolkit/errors.py +0 -0
- {agentkit_sdk_python-0.7.3 → agentkit_sdk_python-0.7.5}/agentkit/toolkit/executors/__init__.py +0 -0
- {agentkit_sdk_python-0.7.3 → agentkit_sdk_python-0.7.5}/agentkit/toolkit/executors/base_executor.py +0 -0
- {agentkit_sdk_python-0.7.3 → agentkit_sdk_python-0.7.5}/agentkit/toolkit/executors/build_executor.py +0 -0
- {agentkit_sdk_python-0.7.3 → agentkit_sdk_python-0.7.5}/agentkit/toolkit/executors/deploy_executor.py +0 -0
- {agentkit_sdk_python-0.7.3 → agentkit_sdk_python-0.7.5}/agentkit/toolkit/executors/init_executor.py +0 -0
- {agentkit_sdk_python-0.7.3 → agentkit_sdk_python-0.7.5}/agentkit/toolkit/executors/invoke_executor.py +0 -0
- {agentkit_sdk_python-0.7.3 → agentkit_sdk_python-0.7.5}/agentkit/toolkit/executors/lifecycle_executor.py +0 -0
- {agentkit_sdk_python-0.7.3 → agentkit_sdk_python-0.7.5}/agentkit/toolkit/executors/status_executor.py +0 -0
- {agentkit_sdk_python-0.7.3 → agentkit_sdk_python-0.7.5}/agentkit/toolkit/harness/__init__.py +0 -0
- {agentkit_sdk_python-0.7.3 → agentkit_sdk_python-0.7.5}/agentkit/toolkit/harness/config_builder.py +0 -0
- {agentkit_sdk_python-0.7.3 → agentkit_sdk_python-0.7.5}/agentkit/toolkit/harness/deploy.py +0 -0
- {agentkit_sdk_python-0.7.3 → agentkit_sdk_python-0.7.5}/agentkit/toolkit/harness/env_mapping.py +0 -0
- {agentkit_sdk_python-0.7.3 → agentkit_sdk_python-0.7.5}/agentkit/toolkit/models.py +0 -0
- {agentkit_sdk_python-0.7.3 → agentkit_sdk_python-0.7.5}/agentkit/toolkit/reporter.py +0 -0
- {agentkit_sdk_python-0.7.3 → agentkit_sdk_python-0.7.5}/agentkit/toolkit/resources/samples/a2a.py +0 -0
- {agentkit_sdk_python-0.7.3 → agentkit_sdk_python-0.7.5}/agentkit/toolkit/resources/samples/agent_server.py +0 -0
- {agentkit_sdk_python-0.7.3 → agentkit_sdk_python-0.7.5}/agentkit/toolkit/resources/samples/basic.py +0 -0
- {agentkit_sdk_python-0.7.3 → agentkit_sdk_python-0.7.5}/agentkit/toolkit/resources/samples/basic_stream.py +0 -0
- {agentkit_sdk_python-0.7.3 → agentkit_sdk_python-0.7.5}/agentkit/toolkit/resources/samples/customer_support_assistant.py +0 -0
- {agentkit_sdk_python-0.7.3 → agentkit_sdk_python-0.7.5}/agentkit/toolkit/resources/samples/eino_a2a/agent.go +0 -0
- {agentkit_sdk_python-0.7.3 → agentkit_sdk_python-0.7.5}/agentkit/toolkit/resources/samples/eino_a2a/build.sh +0 -0
- {agentkit_sdk_python-0.7.3 → agentkit_sdk_python-0.7.5}/agentkit/toolkit/resources/samples/eino_a2a/go.mod +0 -0
- {agentkit_sdk_python-0.7.3 → agentkit_sdk_python-0.7.5}/agentkit/toolkit/resources/samples/eino_a2a/go.sum +0 -0
- {agentkit_sdk_python-0.7.3 → agentkit_sdk_python-0.7.5}/agentkit/toolkit/resources/samples/eino_a2a/main.go +0 -0
- {agentkit_sdk_python-0.7.3 → agentkit_sdk_python-0.7.5}/agentkit/toolkit/resources/samples/financial_analyst.py +0 -0
- {agentkit_sdk_python-0.7.3 → agentkit_sdk_python-0.7.5}/agentkit/toolkit/resources/samples/langchain_basic_stream.py +0 -0
- {agentkit_sdk_python-0.7.3 → agentkit_sdk_python-0.7.5}/agentkit/toolkit/resources/samples/simple_app_veadk.py +0 -0
- {agentkit_sdk_python-0.7.3 → agentkit_sdk_python-0.7.5}/agentkit/toolkit/resources/samples/simple_mcp_veadk.py +0 -0
- {agentkit_sdk_python-0.7.3 → agentkit_sdk_python-0.7.5}/agentkit/toolkit/resources/samples/veadk_go_a2a/agent.go +0 -0
- {agentkit_sdk_python-0.7.3 → agentkit_sdk_python-0.7.5}/agentkit/toolkit/resources/samples/veadk_go_a2a/build.sh +0 -0
- {agentkit_sdk_python-0.7.3 → agentkit_sdk_python-0.7.5}/agentkit/toolkit/resources/samples/veadk_go_a2a/go.mod +0 -0
- {agentkit_sdk_python-0.7.3 → agentkit_sdk_python-0.7.5}/agentkit/toolkit/resources/samples/veadk_go_a2a/go.sum +0 -0
- {agentkit_sdk_python-0.7.3 → agentkit_sdk_python-0.7.5}/agentkit/toolkit/resources/samples/veadk_go_a2a/main.go +0 -0
- {agentkit_sdk_python-0.7.3 → agentkit_sdk_python-0.7.5}/agentkit/toolkit/resources/samples/veadk_go_basic/agent.go +0 -0
- {agentkit_sdk_python-0.7.3 → agentkit_sdk_python-0.7.5}/agentkit/toolkit/resources/samples/veadk_go_basic/build.sh +0 -0
- {agentkit_sdk_python-0.7.3 → agentkit_sdk_python-0.7.5}/agentkit/toolkit/resources/samples/veadk_go_basic/go.mod +0 -0
- {agentkit_sdk_python-0.7.3 → agentkit_sdk_python-0.7.5}/agentkit/toolkit/resources/samples/veadk_go_basic/go.sum +0 -0
- {agentkit_sdk_python-0.7.3 → agentkit_sdk_python-0.7.5}/agentkit/toolkit/resources/samples/veadk_go_basic/main.go +0 -0
- {agentkit_sdk_python-0.7.3 → agentkit_sdk_python-0.7.5}/agentkit/toolkit/resources/templates/code-pipeline-tos-cr-step.j2 +0 -0
- {agentkit_sdk_python-0.7.3 → agentkit_sdk_python-0.7.5}/agentkit/toolkit/resources/templates/golang/Dockerfile.j2 +0 -0
- {agentkit_sdk_python-0.7.3 → agentkit_sdk_python-0.7.5}/agentkit/toolkit/resources/templates/python/Dockerfile.j2 +0 -0
- {agentkit_sdk_python-0.7.3 → agentkit_sdk_python-0.7.5}/agentkit/toolkit/resources/wrappers/wrapper_basic.py.jinja2 +0 -0
- {agentkit_sdk_python-0.7.3 → agentkit_sdk_python-0.7.5}/agentkit/toolkit/resources/wrappers/wrapper_stream.py.jinja2 +0 -0
- {agentkit_sdk_python-0.7.3 → agentkit_sdk_python-0.7.5}/agentkit/toolkit/runners/__init__.py +0 -0
- {agentkit_sdk_python-0.7.3 → agentkit_sdk_python-0.7.5}/agentkit/toolkit/runners/base.py +0 -0
- {agentkit_sdk_python-0.7.3 → agentkit_sdk_python-0.7.5}/agentkit/toolkit/runners/local_docker.py +0 -0
- {agentkit_sdk_python-0.7.3 → agentkit_sdk_python-0.7.5}/agentkit/toolkit/runners/ve_agentkit.py +0 -0
- {agentkit_sdk_python-0.7.3 → agentkit_sdk_python-0.7.5}/agentkit/toolkit/sdk/__init__.py +0 -0
- {agentkit_sdk_python-0.7.3 → agentkit_sdk_python-0.7.5}/agentkit/toolkit/sdk/bindings/__init__.py +0 -0
- {agentkit_sdk_python-0.7.3 → agentkit_sdk_python-0.7.5}/agentkit/toolkit/sdk/bindings/memory.py +0 -0
- {agentkit_sdk_python-0.7.3 → agentkit_sdk_python-0.7.5}/agentkit/toolkit/sdk/builder.py +0 -0
- {agentkit_sdk_python-0.7.3 → agentkit_sdk_python-0.7.5}/agentkit/toolkit/sdk/client.py +0 -0
- {agentkit_sdk_python-0.7.3 → agentkit_sdk_python-0.7.5}/agentkit/toolkit/sdk/config.py +0 -0
- {agentkit_sdk_python-0.7.3 → agentkit_sdk_python-0.7.5}/agentkit/toolkit/sdk/deployer.py +0 -0
- {agentkit_sdk_python-0.7.3 → agentkit_sdk_python-0.7.5}/agentkit/toolkit/sdk/initializer.py +0 -0
- {agentkit_sdk_python-0.7.3 → agentkit_sdk_python-0.7.5}/agentkit/toolkit/sdk/invoker.py +0 -0
- {agentkit_sdk_python-0.7.3 → agentkit_sdk_python-0.7.5}/agentkit/toolkit/sdk/lifecycle.py +0 -0
- {agentkit_sdk_python-0.7.3 → agentkit_sdk_python-0.7.5}/agentkit/toolkit/sdk/status.py +0 -0
- {agentkit_sdk_python-0.7.3 → agentkit_sdk_python-0.7.5}/agentkit/toolkit/strategies/__init__.py +0 -0
- {agentkit_sdk_python-0.7.3 → agentkit_sdk_python-0.7.5}/agentkit/toolkit/strategies/base_strategy.py +0 -0
- {agentkit_sdk_python-0.7.3 → agentkit_sdk_python-0.7.5}/agentkit/toolkit/strategies/cloud_strategy.py +0 -0
- {agentkit_sdk_python-0.7.3 → agentkit_sdk_python-0.7.5}/agentkit/toolkit/strategies/hybrid_strategy.py +0 -0
- {agentkit_sdk_python-0.7.3 → agentkit_sdk_python-0.7.5}/agentkit/toolkit/strategies/local_strategy.py +0 -0
- {agentkit_sdk_python-0.7.3 → agentkit_sdk_python-0.7.5}/agentkit/toolkit/utils/__init__.py +0 -0
- {agentkit_sdk_python-0.7.3 → agentkit_sdk_python-0.7.5}/agentkit/toolkit/utils/agent_parser.py +0 -0
- {agentkit_sdk_python-0.7.3 → agentkit_sdk_python-0.7.5}/agentkit/toolkit/volcengine/__init__.py +0 -0
- {agentkit_sdk_python-0.7.3 → agentkit_sdk_python-0.7.5}/agentkit/toolkit/volcengine/apmplus_logs.py +0 -0
- {agentkit_sdk_python-0.7.3 → agentkit_sdk_python-0.7.5}/agentkit/toolkit/volcengine/code_pipeline.py +0 -0
- {agentkit_sdk_python-0.7.3 → agentkit_sdk_python-0.7.5}/agentkit/toolkit/volcengine/cr.py +0 -0
- {agentkit_sdk_python-0.7.3 → agentkit_sdk_python-0.7.5}/agentkit/toolkit/volcengine/iam.py +0 -0
- {agentkit_sdk_python-0.7.3 → agentkit_sdk_python-0.7.5}/agentkit/toolkit/volcengine/services/__init__.py +0 -0
- {agentkit_sdk_python-0.7.3 → agentkit_sdk_python-0.7.5}/agentkit/toolkit/volcengine/services/cr_service.py +0 -0
- {agentkit_sdk_python-0.7.3 → agentkit_sdk_python-0.7.5}/agentkit/toolkit/volcengine/services/tos_service.py +0 -0
- {agentkit_sdk_python-0.7.3 → agentkit_sdk_python-0.7.5}/agentkit/toolkit/volcengine/sts.py +0 -0
- {agentkit_sdk_python-0.7.3 → agentkit_sdk_python-0.7.5}/agentkit/toolkit/volcengine/utils/__init__.py +0 -0
- {agentkit_sdk_python-0.7.3 → agentkit_sdk_python-0.7.5}/agentkit/toolkit/volcengine/utils/project_archiver.py +0 -0
- {agentkit_sdk_python-0.7.3 → agentkit_sdk_python-0.7.5}/agentkit/utils/__init__.py +0 -0
- {agentkit_sdk_python-0.7.3 → agentkit_sdk_python-0.7.5}/agentkit/utils/global_config_io.py +0 -0
- {agentkit_sdk_python-0.7.3 → agentkit_sdk_python-0.7.5}/agentkit/utils/http_defaults.py +0 -0
- {agentkit_sdk_python-0.7.3 → agentkit_sdk_python-0.7.5}/agentkit/utils/logging_config.py +0 -0
- {agentkit_sdk_python-0.7.3 → agentkit_sdk_python-0.7.5}/agentkit/utils/misc.py +0 -0
- {agentkit_sdk_python-0.7.3 → agentkit_sdk_python-0.7.5}/agentkit/utils/redact.py +0 -0
- {agentkit_sdk_python-0.7.3 → agentkit_sdk_python-0.7.5}/agentkit/utils/request.py +0 -0
- {agentkit_sdk_python-0.7.3 → agentkit_sdk_python-0.7.5}/agentkit/utils/template_utils.py +0 -0
- {agentkit_sdk_python-0.7.3 → agentkit_sdk_python-0.7.5}/agentkit/utils/ve_sign.py +0 -0
- {agentkit_sdk_python-0.7.3 → agentkit_sdk_python-0.7.5}/agentkit_sdk_python.egg-info/dependency_links.txt +0 -0
- {agentkit_sdk_python-0.7.3 → agentkit_sdk_python-0.7.5}/agentkit_sdk_python.egg-info/entry_points.txt +0 -0
- {agentkit_sdk_python-0.7.3 → agentkit_sdk_python-0.7.5}/agentkit_sdk_python.egg-info/top_level.txt +0 -0
- {agentkit_sdk_python-0.7.3 → agentkit_sdk_python-0.7.5}/setup.cfg +0 -0
- {agentkit_sdk_python-0.7.3 → agentkit_sdk_python-0.7.5}/tests/test_client_uses_platform_context.py +0 -0
- {agentkit_sdk_python-0.7.3 → agentkit_sdk_python-0.7.5}/tests/test_error_hierarchy.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: agentkit-sdk-python
|
|
3
|
-
Version: 0.7.
|
|
3
|
+
Version: 0.7.5
|
|
4
4
|
Summary: Python SDK for transforming any AI agent into a production-ready application. Framework-agnostic primitives for runtime, memory, authentication, and tools with volcengine-managed infrastructure.
|
|
5
5
|
Author-email: Xiangrui Cheng <innsdcc@gmail.com>, Yumeng Bao <baoyumeng.123@gmail.com>, Yaozheng Fang <fangyozheng@gmail.com>, Guodong Li <cu.eric.lee@gmail.com>
|
|
6
6
|
License: Apache License
|
|
@@ -244,6 +244,13 @@ Requires-Dist: pyreadline3; sys_platform == "win32"
|
|
|
244
244
|
Provides-Extra: extensions
|
|
245
245
|
Provides-Extra: toolkit
|
|
246
246
|
Provides-Extra: dev
|
|
247
|
+
Provides-Extra: langchain
|
|
248
|
+
Requires-Dist: langchain; extra == "langchain"
|
|
249
|
+
Provides-Extra: langgraph
|
|
250
|
+
Requires-Dist: langgraph; extra == "langgraph"
|
|
251
|
+
Provides-Extra: frameworks
|
|
252
|
+
Requires-Dist: langchain; extra == "frameworks"
|
|
253
|
+
Requires-Dist: langgraph; extra == "frameworks"
|
|
247
254
|
Dynamic: license-file
|
|
248
255
|
|
|
249
256
|
<div align="center">
|
|
@@ -333,6 +340,40 @@ pip install agentkit-sdk-python==1.0.0.dev1
|
|
|
333
340
|
|
|
334
341
|
**Note**: Development versions may contain bugs and are not recommended for production use.
|
|
335
342
|
|
|
343
|
+
## Release Process
|
|
344
|
+
|
|
345
|
+
Stable releases are published from GitHub tags. The source tree keeps the
|
|
346
|
+
release version in `pyproject.toml` and `agentkit/version.py`, and the GitHub
|
|
347
|
+
workflow verifies that the pushed tag matches those files before building and
|
|
348
|
+
publishing the package.
|
|
349
|
+
|
|
350
|
+
The release workflow must already exist on `main` before you push the release
|
|
351
|
+
tag. For `0.7.5`, merge the tag-release automation change first, then create
|
|
352
|
+
and push `v0.7.5`.
|
|
353
|
+
|
|
354
|
+
Use the following workflow for a stable release:
|
|
355
|
+
|
|
356
|
+
```bash
|
|
357
|
+
git checkout main
|
|
358
|
+
git pull github main
|
|
359
|
+
git tag v0.7.5
|
|
360
|
+
git push github v0.7.5
|
|
361
|
+
```
|
|
362
|
+
|
|
363
|
+
When the tag reaches GitHub, `.github/workflows/release-pypi.yml` will:
|
|
364
|
+
|
|
365
|
+
- verify the tag is reachable from `main`
|
|
366
|
+
- verify that `pyproject.toml` and `agentkit/version.py` match the tag version
|
|
367
|
+
- build the wheel and source distribution from the tagged commit
|
|
368
|
+
- verify the built artifacts contain the expected version metadata
|
|
369
|
+
- publish the release to PyPI using the GitHub Actions secret `PYPI_API_TOKEN`
|
|
370
|
+
|
|
371
|
+
The internal `local_build.py` helper is a separate local-only workflow and is
|
|
372
|
+
not used by the GitHub tag release.
|
|
373
|
+
|
|
374
|
+
Before using the GitHub tag release workflow, configure a project-scoped PyPI
|
|
375
|
+
API token in the repository's GitHub Actions secrets as `PYPI_API_TOKEN`.
|
|
376
|
+
|
|
336
377
|
## Security and privacy
|
|
337
378
|
|
|
338
379
|
This project takes security seriously.
|
|
@@ -85,6 +85,40 @@ pip install agentkit-sdk-python==1.0.0.dev1
|
|
|
85
85
|
|
|
86
86
|
**Note**: Development versions may contain bugs and are not recommended for production use.
|
|
87
87
|
|
|
88
|
+
## Release Process
|
|
89
|
+
|
|
90
|
+
Stable releases are published from GitHub tags. The source tree keeps the
|
|
91
|
+
release version in `pyproject.toml` and `agentkit/version.py`, and the GitHub
|
|
92
|
+
workflow verifies that the pushed tag matches those files before building and
|
|
93
|
+
publishing the package.
|
|
94
|
+
|
|
95
|
+
The release workflow must already exist on `main` before you push the release
|
|
96
|
+
tag. For `0.7.5`, merge the tag-release automation change first, then create
|
|
97
|
+
and push `v0.7.5`.
|
|
98
|
+
|
|
99
|
+
Use the following workflow for a stable release:
|
|
100
|
+
|
|
101
|
+
```bash
|
|
102
|
+
git checkout main
|
|
103
|
+
git pull github main
|
|
104
|
+
git tag v0.7.5
|
|
105
|
+
git push github v0.7.5
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
When the tag reaches GitHub, `.github/workflows/release-pypi.yml` will:
|
|
109
|
+
|
|
110
|
+
- verify the tag is reachable from `main`
|
|
111
|
+
- verify that `pyproject.toml` and `agentkit/version.py` match the tag version
|
|
112
|
+
- build the wheel and source distribution from the tagged commit
|
|
113
|
+
- verify the built artifacts contain the expected version metadata
|
|
114
|
+
- publish the release to PyPI using the GitHub Actions secret `PYPI_API_TOKEN`
|
|
115
|
+
|
|
116
|
+
The internal `local_build.py` helper is a separate local-only workflow and is
|
|
117
|
+
not used by the GitHub tag release.
|
|
118
|
+
|
|
119
|
+
Before using the GitHub tag release workflow, configure a project-scoped PyPI
|
|
120
|
+
API token in the repository's GitHub Actions secrets as `PYPI_API_TOKEN`.
|
|
121
|
+
|
|
88
122
|
## Security and privacy
|
|
89
123
|
|
|
90
124
|
This project takes security seriously.
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"""Framework adapters for running third-party agents in AgentKit apps."""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
from typing import Any
|
|
6
|
+
|
|
7
|
+
from agentkit.frameworks._common import (
|
|
8
|
+
FrameworkBridgeError,
|
|
9
|
+
UnsupportedFrameworkAgentError,
|
|
10
|
+
)
|
|
11
|
+
|
|
12
|
+
__all__ = [
|
|
13
|
+
"FrameworkBridgeError",
|
|
14
|
+
"LangChainAgentkitBridge",
|
|
15
|
+
"LangGraphAgentkitBridge",
|
|
16
|
+
"UnsupportedFrameworkAgentError",
|
|
17
|
+
"load_entry_object",
|
|
18
|
+
]
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
def __getattr__(name: str) -> Any:
|
|
22
|
+
if name == "LangChainAgentkitBridge":
|
|
23
|
+
from agentkit.frameworks.langchain import LangChainAgentkitBridge
|
|
24
|
+
|
|
25
|
+
return LangChainAgentkitBridge
|
|
26
|
+
if name == "LangGraphAgentkitBridge":
|
|
27
|
+
from agentkit.frameworks.langgraph import LangGraphAgentkitBridge
|
|
28
|
+
|
|
29
|
+
return LangGraphAgentkitBridge
|
|
30
|
+
if name == "load_entry_object":
|
|
31
|
+
from agentkit.frameworks.migration import load_entry_object
|
|
32
|
+
|
|
33
|
+
return load_entry_object
|
|
34
|
+
raise AttributeError(f"module {__name__!r} has no attribute {name!r}")
|
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
"""Shared helpers for framework-to-ADK adapters."""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
import inspect
|
|
6
|
+
import json
|
|
7
|
+
from typing import Any
|
|
8
|
+
|
|
9
|
+
from google.adk.agents.invocation_context import InvocationContext
|
|
10
|
+
from google.adk.events import Event
|
|
11
|
+
from google.genai import types
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
class FrameworkBridgeError(RuntimeError):
|
|
15
|
+
"""Base error raised by AgentKit framework adapters."""
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
class UnsupportedFrameworkAgentError(FrameworkBridgeError):
|
|
19
|
+
"""Raised when an entry object does not expose a supported agent protocol."""
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
def user_text(ctx: InvocationContext) -> str:
|
|
23
|
+
content = ctx.user_content
|
|
24
|
+
if content is None or not content.parts:
|
|
25
|
+
return ""
|
|
26
|
+
texts: list[str] = []
|
|
27
|
+
for part in content.parts:
|
|
28
|
+
text = getattr(part, "text", None)
|
|
29
|
+
if text:
|
|
30
|
+
texts.append(text)
|
|
31
|
+
return "\n".join(texts)
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
def json_text(value: Any) -> str:
|
|
35
|
+
try:
|
|
36
|
+
return json.dumps(value, ensure_ascii=False, default=str)
|
|
37
|
+
except Exception:
|
|
38
|
+
return str(value)
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
def content_to_text(content: Any) -> str:
|
|
42
|
+
if content is None:
|
|
43
|
+
return ""
|
|
44
|
+
if isinstance(content, str):
|
|
45
|
+
return content
|
|
46
|
+
if isinstance(content, dict):
|
|
47
|
+
for key in ("text", "content", "output", "answer"):
|
|
48
|
+
if key in content:
|
|
49
|
+
text = content_to_text(content[key])
|
|
50
|
+
if text:
|
|
51
|
+
return text
|
|
52
|
+
return json_text(content)
|
|
53
|
+
if isinstance(content, list):
|
|
54
|
+
return "".join(content_to_text(item) for item in content)
|
|
55
|
+
text = getattr(content, "text", None)
|
|
56
|
+
if isinstance(text, str):
|
|
57
|
+
return text
|
|
58
|
+
return str(content)
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
def chunk_to_text(value: Any) -> str:
|
|
62
|
+
if value is None:
|
|
63
|
+
return ""
|
|
64
|
+
if isinstance(value, str):
|
|
65
|
+
return value
|
|
66
|
+
content = getattr(value, "content", None)
|
|
67
|
+
if content is not None:
|
|
68
|
+
return content_to_text(content)
|
|
69
|
+
text = getattr(value, "text", None)
|
|
70
|
+
if isinstance(text, str):
|
|
71
|
+
return text
|
|
72
|
+
if isinstance(value, dict):
|
|
73
|
+
for key in ("output", "answer", "text", "content"):
|
|
74
|
+
if key in value:
|
|
75
|
+
text = chunk_to_text(value[key])
|
|
76
|
+
if text:
|
|
77
|
+
return text
|
|
78
|
+
messages = value.get("messages")
|
|
79
|
+
if isinstance(messages, (list, tuple)) and messages:
|
|
80
|
+
return chunk_to_text(messages[-1])
|
|
81
|
+
for nested in value.values():
|
|
82
|
+
text = chunk_to_text(nested)
|
|
83
|
+
if text:
|
|
84
|
+
return text
|
|
85
|
+
return json_text(value)
|
|
86
|
+
if isinstance(value, (list, tuple)):
|
|
87
|
+
for item in reversed(value):
|
|
88
|
+
text = chunk_to_text(item)
|
|
89
|
+
if text:
|
|
90
|
+
return text
|
|
91
|
+
return ""
|
|
92
|
+
return str(value)
|
|
93
|
+
|
|
94
|
+
|
|
95
|
+
def adk_event(
|
|
96
|
+
ctx: InvocationContext,
|
|
97
|
+
author: str,
|
|
98
|
+
text: str,
|
|
99
|
+
*,
|
|
100
|
+
partial: bool,
|
|
101
|
+
) -> Event:
|
|
102
|
+
return Event(
|
|
103
|
+
invocation_id=ctx.invocation_id,
|
|
104
|
+
author=author,
|
|
105
|
+
branch=ctx.branch,
|
|
106
|
+
partial=partial,
|
|
107
|
+
content=types.Content(role="model", parts=[types.Part(text=text)]),
|
|
108
|
+
)
|
|
109
|
+
|
|
110
|
+
|
|
111
|
+
async def maybe_await(value: Any) -> Any:
|
|
112
|
+
if inspect.isawaitable(value):
|
|
113
|
+
return await value
|
|
114
|
+
return value
|
|
115
|
+
|
|
116
|
+
|
|
117
|
+
def is_input_shape_error(exc: Exception) -> bool:
|
|
118
|
+
message = str(exc)
|
|
119
|
+
name = exc.__class__.__name__
|
|
120
|
+
return (
|
|
121
|
+
name == "InvalidUpdateError"
|
|
122
|
+
or "Invalid input type" in message
|
|
123
|
+
or "Must be a PromptValue, str, or list of BaseMessages" in message
|
|
124
|
+
or "Expected dict" in message
|
|
125
|
+
or "string indices must be integers" in message
|
|
126
|
+
or "'str' object is not subscriptable" in message
|
|
127
|
+
or "Input to ChatPromptTemplate is missing variables" in message
|
|
128
|
+
)
|
|
129
|
+
|
|
130
|
+
|
|
131
|
+
def chunk_delta(accumulated: str, text: str) -> str:
|
|
132
|
+
if not accumulated:
|
|
133
|
+
return text
|
|
134
|
+
if text.startswith(accumulated):
|
|
135
|
+
return text[len(accumulated) :]
|
|
136
|
+
return text
|
|
@@ -0,0 +1,170 @@
|
|
|
1
|
+
"""LangChain adapter for AgentKit apps."""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
from collections.abc import AsyncGenerator
|
|
6
|
+
from typing import Any
|
|
7
|
+
|
|
8
|
+
from google.adk.agents.base_agent import BaseAgent
|
|
9
|
+
from google.adk.agents.invocation_context import InvocationContext
|
|
10
|
+
from google.adk.events import Event
|
|
11
|
+
from pydantic import PrivateAttr
|
|
12
|
+
|
|
13
|
+
from agentkit.frameworks._common import (
|
|
14
|
+
UnsupportedFrameworkAgentError,
|
|
15
|
+
adk_event,
|
|
16
|
+
chunk_delta,
|
|
17
|
+
chunk_to_text,
|
|
18
|
+
is_input_shape_error,
|
|
19
|
+
maybe_await,
|
|
20
|
+
user_text,
|
|
21
|
+
)
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
try:
|
|
25
|
+
from langchain_core.messages import HumanMessage
|
|
26
|
+
except ImportError: # pragma: no cover - depends on optional packages.
|
|
27
|
+
HumanMessage = None # type: ignore[assignment]
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
class LangChainAgentkitBridge(BaseAgent):
|
|
31
|
+
"""Adapt a LangChain Runnable or callable to AgentKit's ADK runtime boundary."""
|
|
32
|
+
|
|
33
|
+
_runnable: Any = PrivateAttr()
|
|
34
|
+
_input_key: str = PrivateAttr(default="input")
|
|
35
|
+
|
|
36
|
+
def __init__(
|
|
37
|
+
self,
|
|
38
|
+
runnable: Any,
|
|
39
|
+
*,
|
|
40
|
+
name: str = "langchain_agent",
|
|
41
|
+
description: str = "LangChain agent adapted for AgentKit runtime",
|
|
42
|
+
input_key: str = "input",
|
|
43
|
+
) -> None:
|
|
44
|
+
super().__init__(name=name, description=description)
|
|
45
|
+
self._runnable = runnable
|
|
46
|
+
self._input_key = input_key
|
|
47
|
+
|
|
48
|
+
def _input_candidates(self, payload: dict[str, Any], text_input: str) -> list[Any]:
|
|
49
|
+
candidates: list[Any] = [payload, text_input]
|
|
50
|
+
if HumanMessage is not None:
|
|
51
|
+
message = HumanMessage(content=text_input)
|
|
52
|
+
candidates.extend(([message], {"messages": [message]}))
|
|
53
|
+
return candidates
|
|
54
|
+
|
|
55
|
+
async def _call_once(self, payload: dict[str, Any], text_input: str) -> Any:
|
|
56
|
+
candidates = self._input_candidates(payload, text_input)
|
|
57
|
+
ainvoke = getattr(self._runnable, "ainvoke", None)
|
|
58
|
+
if callable(ainvoke):
|
|
59
|
+
last_error: Exception | None = None
|
|
60
|
+
for candidate in candidates:
|
|
61
|
+
try:
|
|
62
|
+
return await ainvoke(candidate)
|
|
63
|
+
except Exception as exc:
|
|
64
|
+
if not is_input_shape_error(exc):
|
|
65
|
+
raise
|
|
66
|
+
last_error = exc
|
|
67
|
+
if last_error is not None:
|
|
68
|
+
raise last_error
|
|
69
|
+
|
|
70
|
+
invoke = getattr(self._runnable, "invoke", None)
|
|
71
|
+
if callable(invoke):
|
|
72
|
+
last_error = None
|
|
73
|
+
for candidate in candidates:
|
|
74
|
+
try:
|
|
75
|
+
return invoke(candidate)
|
|
76
|
+
except Exception as exc:
|
|
77
|
+
if not is_input_shape_error(exc):
|
|
78
|
+
raise
|
|
79
|
+
last_error = exc
|
|
80
|
+
if last_error is not None:
|
|
81
|
+
raise last_error
|
|
82
|
+
|
|
83
|
+
if callable(self._runnable):
|
|
84
|
+
last_error = None
|
|
85
|
+
for candidate in candidates:
|
|
86
|
+
try:
|
|
87
|
+
return await maybe_await(self._runnable(candidate))
|
|
88
|
+
except Exception as exc:
|
|
89
|
+
if not is_input_shape_error(exc):
|
|
90
|
+
raise
|
|
91
|
+
last_error = exc
|
|
92
|
+
if last_error is not None:
|
|
93
|
+
raise last_error
|
|
94
|
+
|
|
95
|
+
raise UnsupportedFrameworkAgentError(
|
|
96
|
+
"LangChain entry must be a Runnable-like object exposing "
|
|
97
|
+
"astream, stream, ainvoke, or invoke, or a callable that accepts the user input."
|
|
98
|
+
)
|
|
99
|
+
|
|
100
|
+
async def _stream_chunks(self, payload: dict[str, Any], text_input: str):
|
|
101
|
+
astream = getattr(self._runnable, "astream", None)
|
|
102
|
+
if callable(astream):
|
|
103
|
+
last_error: Exception | None = None
|
|
104
|
+
for candidate in self._input_candidates(payload, text_input):
|
|
105
|
+
emitted = False
|
|
106
|
+
try:
|
|
107
|
+
async for chunk in astream(candidate):
|
|
108
|
+
emitted = True
|
|
109
|
+
yield chunk
|
|
110
|
+
return
|
|
111
|
+
except Exception as exc:
|
|
112
|
+
if emitted:
|
|
113
|
+
raise
|
|
114
|
+
if not is_input_shape_error(exc):
|
|
115
|
+
raise
|
|
116
|
+
last_error = exc
|
|
117
|
+
if last_error is not None:
|
|
118
|
+
raise last_error
|
|
119
|
+
return
|
|
120
|
+
|
|
121
|
+
stream = getattr(self._runnable, "stream", None)
|
|
122
|
+
if callable(stream):
|
|
123
|
+
last_error = None
|
|
124
|
+
for candidate in self._input_candidates(payload, text_input):
|
|
125
|
+
emitted = False
|
|
126
|
+
try:
|
|
127
|
+
for chunk in stream(candidate):
|
|
128
|
+
emitted = True
|
|
129
|
+
yield chunk
|
|
130
|
+
return
|
|
131
|
+
except Exception as exc:
|
|
132
|
+
if emitted:
|
|
133
|
+
raise
|
|
134
|
+
if not is_input_shape_error(exc):
|
|
135
|
+
raise
|
|
136
|
+
last_error = exc
|
|
137
|
+
if last_error is not None:
|
|
138
|
+
raise last_error
|
|
139
|
+
|
|
140
|
+
async def _run_async_impl(
|
|
141
|
+
self,
|
|
142
|
+
ctx: InvocationContext,
|
|
143
|
+
) -> AsyncGenerator[Event, None]:
|
|
144
|
+
text_input = user_text(ctx)
|
|
145
|
+
payload = {self._input_key: text_input}
|
|
146
|
+
accumulated_text = ""
|
|
147
|
+
has_output = False
|
|
148
|
+
last_text = ""
|
|
149
|
+
streamed = False
|
|
150
|
+
|
|
151
|
+
async for chunk in self._stream_chunks(payload, text_input):
|
|
152
|
+
streamed = True
|
|
153
|
+
text = chunk_to_text(chunk)
|
|
154
|
+
if not text:
|
|
155
|
+
continue
|
|
156
|
+
delta = chunk_delta(accumulated_text, text)
|
|
157
|
+
if not delta:
|
|
158
|
+
continue
|
|
159
|
+
accumulated_text += delta
|
|
160
|
+
has_output = True
|
|
161
|
+
last_text = accumulated_text
|
|
162
|
+
yield adk_event(ctx, self.name, delta, partial=True)
|
|
163
|
+
|
|
164
|
+
if not streamed:
|
|
165
|
+
result = await self._call_once(payload, text_input)
|
|
166
|
+
last_text = chunk_to_text(result)
|
|
167
|
+
|
|
168
|
+
final_text = accumulated_text if has_output else last_text
|
|
169
|
+
if final_text:
|
|
170
|
+
yield adk_event(ctx, self.name, final_text, partial=False)
|