LLMs-Universal-Life-Science-and-Clinical-Skills- agentscope-runtime
Deploy AgentScope + AgentScope Runtime for secure sandboxed multi-agent services inside BioKernel.
install
source · Clone the upstream repo
git clone https://github.com/mdbabumiamssm/LLMs-Universal-Life-Science-and-Clinical-Skills-
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/mdbabumiamssm/LLMs-Universal-Life-Science-and-Clinical-Skills- "$T" && mkdir -p ~/.claude/skills && cp -r "$T/Skills/Agentic_AI/AgentScope_Runtime" ~/.claude/skills/mdbabumiamssm-llms-universal-life-science-and-clinical-skills-agentscope-runtime && rm -rf "$T"
manifest:
Skills/Agentic_AI/AgentScope_Runtime/SKILL.mdsource content
AgentScope Runtime Skill
AgentScope is a production-ready multi-agent framework with ReAct agents, memory, human-in-the-loop steering, MCP/A2A integrations, and voice support, while AgentScope Runtime adds hardened sandboxes, Agent-as-a-Service APIs, and FastAPI-native deployment adapters.¹ ² Use this skill when you want BioKernel missions to tap into AgentScope’s ecosystem or when you must expose an agent over HTTP with observability and sandbox isolation baked in.
When to Use
- You need asynchronous sandboxes (GUI, browser, filesystem, mobile) with isolation guarantees before executing untrusted tool calls.²
- You want to host an AgentScope ReAct or planning workflow behind a FastAPI endpoint and call it from other agents.
- You must integrate with MCP/A2A compatible tools or run K8s/Function Compute deployments without rewriting orchestration.
Setup
- Install both framework + runtime (Python 3.10+):
uv pip install "agentscope>=0.10" "agentscope-runtime>=1.1" # or pip install agentscope agentscope-runtime - Export provider keys (DashScope, OpenAI, Gemini, etc.) plus sandbox registry settings if you want non-default Docker images:
export DASHSCOPE_API_KEY=sk-... export RUNTIME_SANDBOX_REGISTRY="agentscope-registry.ap-southeast-1.cr.aliyuncs.com"
Workflow (Agent-as-a-Service)
- Create
based on the runtime quickstart:agent_app.pyimport os from contextlib import asynccontextmanager from agentscope.agent import ReActAgent from agentscope.model import DashScopeChatModel from agentscope.tool import Toolkit, execute_python_code from agentscope_runtime.engine import AgentApp from agentscope_runtime.sandbox import BaseSandboxAsync @asynccontextmanager async def lifespan(app): async with BaseSandboxAsync() as box: app.state.sandbox = box yield agent_app = AgentApp(app_name="Friday", lifespan=lifespan) @agent_app.query(framework="agentscope") async def query(messages, **kwargs): toolkit = Toolkit() toolkit.register_tool_function(execute_python_code) agent = ReActAgent( name="Friday", sys_prompt="Reason carefully about biomedical code changes.", model=DashScopeChatModel("qwen-max", api_key=os.environ["DASHSCOPE_API_KEY"], stream=True), toolkit=toolkit, ) async for msg, last in agent.stream_chat(messages): yield msg, last if __name__ == "__main__": agent_app.run(port=8090) - Launch the service:
Runtime exposespython agent_app.py # or use the helper runner (handles env injection + cwd) python Skills/Agentic_AI/AgentScope_Runtime/agentscope_runner.py \ agent_app.py --workdir Skills/Agentic_AI/AgentScope_Runtime/examples \ --env DASHSCOPE_API_KEY=sk-...
with SSE streaming just like the README example.POST /process - From BioKernel, call the endpoint via
and treat it like any other remote agent. Attach mission metadata so Reviewer/SafetyOfficer agents can audit the AgentScope trace.platform/adapters/runtime_adapter.py
Sandbox-First Tooling
- Switch between synchronous/asynchronous sandboxes depending on mission latency requirements.
- Use
for GUI Operator-like actions,BrowserSandboxAsync
for editing patient files, andFilesystemSandboxAsync
for validating digital therapeutics.MobileSandboxAsync - Configure Docker/tag fields with
/RUNTIME_SANDBOX_IMAGE_NAMESPACE
to pull gVisor, BoxLite, or custom hardened images before handing control to the runtime.RUNTIME_SANDBOX_IMAGE_TAG
Integration Notes
- Keep mission templates under
so other contributors can spin up the same AgentApp quickly. Ship ready-madeSkills/Agentic_AI/AgentScope_Runtime/examples/
samples plusagent_app.py
for provider keys..env.example - Use AgentScope’s
if you want to route sub-agents locally inside the runtime and only send summarized responses back to the swarm.MsgHub - Stream the SSE trace plus sandbox logs into
for after-action audits.platform/compliance/agent_logs/
References
- GitHub – agentscope-ai/agentscope (
details ReAct agents, MCP/A2A, memory, realtime voice, roadmap). https://github.com/agentscope-ai/agentscopeREADME - GitHub – agentscope-ai/agentscope-runtime (
covers AgentApp, asynchronous sandboxes, deployment, and async tool execution). https://github.com/agentscope-ai/agentscope-runtimeREADME