scion-web-serving
How to serve a web page, app, API or other HTTP service from inside your agent so a person or program can reach it through the Hub's port proxy: scion expose and unexpose, the URL to hand over, what the proxy carries, and scion tunnel for full apps. The link serves web protocols only; for a non-HTTP port, point the person to scion tunnel. Use before running scion expose. For web pages and apps, also read references/web-apps.md.
- License 许可
- Apache-2.0
- 最近更新
- 2026-11-12
- Stars
- ★ 2.1k
- Forks
- 310
01 前言 Front Matter
- name
- scion-web-serving
- description
- How to serve a web page, app, API or other HTTP service from inside your agent so a person or program can reach it through the Hub's port proxy: scion expose and unexpose, the URL to hand over, what the proxy carries, and scion tunnel for full apps. The link serves web protocols only; for a non-HTTP port, point the person to scion tunnel. Use before running scion expose. For web pages and apps, also read references/web-apps.md.
02 资源文件 1
- 参考文档references/web-apps.md8.3 KB
03 SKILL.md 正文
Serving web content from your agent through the port proxy
Services inside your agent are not reachable from outside it. scion expose
registers a local port with the Hub, which then serves it at a URL that
people with access to your agent can open.
The link serves web protocols only (HTTP, and WebSockets where supported; see
below). For a non-HTTP port (a database, a debugger, SSH or another TCP
service), the person uses scion tunnel instead, and the port must stay
exposed (see Full apps: scion tunnel).
Steps
- Run the service on
127.0.0.1on a free port (1024 or above; 9810 and 18380 cannot be exposed). Only loopback services can be exposed. - Run:
scion expose <port> --label "<what it is>" - Check it works the way the person will use it (see What the proxy carries; for pages, references/web-apps.md).
- Give the person the URL exactly as printed, including the trailing
/. Do not hand out tokens, and do not build the URL by hand.
Commands
scion expose <port> --label "<what it is>"exposes a port and prints its URL. Exposing a port that is already exposed succeeds and prints the same URL; it does not change the label (unexpose and expose again to relabel).scion expose --listlists your exposed ports with their labels and URLs, and whether auto-expose is on.scion unexpose <port>stops exposing a port. It succeeds if the port was not exposed. If auto-expose is on, a port that is still listening may be exposed again on its next scan.- An agent can have at most 10 ports exposed at once. Unexpose ports you no longer need.
- These commands work only inside an agent with a Hub connection.
What the proxy carries
- HTTP requests of any method, with the path below the URL and the query
string passed through to your service. Programs such as scripts and
curlcan call the URL too, with the Hub credentials of someone who has access to the agent. - Your service does not learn who is calling. Do not build a login on top of the link.
- WebSockets and streamed responses (for example server-sent events) work
only when the Hub runs its conduit transport, the same setting
scion tunnelneeds. Without it, a WebSocket request is refused with an error, each response is delivered whole once your service has finished it, and request bodies are limited to 32 MiB. - Your service must start answering within 60 seconds (the Hub's default), or the caller gets a timeout error. Without the conduit transport, the whole response must arrive within that time.
- What a page opened in a browser through the link can load depends on the Hub: with its page view on, the page's relative URLs load; with it off, the page can only use what is inside it. See references/web-apps.md before serving a web page or app.
Full apps: scion tunnel
For a full multi-file web app, a dev server, or anything the proxy does not
carry, the person can run scion tunnel on their own machine with the scion
CLI, if their Hub has scion tunnel turned on and they have port access to
the agent. Keep the port exposed with scion expose <port> (the tunnel only
reaches exposed ports), then suggest:
scion tunnel <agent> --port <port>
The service then opens on a local port on their machine and works as it does inside the agent, for any protocol. See https://googlecloudplatform.github.io/scion/hosted/user/port-forwarding/
Web pages and apps
For anything a person opens in a browser through the link, read references/web-apps.md: what loads with and without the Hub's page view, build settings, what does not work in a page, routing, and how to verify it honestly.
04 同仓库更多 Skills
team-creation
Create or extend scion agent team templates from a high-level description of roles and workflow. Use when the user describes a multi-agent team, panel, crew, pipeline, or any scenario requiring coordinated LLM agents with distinct roles. Also use when adding new roles to an existing team, modifying workflows, or restructuring agent coordination. Produces ready-to-use template directories in .scion/templates/ by default, or in a custom path if specified.
scion-scheduler
Schedule one-shot and recurring events for agents using the Scion CLI. Covers when to use scheduled events vs inline message delays, recurring cron schedules, lifecycle management, and the blocked-wait pairing rule.
scion-messaging
Use when sending messages to users or agents with scion message, choosing conversations and mentions, or interpreting incoming messages. Covers user-facing formatting, agent delivery, and reading conversation history.
scion-conversation
How to use the scion conversation command for managing conversations. Covers listing, creating, viewing, participant management, and message retrieval. Complements the scion-messaging skill.
scion-cli-operations
Operational constraints for Scion agents running in containerized sandboxes. Covers prohibited commands and hub-only API access. Complements the scion CLI reference and messaging skills.
scion-agent-manage
Manage concurrent LLM-based code agents with scion - orchestrate parallel agents with isolated workspaces, troubleshoot and recover stuck agents