agentscope-runtime 0.1.5b2__tar.gz → 0.2.0__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.
- {agentscope_runtime-0.1.5b2/src/agentscope_runtime.egg-info → agentscope_runtime-0.2.0}/PKG-INFO +246 -111
- {agentscope_runtime-0.1.5b2 → agentscope_runtime-0.2.0}/README.md +220 -88
- {agentscope_runtime-0.1.5b2 → agentscope_runtime-0.2.0}/pyproject.toml +35 -29
- agentscope_runtime-0.2.0/src/agentscope_runtime/common/collections/in_memory_mapping.py +27 -0
- agentscope_runtime-0.2.0/src/agentscope_runtime/common/collections/redis_mapping.py +42 -0
- agentscope_runtime-0.2.0/src/agentscope_runtime/common/container_clients/agentrun_client.py +1098 -0
- agentscope_runtime-0.2.0/src/agentscope_runtime/common/container_clients/docker_client.py +250 -0
- {agentscope_runtime-0.1.5b2/src/agentscope_runtime/sandbox/manager → agentscope_runtime-0.2.0/src/agentscope_runtime/common}/container_clients/kubernetes_client.py +6 -13
- {agentscope_runtime-0.1.5b2 → agentscope_runtime-0.2.0}/src/agentscope_runtime/engine/__init__.py +12 -0
- agentscope_runtime-0.2.0/src/agentscope_runtime/engine/agents/agentscope_agent.py +567 -0
- {agentscope_runtime-0.1.5b2 → agentscope_runtime-0.2.0}/src/agentscope_runtime/engine/agents/agno_agent.py +26 -27
- {agentscope_runtime-0.1.5b2 → agentscope_runtime-0.2.0}/src/agentscope_runtime/engine/agents/autogen_agent.py +13 -8
- agentscope_runtime-0.2.0/src/agentscope_runtime/engine/agents/langgraph_agent.py +102 -0
- agentscope_runtime-0.2.0/src/agentscope_runtime/engine/agents/utils.py +53 -0
- agentscope_runtime-0.2.0/src/agentscope_runtime/engine/app/__init__.py +6 -0
- agentscope_runtime-0.2.0/src/agentscope_runtime/engine/app/agent_app.py +239 -0
- agentscope_runtime-0.2.0/src/agentscope_runtime/engine/app/base_app.py +181 -0
- agentscope_runtime-0.2.0/src/agentscope_runtime/engine/app/celery_mixin.py +92 -0
- {agentscope_runtime-0.1.5b2 → agentscope_runtime-0.2.0}/src/agentscope_runtime/engine/deployers/adapter/responses/response_api_adapter_utils.py +5 -1
- {agentscope_runtime-0.1.5b2 → agentscope_runtime-0.2.0}/src/agentscope_runtime/engine/deployers/base.py +1 -0
- {agentscope_runtime-0.1.5b2 → agentscope_runtime-0.2.0}/src/agentscope_runtime/engine/deployers/cli_fc_deploy.py +39 -20
- {agentscope_runtime-0.1.5b2 → agentscope_runtime-0.2.0}/src/agentscope_runtime/engine/deployers/kubernetes_deployer.py +12 -5
- {agentscope_runtime-0.1.5b2 → agentscope_runtime-0.2.0}/src/agentscope_runtime/engine/deployers/local_deployer.py +61 -3
- {agentscope_runtime-0.1.5b2 → agentscope_runtime-0.2.0}/src/agentscope_runtime/engine/deployers/modelstudio_deployer.py +201 -40
- {agentscope_runtime-0.1.5b2 → agentscope_runtime-0.2.0}/src/agentscope_runtime/engine/deployers/utils/docker_image_utils/runner_image_factory.py +9 -0
- {agentscope_runtime-0.1.5b2 → agentscope_runtime-0.2.0}/src/agentscope_runtime/engine/deployers/utils/package_project_utils.py +234 -3
- agentscope_runtime-0.2.0/src/agentscope_runtime/engine/deployers/utils/service_utils/fastapi_factory.py +1064 -0
- agentscope_runtime-0.2.0/src/agentscope_runtime/engine/deployers/utils/service_utils/standalone_main.py.j2 +211 -0
- {agentscope_runtime-0.1.5b2 → agentscope_runtime-0.2.0}/src/agentscope_runtime/engine/deployers/utils/wheel_packager.py +1 -1
- {agentscope_runtime-0.1.5b2 → agentscope_runtime-0.2.0}/src/agentscope_runtime/engine/helpers/helper.py +60 -41
- {agentscope_runtime-0.1.5b2 → agentscope_runtime-0.2.0}/src/agentscope_runtime/engine/runner.py +40 -24
- {agentscope_runtime-0.1.5b2 → agentscope_runtime-0.2.0}/src/agentscope_runtime/engine/schemas/agent_schemas.py +42 -0
- {agentscope_runtime-0.1.5b2 → agentscope_runtime-0.2.0}/src/agentscope_runtime/engine/schemas/modelstudio_llm.py +14 -14
- {agentscope_runtime-0.1.5b2 → agentscope_runtime-0.2.0}/src/agentscope_runtime/engine/services/sandbox_service.py +62 -70
- agentscope_runtime-0.2.0/src/agentscope_runtime/engine/services/tablestore_memory_service.py +307 -0
- agentscope_runtime-0.2.0/src/agentscope_runtime/engine/services/tablestore_rag_service.py +143 -0
- agentscope_runtime-0.2.0/src/agentscope_runtime/engine/services/tablestore_session_history_service.py +293 -0
- agentscope_runtime-0.2.0/src/agentscope_runtime/engine/services/utils/tablestore_service_utils.py +352 -0
- {agentscope_runtime-0.1.5b2 → agentscope_runtime-0.2.0}/src/agentscope_runtime/engine/tracing/__init__.py +9 -3
- agentscope_runtime-0.2.0/src/agentscope_runtime/engine/tracing/asyncio_util.py +24 -0
- {agentscope_runtime-0.1.5b2 → agentscope_runtime-0.2.0}/src/agentscope_runtime/engine/tracing/base.py +66 -34
- {agentscope_runtime-0.1.5b2 → agentscope_runtime-0.2.0}/src/agentscope_runtime/engine/tracing/local_logging_handler.py +45 -31
- agentscope_runtime-0.2.0/src/agentscope_runtime/engine/tracing/message_util.py +528 -0
- {agentscope_runtime-0.1.5b2 → agentscope_runtime-0.2.0}/src/agentscope_runtime/engine/tracing/tracing_metric.py +20 -8
- agentscope_runtime-0.2.0/src/agentscope_runtime/engine/tracing/tracing_util.py +130 -0
- agentscope_runtime-0.2.0/src/agentscope_runtime/engine/tracing/wrapper.py +946 -0
- {agentscope_runtime-0.1.5b2 → agentscope_runtime-0.2.0}/src/agentscope_runtime/sandbox/__init__.py +2 -0
- agentscope_runtime-0.2.0/src/agentscope_runtime/sandbox/box/base/__init__.py +4 -0
- {agentscope_runtime-0.1.5b2 → agentscope_runtime-0.2.0}/src/agentscope_runtime/sandbox/box/base/base_sandbox.py +6 -4
- agentscope_runtime-0.2.0/src/agentscope_runtime/sandbox/box/browser/__init__.py +4 -0
- {agentscope_runtime-0.1.5b2 → agentscope_runtime-0.2.0}/src/agentscope_runtime/sandbox/box/browser/browser_sandbox.py +10 -14
- agentscope_runtime-0.2.0/src/agentscope_runtime/sandbox/box/dummy/__init__.py +4 -0
- {agentscope_runtime-0.1.5b2 → agentscope_runtime-0.2.0}/src/agentscope_runtime/sandbox/box/dummy/dummy_sandbox.py +2 -1
- agentscope_runtime-0.2.0/src/agentscope_runtime/sandbox/box/filesystem/__init__.py +4 -0
- {agentscope_runtime-0.1.5b2 → agentscope_runtime-0.2.0}/src/agentscope_runtime/sandbox/box/filesystem/filesystem_sandbox.py +10 -7
- agentscope_runtime-0.2.0/src/agentscope_runtime/sandbox/box/gui/__init__.py +4 -0
- agentscope_runtime-0.2.0/src/agentscope_runtime/sandbox/box/gui/gui_sandbox.py +81 -0
- {agentscope_runtime-0.1.5b2 → agentscope_runtime-0.2.0}/src/agentscope_runtime/sandbox/box/sandbox.py +5 -2
- {agentscope_runtime-0.1.5b2 → agentscope_runtime-0.2.0}/src/agentscope_runtime/sandbox/box/shared/routers/generic.py +20 -1
- agentscope_runtime-0.2.0/src/agentscope_runtime/sandbox/box/training_box/__init__.py +4 -0
- {agentscope_runtime-0.1.5b2 → agentscope_runtime-0.2.0}/src/agentscope_runtime/sandbox/box/training_box/training_box.py +7 -54
- {agentscope_runtime-0.1.5b2 → agentscope_runtime-0.2.0}/src/agentscope_runtime/sandbox/build.py +143 -58
- {agentscope_runtime-0.1.5b2 → agentscope_runtime-0.2.0}/src/agentscope_runtime/sandbox/client/http_client.py +87 -59
- {agentscope_runtime-0.1.5b2 → agentscope_runtime-0.2.0}/src/agentscope_runtime/sandbox/client/training_client.py +0 -1
- agentscope_runtime-0.2.0/src/agentscope_runtime/sandbox/constant.py +31 -0
- {agentscope_runtime-0.1.5b2 → agentscope_runtime-0.2.0}/src/agentscope_runtime/sandbox/custom/custom_sandbox.py +7 -6
- {agentscope_runtime-0.1.5b2 → agentscope_runtime-0.2.0}/src/agentscope_runtime/sandbox/custom/example.py +4 -3
- {agentscope_runtime-0.1.5b2 → agentscope_runtime-0.2.0}/src/agentscope_runtime/sandbox/enums.py +1 -1
- {agentscope_runtime-0.1.5b2 → agentscope_runtime-0.2.0}/src/agentscope_runtime/sandbox/manager/sandbox_manager.py +212 -106
- {agentscope_runtime-0.1.5b2 → agentscope_runtime-0.2.0}/src/agentscope_runtime/sandbox/manager/server/app.py +82 -14
- {agentscope_runtime-0.1.5b2 → agentscope_runtime-0.2.0}/src/agentscope_runtime/sandbox/manager/server/config.py +50 -3
- {agentscope_runtime-0.1.5b2 → agentscope_runtime-0.2.0}/src/agentscope_runtime/sandbox/model/container.py +12 -23
- {agentscope_runtime-0.1.5b2 → agentscope_runtime-0.2.0}/src/agentscope_runtime/sandbox/model/manager_config.py +93 -5
- {agentscope_runtime-0.1.5b2 → agentscope_runtime-0.2.0}/src/agentscope_runtime/sandbox/registry.py +1 -1
- agentscope_runtime-0.2.0/src/agentscope_runtime/sandbox/tools/gui/__init__.py +7 -0
- agentscope_runtime-0.2.0/src/agentscope_runtime/sandbox/tools/gui/tool.py +77 -0
- {agentscope_runtime-0.1.5b2 → agentscope_runtime-0.2.0}/src/agentscope_runtime/sandbox/tools/mcp_tool.py +6 -2
- {agentscope_runtime-0.1.5b2 → agentscope_runtime-0.2.0}/src/agentscope_runtime/sandbox/tools/tool.py +4 -0
- agentscope_runtime-0.2.0/src/agentscope_runtime/sandbox/utils.py +124 -0
- {agentscope_runtime-0.1.5b2 → agentscope_runtime-0.2.0}/src/agentscope_runtime/version.py +1 -1
- {agentscope_runtime-0.1.5b2 → agentscope_runtime-0.2.0/src/agentscope_runtime.egg-info}/PKG-INFO +246 -111
- {agentscope_runtime-0.1.5b2 → agentscope_runtime-0.2.0}/src/agentscope_runtime.egg-info/SOURCES.txt +38 -22
- {agentscope_runtime-0.1.5b2 → agentscope_runtime-0.2.0}/src/agentscope_runtime.egg-info/requires.txt +25 -23
- agentscope_runtime-0.1.5b2/src/agentscope_runtime/engine/agents/agentscope_agent/__init__.py +0 -6
- agentscope_runtime-0.1.5b2/src/agentscope_runtime/engine/agents/agentscope_agent/agent.py +0 -401
- agentscope_runtime-0.1.5b2/src/agentscope_runtime/engine/agents/agentscope_agent/hooks.py +0 -169
- agentscope_runtime-0.1.5b2/src/agentscope_runtime/engine/agents/langgraph_agent.py +0 -59
- agentscope_runtime-0.1.5b2/src/agentscope_runtime/engine/agents/llm_agent.py +0 -51
- agentscope_runtime-0.1.5b2/src/agentscope_runtime/engine/deployers/utils/service_utils/fastapi_factory.py +0 -504
- agentscope_runtime-0.1.5b2/src/agentscope_runtime/engine/llms/__init__.py +0 -3
- agentscope_runtime-0.1.5b2/src/agentscope_runtime/engine/llms/base_llm.py +0 -60
- agentscope_runtime-0.1.5b2/src/agentscope_runtime/engine/llms/qwen_llm.py +0 -47
- agentscope_runtime-0.1.5b2/src/agentscope_runtime/engine/tracing/wrapper.py +0 -321
- agentscope_runtime-0.1.5b2/src/agentscope_runtime/sandbox/constant.py +0 -5
- agentscope_runtime-0.1.5b2/src/agentscope_runtime/sandbox/manager/collections/in_memory_mapping.py +0 -22
- agentscope_runtime-0.1.5b2/src/agentscope_runtime/sandbox/manager/collections/redis_mapping.py +0 -26
- agentscope_runtime-0.1.5b2/src/agentscope_runtime/sandbox/manager/container_clients/__init__.py +0 -10
- agentscope_runtime-0.1.5b2/src/agentscope_runtime/sandbox/manager/container_clients/docker_client.py +0 -422
- agentscope_runtime-0.1.5b2/src/agentscope_runtime/sandbox/manager/server/__init__.py +0 -0
- {agentscope_runtime-0.1.5b2 → agentscope_runtime-0.2.0}/LICENSE +0 -0
- {agentscope_runtime-0.1.5b2 → agentscope_runtime-0.2.0}/setup.cfg +0 -0
- {agentscope_runtime-0.1.5b2 → agentscope_runtime-0.2.0}/setup.py +0 -0
- {agentscope_runtime-0.1.5b2 → agentscope_runtime-0.2.0}/src/agentscope_runtime/__init__.py +0 -0
- {agentscope_runtime-0.1.5b2/src/agentscope_runtime/engine/deployers/adapter → agentscope_runtime-0.2.0/src/agentscope_runtime/common}/__init__.py +0 -0
- {agentscope_runtime-0.1.5b2/src/agentscope_runtime/sandbox/manager → agentscope_runtime-0.2.0/src/agentscope_runtime/common}/collections/__init__.py +0 -0
- {agentscope_runtime-0.1.5b2/src/agentscope_runtime/sandbox/manager → agentscope_runtime-0.2.0/src/agentscope_runtime/common}/collections/base_mapping.py +0 -0
- {agentscope_runtime-0.1.5b2/src/agentscope_runtime/sandbox/manager → agentscope_runtime-0.2.0/src/agentscope_runtime/common}/collections/base_queue.py +0 -0
- {agentscope_runtime-0.1.5b2/src/agentscope_runtime/sandbox/manager → agentscope_runtime-0.2.0/src/agentscope_runtime/common}/collections/base_set.py +0 -0
- {agentscope_runtime-0.1.5b2/src/agentscope_runtime/sandbox/manager → agentscope_runtime-0.2.0/src/agentscope_runtime/common}/collections/in_memory_queue.py +0 -0
- {agentscope_runtime-0.1.5b2/src/agentscope_runtime/sandbox/manager → agentscope_runtime-0.2.0/src/agentscope_runtime/common}/collections/in_memory_set.py +0 -0
- {agentscope_runtime-0.1.5b2/src/agentscope_runtime/sandbox/manager → agentscope_runtime-0.2.0/src/agentscope_runtime/common}/collections/redis_queue.py +0 -0
- {agentscope_runtime-0.1.5b2/src/agentscope_runtime/sandbox/manager → agentscope_runtime-0.2.0/src/agentscope_runtime/common}/collections/redis_set.py +0 -0
- {agentscope_runtime-0.1.5b2/src/agentscope_runtime/engine/deployers/adapter/responses → agentscope_runtime-0.2.0/src/agentscope_runtime/common/container_clients}/__init__.py +0 -0
- {agentscope_runtime-0.1.5b2/src/agentscope_runtime/sandbox/manager → agentscope_runtime-0.2.0/src/agentscope_runtime/common}/container_clients/base_client.py +0 -0
- {agentscope_runtime-0.1.5b2 → agentscope_runtime-0.2.0}/src/agentscope_runtime/engine/agents/__init__.py +0 -0
- {agentscope_runtime-0.1.5b2 → agentscope_runtime-0.2.0}/src/agentscope_runtime/engine/agents/base_agent.py +0 -0
- {agentscope_runtime-0.1.5b2 → agentscope_runtime-0.2.0}/src/agentscope_runtime/engine/deployers/__init__.py +0 -0
- {agentscope_runtime-0.1.5b2/src/agentscope_runtime/engine/deployers/utils → agentscope_runtime-0.2.0/src/agentscope_runtime/engine/deployers/adapter}/__init__.py +0 -0
- {agentscope_runtime-0.1.5b2 → agentscope_runtime-0.2.0}/src/agentscope_runtime/engine/deployers/adapter/a2a/__init__.py +0 -0
- {agentscope_runtime-0.1.5b2 → agentscope_runtime-0.2.0}/src/agentscope_runtime/engine/deployers/adapter/a2a/a2a_adapter_utils.py +0 -0
- {agentscope_runtime-0.1.5b2 → agentscope_runtime-0.2.0}/src/agentscope_runtime/engine/deployers/adapter/a2a/a2a_agent_adapter.py +0 -0
- {agentscope_runtime-0.1.5b2 → agentscope_runtime-0.2.0}/src/agentscope_runtime/engine/deployers/adapter/a2a/a2a_protocol_adapter.py +0 -0
- {agentscope_runtime-0.1.5b2 → agentscope_runtime-0.2.0}/src/agentscope_runtime/engine/deployers/adapter/protocol_adapter.py +0 -0
- {agentscope_runtime-0.1.5b2/src/agentscope_runtime/engine/misc → agentscope_runtime-0.2.0/src/agentscope_runtime/engine/deployers/adapter/responses}/__init__.py +0 -0
- {agentscope_runtime-0.1.5b2 → agentscope_runtime-0.2.0}/src/agentscope_runtime/engine/deployers/adapter/responses/response_api_agent_adapter.py +0 -0
- {agentscope_runtime-0.1.5b2 → agentscope_runtime-0.2.0}/src/agentscope_runtime/engine/deployers/adapter/responses/response_api_protocol_adapter.py +0 -0
- {agentscope_runtime-0.1.5b2/src/agentscope_runtime/engine/schemas → agentscope_runtime-0.2.0/src/agentscope_runtime/engine/deployers/utils}/__init__.py +0 -0
- {agentscope_runtime-0.1.5b2 → agentscope_runtime-0.2.0}/src/agentscope_runtime/engine/deployers/utils/deployment_modes.py +0 -0
- {agentscope_runtime-0.1.5b2 → agentscope_runtime-0.2.0}/src/agentscope_runtime/engine/deployers/utils/docker_image_utils/__init__.py +0 -0
- {agentscope_runtime-0.1.5b2 → agentscope_runtime-0.2.0}/src/agentscope_runtime/engine/deployers/utils/docker_image_utils/docker_image_builder.py +0 -0
- {agentscope_runtime-0.1.5b2 → agentscope_runtime-0.2.0}/src/agentscope_runtime/engine/deployers/utils/docker_image_utils/dockerfile_generator.py +0 -0
- {agentscope_runtime-0.1.5b2 → agentscope_runtime-0.2.0}/src/agentscope_runtime/engine/deployers/utils/service_utils/__init__.py +0 -0
- {agentscope_runtime-0.1.5b2 → agentscope_runtime-0.2.0}/src/agentscope_runtime/engine/deployers/utils/service_utils/fastapi_templates.py +0 -0
- {agentscope_runtime-0.1.5b2 → agentscope_runtime-0.2.0}/src/agentscope_runtime/engine/deployers/utils/service_utils/process_manager.py +0 -0
- {agentscope_runtime-0.1.5b2 → agentscope_runtime-0.2.0}/src/agentscope_runtime/engine/deployers/utils/service_utils/service_config.py +0 -0
- {agentscope_runtime-0.1.5b2 → agentscope_runtime-0.2.0}/src/agentscope_runtime/engine/deployers/utils/service_utils/service_factory.py +0 -0
- {agentscope_runtime-0.1.5b2 → agentscope_runtime-0.2.0}/src/agentscope_runtime/engine/helpers/agent_api_builder.py +0 -0
- {agentscope_runtime-0.1.5b2/src/agentscope_runtime/sandbox/box → agentscope_runtime-0.2.0/src/agentscope_runtime/engine/misc}/__init__.py +0 -0
- {agentscope_runtime-0.1.5b2/src/agentscope_runtime/sandbox/box/base → agentscope_runtime-0.2.0/src/agentscope_runtime/engine/schemas}/__init__.py +0 -0
- {agentscope_runtime-0.1.5b2 → agentscope_runtime-0.2.0}/src/agentscope_runtime/engine/schemas/context.py +0 -0
- {agentscope_runtime-0.1.5b2 → agentscope_runtime-0.2.0}/src/agentscope_runtime/engine/schemas/embedding.py +0 -0
- {agentscope_runtime-0.1.5b2 → agentscope_runtime-0.2.0}/src/agentscope_runtime/engine/schemas/oai_llm.py +0 -0
- {agentscope_runtime-0.1.5b2 → agentscope_runtime-0.2.0}/src/agentscope_runtime/engine/schemas/realtime.py +0 -0
- {agentscope_runtime-0.1.5b2 → agentscope_runtime-0.2.0}/src/agentscope_runtime/engine/services/__init__.py +0 -0
- {agentscope_runtime-0.1.5b2 → agentscope_runtime-0.2.0}/src/agentscope_runtime/engine/services/base.py +0 -0
- {agentscope_runtime-0.1.5b2 → agentscope_runtime-0.2.0}/src/agentscope_runtime/engine/services/context_manager.py +0 -0
- {agentscope_runtime-0.1.5b2 → agentscope_runtime-0.2.0}/src/agentscope_runtime/engine/services/environment_manager.py +0 -0
- {agentscope_runtime-0.1.5b2 → agentscope_runtime-0.2.0}/src/agentscope_runtime/engine/services/manager.py +0 -0
- {agentscope_runtime-0.1.5b2 → agentscope_runtime-0.2.0}/src/agentscope_runtime/engine/services/mem0_memory_service.py +0 -0
- {agentscope_runtime-0.1.5b2 → agentscope_runtime-0.2.0}/src/agentscope_runtime/engine/services/memory_service.py +0 -0
- {agentscope_runtime-0.1.5b2 → agentscope_runtime-0.2.0}/src/agentscope_runtime/engine/services/rag_service.py +0 -0
- {agentscope_runtime-0.1.5b2 → agentscope_runtime-0.2.0}/src/agentscope_runtime/engine/services/redis_memory_service.py +0 -0
- {agentscope_runtime-0.1.5b2 → agentscope_runtime-0.2.0}/src/agentscope_runtime/engine/services/redis_session_history_service.py +0 -0
- {agentscope_runtime-0.1.5b2 → agentscope_runtime-0.2.0}/src/agentscope_runtime/engine/services/reme_personal_memory_service.py +0 -0
- {agentscope_runtime-0.1.5b2 → agentscope_runtime-0.2.0}/src/agentscope_runtime/engine/services/reme_task_memory_service.py +0 -0
- {agentscope_runtime-0.1.5b2 → agentscope_runtime-0.2.0}/src/agentscope_runtime/engine/services/session_history_service.py +0 -0
- {agentscope_runtime-0.1.5b2/src/agentscope_runtime/sandbox/box/base/box → agentscope_runtime-0.2.0/src/agentscope_runtime/engine/services/utils}/__init__.py +0 -0
- {agentscope_runtime-0.1.5b2/src/agentscope_runtime/sandbox/box/browser → agentscope_runtime-0.2.0/src/agentscope_runtime/sandbox/box}/__init__.py +0 -0
- {agentscope_runtime-0.1.5b2/src/agentscope_runtime/sandbox/box/browser → agentscope_runtime-0.2.0/src/agentscope_runtime/sandbox/box/base}/box/__init__.py +0 -0
- {agentscope_runtime-0.1.5b2/src/agentscope_runtime/sandbox/box/dummy → agentscope_runtime-0.2.0/src/agentscope_runtime/sandbox/box/browser/box}/__init__.py +0 -0
- {agentscope_runtime-0.1.5b2/src/agentscope_runtime/sandbox/box/filesystem → agentscope_runtime-0.2.0/src/agentscope_runtime/sandbox/box/filesystem/box}/__init__.py +0 -0
- {agentscope_runtime-0.1.5b2/src/agentscope_runtime/sandbox/box/filesystem → agentscope_runtime-0.2.0/src/agentscope_runtime/sandbox/box/gui}/box/__init__.py +0 -0
- {agentscope_runtime-0.1.5b2 → agentscope_runtime-0.2.0}/src/agentscope_runtime/sandbox/box/shared/__init__.py +0 -0
- {agentscope_runtime-0.1.5b2 → agentscope_runtime-0.2.0}/src/agentscope_runtime/sandbox/box/shared/app.py +0 -0
- {agentscope_runtime-0.1.5b2 → agentscope_runtime-0.2.0}/src/agentscope_runtime/sandbox/box/shared/dependencies/__init__.py +0 -0
- {agentscope_runtime-0.1.5b2 → agentscope_runtime-0.2.0}/src/agentscope_runtime/sandbox/box/shared/dependencies/deps.py +0 -0
- {agentscope_runtime-0.1.5b2 → agentscope_runtime-0.2.0}/src/agentscope_runtime/sandbox/box/shared/routers/__init__.py +0 -0
- {agentscope_runtime-0.1.5b2 → agentscope_runtime-0.2.0}/src/agentscope_runtime/sandbox/box/shared/routers/mcp.py +0 -0
- {agentscope_runtime-0.1.5b2 → agentscope_runtime-0.2.0}/src/agentscope_runtime/sandbox/box/shared/routers/mcp_utils.py +0 -0
- {agentscope_runtime-0.1.5b2 → agentscope_runtime-0.2.0}/src/agentscope_runtime/sandbox/box/shared/routers/runtime_watcher.py +0 -0
- {agentscope_runtime-0.1.5b2 → agentscope_runtime-0.2.0}/src/agentscope_runtime/sandbox/box/shared/routers/workspace.py +0 -0
- {agentscope_runtime-0.1.5b2 → agentscope_runtime-0.2.0}/src/agentscope_runtime/sandbox/box/training_box/base.py +0 -0
- {agentscope_runtime-0.1.5b2 → agentscope_runtime-0.2.0}/src/agentscope_runtime/sandbox/box/training_box/env_service.py +0 -0
- {agentscope_runtime-0.1.5b2/src/agentscope_runtime/sandbox/box/training_box → agentscope_runtime-0.2.0/src/agentscope_runtime/sandbox/box/training_box/environments}/__init__.py +0 -0
- {agentscope_runtime-0.1.5b2 → agentscope_runtime-0.2.0}/src/agentscope_runtime/sandbox/box/training_box/environments/appworld/appworld_env.py +0 -0
- {agentscope_runtime-0.1.5b2 → agentscope_runtime-0.2.0}/src/agentscope_runtime/sandbox/box/training_box/environments/bfcl/bfcl_dataprocess.py +0 -0
- {agentscope_runtime-0.1.5b2 → agentscope_runtime-0.2.0}/src/agentscope_runtime/sandbox/box/training_box/environments/bfcl/bfcl_env.py +0 -0
- {agentscope_runtime-0.1.5b2 → agentscope_runtime-0.2.0}/src/agentscope_runtime/sandbox/box/training_box/environments/bfcl/env_handler.py +0 -0
- {agentscope_runtime-0.1.5b2 → agentscope_runtime-0.2.0}/src/agentscope_runtime/sandbox/box/training_box/registry.py +0 -0
- {agentscope_runtime-0.1.5b2 → agentscope_runtime-0.2.0}/src/agentscope_runtime/sandbox/box/training_box/src/trajectory.py +0 -0
- {agentscope_runtime-0.1.5b2 → agentscope_runtime-0.2.0}/src/agentscope_runtime/sandbox/client/__init__.py +0 -0
- {agentscope_runtime-0.1.5b2 → agentscope_runtime-0.2.0}/src/agentscope_runtime/sandbox/custom/__init__.py +0 -0
- {agentscope_runtime-0.1.5b2 → agentscope_runtime-0.2.0}/src/agentscope_runtime/sandbox/manager/__init__.py +0 -0
- {agentscope_runtime-0.1.5b2/src/agentscope_runtime/sandbox/box/training_box/environments → agentscope_runtime-0.2.0/src/agentscope_runtime/sandbox/manager/server}/__init__.py +0 -0
- {agentscope_runtime-0.1.5b2 → agentscope_runtime-0.2.0}/src/agentscope_runtime/sandbox/manager/server/models.py +0 -0
- {agentscope_runtime-0.1.5b2 → agentscope_runtime-0.2.0}/src/agentscope_runtime/sandbox/manager/storage/__init__.py +0 -0
- {agentscope_runtime-0.1.5b2 → agentscope_runtime-0.2.0}/src/agentscope_runtime/sandbox/manager/storage/data_storage.py +0 -0
- {agentscope_runtime-0.1.5b2 → agentscope_runtime-0.2.0}/src/agentscope_runtime/sandbox/manager/storage/local_storage.py +0 -0
- {agentscope_runtime-0.1.5b2 → agentscope_runtime-0.2.0}/src/agentscope_runtime/sandbox/manager/storage/oss_storage.py +0 -0
- {agentscope_runtime-0.1.5b2 → agentscope_runtime-0.2.0}/src/agentscope_runtime/sandbox/mcp_server.py +0 -0
- {agentscope_runtime-0.1.5b2 → agentscope_runtime-0.2.0}/src/agentscope_runtime/sandbox/model/__init__.py +0 -0
- {agentscope_runtime-0.1.5b2 → agentscope_runtime-0.2.0}/src/agentscope_runtime/sandbox/model/api.py +0 -0
- {agentscope_runtime-0.1.5b2 → agentscope_runtime-0.2.0}/src/agentscope_runtime/sandbox/tools/__init__.py +0 -0
- {agentscope_runtime-0.1.5b2 → agentscope_runtime-0.2.0}/src/agentscope_runtime/sandbox/tools/base/__init__.py +0 -0
- {agentscope_runtime-0.1.5b2 → agentscope_runtime-0.2.0}/src/agentscope_runtime/sandbox/tools/base/tool.py +0 -0
- {agentscope_runtime-0.1.5b2 → agentscope_runtime-0.2.0}/src/agentscope_runtime/sandbox/tools/browser/__init__.py +0 -0
- {agentscope_runtime-0.1.5b2 → agentscope_runtime-0.2.0}/src/agentscope_runtime/sandbox/tools/browser/tool.py +0 -0
- {agentscope_runtime-0.1.5b2 → agentscope_runtime-0.2.0}/src/agentscope_runtime/sandbox/tools/filesystem/__init__.py +0 -0
- {agentscope_runtime-0.1.5b2 → agentscope_runtime-0.2.0}/src/agentscope_runtime/sandbox/tools/filesystem/tool.py +0 -0
- {agentscope_runtime-0.1.5b2 → agentscope_runtime-0.2.0}/src/agentscope_runtime/sandbox/tools/function_tool.py +0 -0
- {agentscope_runtime-0.1.5b2 → agentscope_runtime-0.2.0}/src/agentscope_runtime/sandbox/tools/sandbox_tool.py +0 -0
- {agentscope_runtime-0.1.5b2 → agentscope_runtime-0.2.0}/src/agentscope_runtime/sandbox/tools/utils.py +0 -0
- {agentscope_runtime-0.1.5b2 → agentscope_runtime-0.2.0}/src/agentscope_runtime.egg-info/dependency_links.txt +0 -0
- {agentscope_runtime-0.1.5b2 → agentscope_runtime-0.2.0}/src/agentscope_runtime.egg-info/entry_points.txt +0 -0
- {agentscope_runtime-0.1.5b2 → agentscope_runtime-0.2.0}/src/agentscope_runtime.egg-info/top_level.txt +0 -0
{agentscope_runtime-0.1.5b2/src/agentscope_runtime.egg-info → agentscope_runtime-0.2.0}/PKG-INFO
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: agentscope-runtime
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.2.0
|
|
4
4
|
Summary: A production-ready runtime framework for agent applications, providing secure sandboxed execution environments and scalable deployment solutions with multi-framework support.
|
|
5
5
|
Requires-Python: >=3.10
|
|
6
6
|
Description-Content-Type: text/markdown
|
|
@@ -8,58 +8,63 @@ License-File: LICENSE
|
|
|
8
8
|
Requires-Dist: mcp>=1.13
|
|
9
9
|
Requires-Dist: fastapi>=0.104.0
|
|
10
10
|
Requires-Dist: uvicorn[standard]>=0.24.0
|
|
11
|
-
Requires-Dist: openai
|
|
11
|
+
Requires-Dist: openai
|
|
12
12
|
Requires-Dist: pydantic>=2.11.7
|
|
13
13
|
Requires-Dist: requests>=2.32.4
|
|
14
|
+
Requires-Dist: agentscope>=1.0.6
|
|
15
|
+
Requires-Dist: docker>=7.1.0
|
|
16
|
+
Requires-Dist: redis>=6.0.0
|
|
17
|
+
Requires-Dist: oss2>=2.19.1
|
|
18
|
+
Requires-Dist: pydantic-settings>=2.9.1
|
|
19
|
+
Requires-Dist: python-dotenv>=1.0.1
|
|
20
|
+
Requires-Dist: kubernetes>=33.1.0
|
|
21
|
+
Requires-Dist: shortuuid>=1.0.13
|
|
22
|
+
Requires-Dist: celery[redis]>=5.3.1
|
|
23
|
+
Requires-Dist: a2a-sdk>=0.3.0
|
|
14
24
|
Provides-Extra: dev
|
|
15
25
|
Requires-Dist: pytest>=8.3.5; extra == "dev"
|
|
16
26
|
Requires-Dist: pytest-asyncio>=0.23.0; extra == "dev"
|
|
17
27
|
Requires-Dist: pre-commit>=4.2.0; extra == "dev"
|
|
18
|
-
Requires-Dist: jupyter-book
|
|
28
|
+
Requires-Dist: jupyter-book<2.0.0,>=1.0.4.post1; extra == "dev"
|
|
19
29
|
Requires-Dist: furo>=2025.7.19; extra == "dev"
|
|
20
30
|
Requires-Dist: pytest-cov>=6.2.1; extra == "dev"
|
|
21
31
|
Requires-Dist: fakeredis>=2.31.0; extra == "dev"
|
|
22
32
|
Requires-Dist: sphinx-autoapi>=3.6.0; extra == "dev"
|
|
23
|
-
|
|
24
|
-
Requires-Dist: docker>=7.1.0; extra == "sandbox"
|
|
25
|
-
Requires-Dist: steel-sdk>=0.1.0; extra == "sandbox"
|
|
26
|
-
Requires-Dist: redis>=6.0.0b2; extra == "sandbox"
|
|
27
|
-
Requires-Dist: oss2>=2.19.1; extra == "sandbox"
|
|
28
|
-
Requires-Dist: pydantic-settings>=2.9.1; extra == "sandbox"
|
|
29
|
-
Requires-Dist: dotenv>=0.9.9; extra == "sandbox"
|
|
30
|
-
Requires-Dist: kubernetes>=33.1.0; extra == "sandbox"
|
|
31
|
-
Requires-Dist: shortuuid>=1.0.13; extra == "sandbox"
|
|
32
|
-
Provides-Extra: agentscope
|
|
33
|
-
Requires-Dist: agentscope>=1.0.1; extra == "agentscope"
|
|
33
|
+
Requires-Dist: pytest-mock>=3.15.1; extra == "dev"
|
|
34
34
|
Provides-Extra: langgraph
|
|
35
35
|
Requires-Dist: langgraph>=0.5.3; extra == "langgraph"
|
|
36
36
|
Provides-Extra: agno
|
|
37
|
-
Requires-Dist: agno
|
|
38
|
-
Provides-Extra: a2a
|
|
39
|
-
Requires-Dist: a2a-sdk>=0.3.0; extra == "a2a"
|
|
37
|
+
Requires-Dist: agno>=2.0.0; extra == "agno"
|
|
40
38
|
Provides-Extra: autogen
|
|
41
39
|
Requires-Dist: autogen-agentchat>=0.7.4; extra == "autogen"
|
|
42
40
|
Requires-Dist: autogen-ext[openai]>=0.7.4; extra == "autogen"
|
|
41
|
+
Provides-Extra: agentrun
|
|
42
|
+
Requires-Dist: alibabacloud-agentrun20250910>=1.0.0; extra == "agentrun"
|
|
43
|
+
Requires-Dist: alibabacloud_tea_openapi>=0.4.0; extra == "agentrun"
|
|
43
44
|
Provides-Extra: langchain-rag
|
|
44
45
|
Requires-Dist: langchain>=0.3.25; extra == "langchain-rag"
|
|
45
|
-
Requires-Dist: pymilvus>=2.6.0; extra == "langchain-rag"
|
|
46
|
+
Requires-Dist: pymilvus[milvus-lite]>=2.6.0; extra == "langchain-rag"
|
|
46
47
|
Requires-Dist: langchain-community>=0.3.27; extra == "langchain-rag"
|
|
47
48
|
Requires-Dist: langchain-milvus>=0.2.1; extra == "langchain-rag"
|
|
48
49
|
Requires-Dist: bs4>=0.0.2; extra == "langchain-rag"
|
|
49
50
|
Provides-Extra: llamaindex-rag
|
|
50
51
|
Requires-Dist: llama-index>=0.13.4; extra == "llamaindex-rag"
|
|
51
|
-
Requires-Dist: pymilvus>=2.6.0; extra == "llamaindex-rag"
|
|
52
|
+
Requires-Dist: pymilvus[milvus-lite]>=2.6.0; extra == "llamaindex-rag"
|
|
52
53
|
Requires-Dist: llama-index-vector-stores-milvus>=0.9.1; extra == "llamaindex-rag"
|
|
53
54
|
Requires-Dist: llama-index-readers-web>=0.5.1; extra == "llamaindex-rag"
|
|
54
55
|
Requires-Dist: llama-index-embeddings-langchain>=0.4.0; extra == "llamaindex-rag"
|
|
55
|
-
Requires-Dist:
|
|
56
|
+
Requires-Dist: llama-index-embeddings-dashscope>=0.4.0; extra == "llamaindex-rag"
|
|
56
57
|
Requires-Dist: bs4>=0.0.2; extra == "llamaindex-rag"
|
|
58
|
+
Provides-Extra: aliyun-tablestore-ext
|
|
59
|
+
Requires-Dist: tablestore-for-agent-memory>=1.1.0; extra == "aliyun-tablestore-ext"
|
|
60
|
+
Requires-Dist: dashscope>=1.24.4; extra == "aliyun-tablestore-ext"
|
|
61
|
+
Requires-Dist: langchain-community>=0.3.27; extra == "aliyun-tablestore-ext"
|
|
57
62
|
Provides-Extra: memory-ext
|
|
58
63
|
Requires-Dist: reme-ai==0.1.9; python_full_version >= "3.12" and extra == "memory-ext"
|
|
59
64
|
Requires-Dist: mem0ai>=0.1.117; extra == "memory-ext"
|
|
60
65
|
Provides-Extra: deployment
|
|
61
66
|
Requires-Dist: alibabacloud-oss-v2; extra == "deployment"
|
|
62
|
-
Requires-Dist: alibabacloud-bailian20231229>=2.
|
|
67
|
+
Requires-Dist: alibabacloud-bailian20231229>=2.6.0; extra == "deployment"
|
|
63
68
|
Requires-Dist: build; extra == "deployment"
|
|
64
69
|
Requires-Dist: setuptools>=40.8.0; extra == "deployment"
|
|
65
70
|
Requires-Dist: wheel; extra == "deployment"
|
|
@@ -68,8 +73,6 @@ Requires-Dist: alibabacloud-credentials; extra == "deployment"
|
|
|
68
73
|
Requires-Dist: jinja2; extra == "deployment"
|
|
69
74
|
Requires-Dist: psutil; extra == "deployment"
|
|
70
75
|
Requires-Dist: shortuuid>=1.0.13; extra == "deployment"
|
|
71
|
-
Requires-Dist: docker>=7.1.0; extra == "deployment"
|
|
72
|
-
Requires-Dist: kubernetes>=33.1.0; extra == "deployment"
|
|
73
76
|
Requires-Dist: PyYAML; extra == "deployment"
|
|
74
77
|
Requires-Dist: oss2>=2.19.1; extra == "deployment"
|
|
75
78
|
Dynamic: license-file
|
|
@@ -78,9 +81,11 @@ Dynamic: license-file
|
|
|
78
81
|
|
|
79
82
|
# AgentScope Runtime
|
|
80
83
|
|
|
84
|
+
[](https://github.com/agentscope-ai/agentscope-runtime)
|
|
81
85
|
[](https://pypi.org/project/agentscope-runtime/)
|
|
86
|
+
[](https://pepy.tech/project/agentscope-runtime)
|
|
82
87
|
[](https://python.org)
|
|
83
|
-
[](LICENSE)
|
|
84
89
|
[](https://github.com/psf/black)
|
|
85
90
|
[](https://github.com/agentscope-ai/agentscope-runtime/stargazers)
|
|
86
91
|
[](https://github.com/agentscope-ai/agentscope-runtime/network)
|
|
@@ -94,6 +99,7 @@ Dynamic: license-file
|
|
|
94
99
|
|
|
95
100
|
[[Cookbook]](https://runtime.agentscope.io/)
|
|
96
101
|
[[中文README]](README_zh.md)
|
|
102
|
+
[[Samples]](https://github.com/agentscope-ai/agentscope-samples)
|
|
97
103
|
|
|
98
104
|
**A Production-Ready Runtime Framework for Intelligent Agent Applications**
|
|
99
105
|
|
|
@@ -103,6 +109,13 @@ Dynamic: license-file
|
|
|
103
109
|
|
|
104
110
|
---
|
|
105
111
|
|
|
112
|
+
## 🆕 NEWS
|
|
113
|
+
|
|
114
|
+
* **[2025-10]** We released `v0.2.0` — introducing **`AgentApp` API server support**, enabling easy use of agent applications and custom API endpoints through synchronous, asynchronous, and streaming interfaces. Check our [cookbook](https://runtime.agentscope.io/en/agent_app.html) for more details.
|
|
115
|
+
* **[2025-10]** **GUI Sandbox** is added with support for virtual desktop environments, mouse, keyboard, and screen operations. Introduced the **`desktop_url`** property for GUI Sandbox, Browser Sandbox, and Filesystem Sandbox — allowing direct access to the virtual desktop via your browser. Check our [cookbook](https://runtime.agentscope.io/en/sandbox.html#sandbox-usage) for more details.
|
|
116
|
+
|
|
117
|
+
---
|
|
118
|
+
|
|
106
119
|
## ✨ Key Features
|
|
107
120
|
|
|
108
121
|
- **🏗️ Deployment Infrastructure**: Built-in services for session management, memory, and sandbox environment control
|
|
@@ -150,9 +163,6 @@ From PyPI:
|
|
|
150
163
|
```bash
|
|
151
164
|
# Install core dependencies
|
|
152
165
|
pip install agentscope-runtime
|
|
153
|
-
|
|
154
|
-
# Install sandbox dependencies
|
|
155
|
-
pip install "agentscope-runtime[sandbox]"
|
|
156
166
|
```
|
|
157
167
|
|
|
158
168
|
(Optional) From source:
|
|
@@ -164,74 +174,191 @@ cd agentscope-runtime
|
|
|
164
174
|
|
|
165
175
|
# Install core dependencies
|
|
166
176
|
pip install -e .
|
|
167
|
-
|
|
168
|
-
# Install sandbox dependencies
|
|
169
|
-
pip install -e ".[sandbox]"
|
|
170
177
|
```
|
|
171
178
|
|
|
172
|
-
### Basic Agent
|
|
179
|
+
### Basic Agent App Example
|
|
180
|
+
|
|
181
|
+
This example demonstrates how to create an agent API server using agentscope `ReActAgent` and `AgentApp`. The server will process your input and return streaming agent-generated responses.
|
|
173
182
|
|
|
174
|
-
This example demonstrates how to create a simple LLM agent using AgentScope Runtime and stream responses from the Qwen model.
|
|
175
183
|
|
|
176
184
|
```python
|
|
177
|
-
import asyncio
|
|
178
185
|
import os
|
|
179
|
-
|
|
180
|
-
from agentscope_runtime.engine
|
|
181
|
-
from agentscope_runtime.engine.
|
|
182
|
-
|
|
183
|
-
from
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
186
|
+
|
|
187
|
+
from agentscope_runtime.engine import AgentApp
|
|
188
|
+
from agentscope_runtime.engine.agents.agentscope_agent import AgentScopeAgent
|
|
189
|
+
|
|
190
|
+
from agentscope.agent import ReActAgent
|
|
191
|
+
from agentscope.model import OpenAIChatModel
|
|
192
|
+
|
|
193
|
+
|
|
194
|
+
agent = AgentScopeAgent(
|
|
195
|
+
name="Friday",
|
|
196
|
+
model=OpenAIChatModel(
|
|
197
|
+
"gpt-4",
|
|
198
|
+
api_key=os.getenv("OPENAI_API_KEY"),
|
|
199
|
+
),
|
|
200
|
+
agent_config={
|
|
201
|
+
"sys_prompt": "You're a helpful assistant named Friday.",
|
|
202
|
+
},
|
|
203
|
+
agent_builder=ReActAgent, # Or use your own agent builder
|
|
204
|
+
)
|
|
205
|
+
app = AgentApp(agent=agent, endpoint_path="/process")
|
|
206
|
+
|
|
207
|
+
app.run(host="0.0.0.0", port=8090)
|
|
208
|
+
```
|
|
209
|
+
|
|
210
|
+
The server will start and listen on: `http://localhost:8090/process`. You can send JSON input to the API using `curl`:
|
|
211
|
+
|
|
212
|
+
```bash
|
|
213
|
+
curl -N \
|
|
214
|
+
-X POST "http://localhost:8090/process" \
|
|
215
|
+
-H "Content-Type: application/json" \
|
|
216
|
+
-d '{
|
|
217
|
+
"input": [
|
|
218
|
+
{
|
|
219
|
+
"role": "user",
|
|
220
|
+
"content": [
|
|
221
|
+
{ "type": "text", "text": "What is the capital of France?" }
|
|
222
|
+
]
|
|
223
|
+
}
|
|
224
|
+
]
|
|
225
|
+
}'
|
|
226
|
+
```
|
|
227
|
+
|
|
228
|
+
You’ll see output streamed in **Server-Sent Events (SSE)** format:
|
|
229
|
+
|
|
230
|
+
```bash
|
|
231
|
+
data: {"sequence_number":0,"object":"response","status":"created", ... }
|
|
232
|
+
data: {"sequence_number":1,"object":"response","status":"in_progress", ... }
|
|
233
|
+
data: {"sequence_number":2,"object":"content","status":"in_progress","text":"The" }
|
|
234
|
+
data: {"sequence_number":3,"object":"content","status":"in_progress","text":" capital of France is Paris." }
|
|
235
|
+
data: {"sequence_number":4,"object":"message","status":"completed","text":"The capital of France is Paris." }
|
|
218
236
|
```
|
|
219
237
|
|
|
220
238
|
### Basic Sandbox Usage Example
|
|
221
239
|
|
|
222
|
-
|
|
240
|
+
These examples demonstrate how to create sandboxed environments and execute tools within them, with some examples featuring interactive frontend interfaces accessible via VNC (Virtual Network Computing):
|
|
241
|
+
|
|
242
|
+
> [!NOTE]
|
|
243
|
+
>
|
|
244
|
+
> Current version requires Docker or Kubernetes to be installed and running on your system. Please refer to [this tutorial](https://runtime.agentscope.io/en/sandbox.html) for more details.
|
|
245
|
+
>
|
|
246
|
+
> If you plan to use the sandbox on a large scale in production, we recommend deploying it directly in Alibaba Cloud for managed hosting: [One-click deploy sandbox on Alibaba Cloud](https://computenest.console.aliyun.com/service/instance/create/default?ServiceName=AgentScope%20Runtime%20%E6%B2%99%E7%AE%B1%E7%8E%AF%E5%A2%83)
|
|
247
|
+
|
|
248
|
+
#### Base Sandbox
|
|
249
|
+
|
|
250
|
+
Use for running **Python code** or **shell commands** in an isolated environment.
|
|
223
251
|
|
|
224
252
|
```python
|
|
225
253
|
from agentscope_runtime.sandbox import BaseSandbox
|
|
226
254
|
|
|
227
255
|
with BaseSandbox() as box:
|
|
228
|
-
|
|
229
|
-
print(box.
|
|
256
|
+
# By default, pulls `agentscope/runtime-sandbox-base:latest` from DockerHub
|
|
257
|
+
print(box.list_tools()) # List all available tools
|
|
258
|
+
print(box.run_ipython_cell(code="print('hi')")) # Run Python code
|
|
259
|
+
print(box.run_shell_command(command="echo hello")) # Run shell command
|
|
260
|
+
input("Press Enter to continue...")
|
|
230
261
|
```
|
|
231
262
|
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
263
|
+
#### GUI Sandbox
|
|
264
|
+
|
|
265
|
+
Provides a **virtual desktop** environment for mouse, keyboard, and screen operations.
|
|
266
|
+
|
|
267
|
+
<img src="https://img.alicdn.com/imgextra/i2/O1CN01df5SaM1xKFQP4KGBW_!!6000000006424-2-tps-2958-1802.png" alt="GUI Sandbox" width="800" height="500">
|
|
268
|
+
|
|
269
|
+
```python
|
|
270
|
+
from agentscope_runtime.sandbox import GuiSandbox
|
|
271
|
+
|
|
272
|
+
with GuiSandbox() as box:
|
|
273
|
+
# By default, pulls `agentscope/runtime-sandbox-gui:latest` from DockerHub
|
|
274
|
+
print(box.list_tools()) # List all available tools
|
|
275
|
+
print(box.desktop_url) # Web desktop access URL
|
|
276
|
+
print(box.computer_use(action="get_cursor_position")) # Get mouse cursor position
|
|
277
|
+
print(box.computer_use(action="get_screenshot")) # Capture screenshot
|
|
278
|
+
input("Press Enter to continue...")
|
|
279
|
+
```
|
|
280
|
+
|
|
281
|
+
#### Browser Sandbox
|
|
282
|
+
|
|
283
|
+
A GUI-based sandbox with **browser operations** inside an isolated sandbox.
|
|
284
|
+
|
|
285
|
+
<img src="https://img.alicdn.com/imgextra/i4/O1CN01OIq1dD1gAJMcm0RFR_!!6000000004101-2-tps-2734-1684.png" alt="GUI Sandbox" width="800" height="500">
|
|
286
|
+
|
|
287
|
+
```python
|
|
288
|
+
from agentscope_runtime.sandbox import BrowserSandbox
|
|
289
|
+
|
|
290
|
+
with BrowserSandbox() as box:
|
|
291
|
+
# By default, pulls `agentscope/runtime-sandbox-browser:latest` from DockerHub
|
|
292
|
+
print(box.list_tools()) # List all available tools
|
|
293
|
+
print(box.desktop_url) # Web desktop access URL
|
|
294
|
+
box.browser_navigate("https://www.google.com/") # Open a webpage
|
|
295
|
+
input("Press Enter to continue...")
|
|
296
|
+
```
|
|
297
|
+
|
|
298
|
+
#### Filesystem Sandbox
|
|
299
|
+
|
|
300
|
+
A GUI-based sandbox with **file system operations** such as creating, reading, and deleting files.
|
|
301
|
+
|
|
302
|
+
<img src="https://img.alicdn.com/imgextra/i3/O1CN01VocM961vK85gWbJIy_!!6000000006153-2-tps-2730-1686.png" alt="GUI Sandbox" width="800" height="500">
|
|
303
|
+
|
|
304
|
+
```python
|
|
305
|
+
from agentscope_runtime.sandbox import FilesystemSandbox
|
|
306
|
+
|
|
307
|
+
with FilesystemSandbox() as box:
|
|
308
|
+
# By default, pulls `agentscope/runtime-sandbox-filesystem:latest` from DockerHub
|
|
309
|
+
print(box.list_tools()) # List all available tools
|
|
310
|
+
print(box.desktop_url) # Web desktop access URL
|
|
311
|
+
box.create_directory("test") # Create a directory
|
|
312
|
+
input("Press Enter to continue...")
|
|
313
|
+
```
|
|
314
|
+
|
|
315
|
+
#### Configuring Sandbox Image Registry, Namespace, and Tag
|
|
316
|
+
|
|
317
|
+
##### 1. Registry
|
|
318
|
+
|
|
319
|
+
If pulling images from DockerHub fails (for example, due to network restrictions), you can switch the image source to Alibaba Cloud Container Registry for faster access:
|
|
320
|
+
|
|
321
|
+
```bash
|
|
322
|
+
export RUNTIME_SANDBOX_REGISTRY="agentscope-registry.ap-southeast-1.cr.aliyuncs.com"
|
|
323
|
+
```
|
|
324
|
+
|
|
325
|
+
##### 2. Namespace
|
|
326
|
+
|
|
327
|
+
A namespace is used to distinguish images of different teams or projects. You can customize the namespace via an environment variable:
|
|
328
|
+
|
|
329
|
+
```bash
|
|
330
|
+
export RUNTIME_SANDBOX_IMAGE_NAMESPACE="agentscope"
|
|
331
|
+
```
|
|
332
|
+
|
|
333
|
+
For example, here `agentscope` will be used as part of the image path.
|
|
334
|
+
|
|
335
|
+
##### 3. Tag
|
|
336
|
+
|
|
337
|
+
An image tag specifies the version of the image, for example:
|
|
338
|
+
|
|
339
|
+
```bash
|
|
340
|
+
export RUNTIME_SANDBOX_IMAGE_TAG="preview"
|
|
341
|
+
```
|
|
342
|
+
|
|
343
|
+
Details:
|
|
344
|
+
|
|
345
|
+
- Default is `latest`, which means the image version matches the PyPI latest release.
|
|
346
|
+
- `preview` means the latest preview version built in sync with the **GitHub main branch**.
|
|
347
|
+
- You can also use a specified version number such as `20250909`. You can check all available image versions at [DockerHub](https://hub.docker.com/repositories/agentscope).
|
|
348
|
+
|
|
349
|
+
##### 4. Complete Image Path
|
|
350
|
+
|
|
351
|
+
The sandbox SDK will build the full image path based on the above environment variables:
|
|
352
|
+
|
|
353
|
+
```bash
|
|
354
|
+
<RUNTIME_SANDBOX_REGISTRY>/<RUNTIME_SANDBOX_IMAGE_NAMESPACE>/runtime-sandbox-base:<RUNTIME_SANDBOX_IMAGE_TAG>
|
|
355
|
+
```
|
|
356
|
+
|
|
357
|
+
Example:
|
|
358
|
+
|
|
359
|
+
```bash
|
|
360
|
+
agentscope-registry.ap-southeast-1.cr.aliyuncs.com/agentscope/runtime-sandbox-base:preview
|
|
361
|
+
```
|
|
235
362
|
|
|
236
363
|
---
|
|
237
364
|
|
|
@@ -245,30 +372,7 @@ with BaseSandbox() as box:
|
|
|
245
372
|
|
|
246
373
|
---
|
|
247
374
|
|
|
248
|
-
## 🔌 Agent Framework Integration
|
|
249
|
-
|
|
250
|
-
### AgentScope Integration
|
|
251
|
-
|
|
252
|
-
```python
|
|
253
|
-
# pip install "agentscope-runtime[agentscope]"
|
|
254
|
-
import os
|
|
255
|
-
|
|
256
|
-
from agentscope.agent import ReActAgent
|
|
257
|
-
from agentscope.model import OpenAIChatModel
|
|
258
|
-
from agentscope_runtime.engine.agents.agentscope_agent import AgentScopeAgent
|
|
259
|
-
|
|
260
|
-
agent = AgentScopeAgent(
|
|
261
|
-
name="Friday",
|
|
262
|
-
model=OpenAIChatModel(
|
|
263
|
-
"gpt-4",
|
|
264
|
-
api_key=os.getenv("OPENAI_API_KEY"),
|
|
265
|
-
),
|
|
266
|
-
agent_config={
|
|
267
|
-
"sys_prompt": "You're a helpful assistant named {name}.",
|
|
268
|
-
},
|
|
269
|
-
agent_builder=ReActAgent,
|
|
270
|
-
)
|
|
271
|
-
```
|
|
375
|
+
## 🔌 Other Agent Framework Integration
|
|
272
376
|
|
|
273
377
|
### Agno Integration
|
|
274
378
|
|
|
@@ -353,25 +457,45 @@ agent = LangGraphAgent(graph=compiled_graph)
|
|
|
353
457
|
|
|
354
458
|
## 🏗️ Deployment
|
|
355
459
|
|
|
356
|
-
The
|
|
460
|
+
The app exposes a `deploy` method that takes a `DeployManager` instance and deploys the agent.
|
|
461
|
+
The service port is set as the parameter `port` when creating the `LocalDeployManager`.
|
|
462
|
+
The service endpoint path is set as the parameter `endpoint_path` when deploying the agent.
|
|
463
|
+
|
|
464
|
+
The deployer will automatically add common agent protocols, such as **A2A**, **Response API** based on the default endpoint `/process`.
|
|
465
|
+
|
|
466
|
+
In this example, we set the endpoint path to `/process`,
|
|
467
|
+
after deployment, users can access the service at `http://localhost:8090/process`, and can also access the service from OpenAI SDK by Response API.
|
|
357
468
|
|
|
358
469
|
```python
|
|
359
470
|
from agentscope_runtime.engine.deployers import LocalDeployManager
|
|
360
471
|
|
|
361
472
|
# Create deployment manager
|
|
362
|
-
|
|
363
|
-
host="
|
|
473
|
+
deployer = LocalDeployManager(
|
|
474
|
+
host="0.0.0.0",
|
|
364
475
|
port=8090,
|
|
365
476
|
)
|
|
366
477
|
|
|
367
|
-
# Deploy the
|
|
368
|
-
deploy_result = await
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
478
|
+
# Deploy the app as a streaming service
|
|
479
|
+
deploy_result = await app.deploy(deployer=deployer)
|
|
480
|
+
|
|
481
|
+
```
|
|
482
|
+
|
|
483
|
+
Then user could query the deployment by OpenAI SDK.
|
|
484
|
+
|
|
485
|
+
```python
|
|
486
|
+
from openai import OpenAI
|
|
487
|
+
|
|
488
|
+
client = OpenAI(base_url="http://0.0.0.0:8090/compatible-mode/v1")
|
|
489
|
+
|
|
490
|
+
response = client.responses.create(
|
|
491
|
+
model="any_name",
|
|
492
|
+
input="What is the weather in Beijing?"
|
|
372
493
|
)
|
|
494
|
+
|
|
495
|
+
print(response)
|
|
373
496
|
```
|
|
374
497
|
|
|
498
|
+
|
|
375
499
|
---
|
|
376
500
|
|
|
377
501
|
## 🤝 Contributing
|
|
@@ -421,7 +545,7 @@ limitations under the License.
|
|
|
421
545
|
|
|
422
546
|
## Contributors ✨
|
|
423
547
|
<!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section -->
|
|
424
|
-
[](#contributors-)
|
|
425
549
|
<!-- ALL-CONTRIBUTORS-BADGE:END -->
|
|
426
550
|
|
|
427
551
|
Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/docs/en/emoji-key)):
|
|
@@ -443,6 +567,17 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/d
|
|
|
443
567
|
<tr>
|
|
444
568
|
<td align="center" valign="top" width="14.28%"><a href="https://github.com/Osier-Yi"><img src="https://avatars.githubusercontent.com/u/8287381?v=4?s=100" width="100px;" alt="Osier-Yi"/><br /><sub><b>Osier-Yi</b></sub></a><br /><a href="https://github.com/agentscope-ai/agentscope-runtime/commits?author=Osier-Yi" title="Code">💻</a> <a href="https://github.com/agentscope-ai/agentscope-runtime/commits?author=Osier-Yi" title="Documentation">📖</a></td>
|
|
445
569
|
<td align="center" valign="top" width="14.28%"><a href="https://github.com/kevinlin09"><img src="https://avatars.githubusercontent.com/u/26913335?v=4?s=100" width="100px;" alt="Kevin Lin"/><br /><sub><b>Kevin Lin</b></sub></a><br /><a href="https://github.com/agentscope-ai/agentscope-runtime/commits?author=kevinlin09" title="Code">💻</a></td>
|
|
570
|
+
<td align="center" valign="top" width="14.28%"><a href="https://davdgao.github.io/"><img src="https://avatars.githubusercontent.com/u/102287034?v=4?s=100" width="100px;" alt="DavdGao"/><br /><sub><b>DavdGao</b></sub></a><br /><a href="https://github.com/agentscope-ai/agentscope-runtime/pulls?q=is%3Apr+reviewed-by%3ADavdGao" title="Reviewed Pull Requests">👀</a></td>
|
|
571
|
+
<td align="center" valign="top" width="14.28%"><a href="https://github.com/FLyLeaf-coder"><img src="https://avatars.githubusercontent.com/u/122603493?v=4?s=100" width="100px;" alt="FlyLeaf"/><br /><sub><b>FlyLeaf</b></sub></a><br /><a href="https://github.com/agentscope-ai/agentscope-runtime/commits?author=FLyLeaf-coder" title="Code">💻</a> <a href="https://github.com/agentscope-ai/agentscope-runtime/commits?author=FLyLeaf-coder" title="Documentation">📖</a></td>
|
|
572
|
+
<td align="center" valign="top" width="14.28%"><a href="https://github.com/jinghuan-Chen"><img src="https://avatars.githubusercontent.com/u/42742857?v=4?s=100" width="100px;" alt="jinghuan-Chen"/><br /><sub><b>jinghuan-Chen</b></sub></a><br /><a href="https://github.com/agentscope-ai/agentscope-runtime/commits?author=jinghuan-Chen" title="Code">💻</a></td>
|
|
573
|
+
<td align="center" valign="top" width="14.28%"><a href="https://github.com/Sodawyx"><img src="https://avatars.githubusercontent.com/u/34974468?v=4?s=100" width="100px;" alt="Yuxuan Wu"/><br /><sub><b>Yuxuan Wu</b></sub></a><br /><a href="https://github.com/agentscope-ai/agentscope-runtime/commits?author=Sodawyx" title="Code">💻</a> <a href="https://github.com/agentscope-ai/agentscope-runtime/commits?author=Sodawyx" title="Documentation">📖</a></td>
|
|
574
|
+
<td align="center" valign="top" width="14.28%"><a href="https://github.com/TianYu92"><img src="https://avatars.githubusercontent.com/u/12960468?v=4?s=100" width="100px;" alt="Fear1es5"/><br /><sub><b>Fear1es5</b></sub></a><br /><a href="https://github.com/agentscope-ai/agentscope-runtime/issues?q=author%3ATianYu92" title="Bug reports">🐛</a></td>
|
|
575
|
+
</tr>
|
|
576
|
+
<tr>
|
|
577
|
+
<td align="center" valign="top" width="14.28%"><a href="https://github.com/ms-cs"><img src="https://avatars.githubusercontent.com/u/43086458?v=4?s=100" width="100px;" alt="zhiyong"/><br /><sub><b>zhiyong</b></sub></a><br /><a href="https://github.com/agentscope-ai/agentscope-runtime/commits?author=ms-cs" title="Code">💻</a> <a href="https://github.com/agentscope-ai/agentscope-runtime/issues?q=author%3Ams-cs" title="Bug reports">🐛</a></td>
|
|
578
|
+
<td align="center" valign="top" width="14.28%"><a href="https://github.com/jooojo"><img src="https://avatars.githubusercontent.com/u/11719425?v=4?s=100" width="100px;" alt="jooojo"/><br /><sub><b>jooojo</b></sub></a><br /><a href="https://github.com/agentscope-ai/agentscope-runtime/commits?author=jooojo" title="Code">💻</a> <a href="https://github.com/agentscope-ai/agentscope-runtime/issues?q=author%3Ajooojo" title="Bug reports">🐛</a></td>
|
|
579
|
+
<td align="center" valign="top" width="14.28%"><a href="http://ceshihao.github.io"><img src="https://avatars.githubusercontent.com/u/7711875?v=4?s=100" width="100px;" alt="Zheng Dayu"/><br /><sub><b>Zheng Dayu</b></sub></a><br /><a href="https://github.com/agentscope-ai/agentscope-runtime/commits?author=ceshihao" title="Code">💻</a> <a href="https://github.com/agentscope-ai/agentscope-runtime/issues?q=author%3Aceshihao" title="Bug reports">🐛</a></td>
|
|
580
|
+
<td align="center" valign="top" width="14.28%"><a href="http://lokk.cn/about"><img src="https://avatars.githubusercontent.com/u/39740818?v=4?s=100" width="100px;" alt="quanyu"/><br /><sub><b>quanyu</b></sub></a><br /><a href="https://github.com/agentscope-ai/agentscope-runtime/commits?author=taoquanyus" title="Code">💻</a></td>
|
|
446
581
|
</tr>
|
|
447
582
|
</tbody>
|
|
448
583
|
<tfoot>
|