-
Notifications
You must be signed in to change notification settings - Fork 156
Add agent-readiness discovery endpoints for AI agents #478
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
218a076
4854994
c050bab
8ac2e45
bbe173b
c5410c9
3dd2b50
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,20 @@ | ||
| # CloudFront agent-readiness configuration | ||
|
|
||
| Production hosting uses S3 + CloudFront. Apply these after deploying static files. | ||
|
|
||
| ## Link response headers (RFC 8288) | ||
|
|
||
| 1. Create a response headers policy from `response-headers-policy.json`, or attach equivalent `Link` headers to the default cache behavior for `/` and `/index.html`. | ||
| 2. Alternatively, rely on `scripts/set-s3-agent-metadata.sh` (runs during `make publish`) which sets S3 object metadata on `index.html`. | ||
|
|
||
| ## Markdown content negotiation | ||
|
|
||
| 1. Publish the CloudFront Function in `markdown-negotiation.js`. | ||
| 2. Associate it with **viewer-request** on the default behavior. | ||
| 3. Ensure `index.md` is deployed to S3 (copied from `public/index.md` via the Astro build). | ||
|
|
||
| The function rewrites `/` and `/index.html` to `/index.md` when `Accept: text/markdown` is present. | ||
|
|
||
| ## Netlify previews | ||
|
|
||
| PR previews use `public/_headers` for Link headers and `netlify/edge-functions/markdown-negotiate.js` for markdown negotiation. | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,18 @@ | ||
| // CloudFront Function: serve markdown when Accept: text/markdown is present. | ||
| // Associate with viewer-request on the nextflow.io CloudFront distribution. | ||
| function handler(event) { | ||
| var request = event.request; | ||
| var headers = request.headers; | ||
| var accept = headers.accept ? headers.accept.value : ""; | ||
| var uri = request.uri; | ||
|
|
||
| if (accept.indexOf("text/markdown") === -1) { | ||
| return request; | ||
| } | ||
|
|
||
| if (uri === "/" || uri === "/index.html") { | ||
| request.uri = "/index.md"; | ||
| } | ||
|
|
||
| return request; | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,23 @@ | ||
| { | ||
| "Comment": "Link response headers for nextflow.io agent discovery (RFC 8288)", | ||
| "Name": "nextflow-io-agent-discovery-headers", | ||
| "HeadersConfig": { | ||
| "HeaderBehavior": "whitelist", | ||
| "Headers": { | ||
| "Quantity": 1, | ||
| "Items": ["Link"] | ||
| } | ||
| }, | ||
| "CustomHeadersConfig": { | ||
| "Quantity": 1, | ||
| "Items": [ | ||
| { | ||
| "Header": "Link", | ||
| "Value": "</.well-known/api-catalog>; rel=\"api-catalog\", </docs.seqera.io/nextflow/>; rel=\"service-doc\", </openapi.json>; rel=\"service-desc\"", | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. still referencing openai even though it's gone |
||
| "Override": false | ||
| } | ||
| ] | ||
| }, | ||
| "SecurityHeadersConfig": {}, | ||
| "CorsConfig": {} | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,18 @@ | ||
| # DNS for AI Discovery (DNS-AID) | ||
|
|
||
| Publish the records in `nextflow.io.zone` under the `_agents` namespace for `nextflow.io`. | ||
|
|
||
| ## Requirements | ||
|
|
||
| 1. Add `_index._agents.nextflow.io` and `_a2a._agents.nextflow.io` SVCB records (see zone file). | ||
| 2. Enable DNSSEC on the public zone and publish DS records at your domain registrar. | ||
| 3. Verify with DNS-over-HTTPS: | ||
|
|
||
| ```bash | ||
| curl -s 'https://cloudflare-dns.com/dns-query?name=_index._agents.nextflow.io&type=SVCB' \ | ||
| -H 'accept: application/dns-json' | ||
| ``` | ||
|
|
||
| ## Production note | ||
|
|
||
| DNS-AID records are managed outside this repository (Route 53, Cloudflare DNS, or your registrar). Apply the zone file through your DNS operations workflow after review. |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| ; DNS for AI Discovery (DNS-AID) records for nextflow.io | ||
| ; Deploy this zone (or merge these records) with your DNS provider. | ||
| ; Sign the zone with DNSSEC and publish DS records at the registrar. | ||
|
|
||
| $ORIGIN nextflow.io. | ||
| $TTL 3600 | ||
|
|
||
| ; Index entrypoint — points agents to the site's API catalog | ||
| _index._agents.nextflow.io. IN SVCB 1 nextflow.io. alpn="h3,h2" port=443 mandatory=alpn,port | ||
|
|
||
| ; Agent-to-agent discovery entrypoint | ||
| _a2a._agents.nextflow.io. IN SVCB 1 nextflow.io. alpn="h3,h2" port=443 mandatory=alpn,port |
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Don't want any netlify stuff so can remove this |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,36 @@ | ||
| const MARKDOWN_PATHS = { | ||
| "/": "/index.md", | ||
| "/index.html": "/index.md", | ||
| }; | ||
|
|
||
| export default async function handler(request, context) { | ||
| const accept = request.headers.get("Accept") ?? ""; | ||
| if (!accept.includes("text/markdown")) { | ||
| return context.next(); | ||
| } | ||
|
|
||
| const url = new URL(request.url); | ||
| const markdownPath = MARKDOWN_PATHS[url.pathname]; | ||
| if (!markdownPath) { | ||
| return context.next(); | ||
| } | ||
|
|
||
| const markdownUrl = new URL(markdownPath, url.origin); | ||
| const markdownResponse = await context.rewrite(markdownUrl.toString()); | ||
| if (!markdownResponse.ok) { | ||
| return context.next(); | ||
| } | ||
|
|
||
| const body = await markdownResponse.text(); | ||
| const tokenEstimate = Math.ceil(body.length / 4); | ||
|
|
||
| return new Response(body, { | ||
| status: 200, | ||
| headers: { | ||
| "Content-Type": "text/markdown; charset=utf-8", | ||
| "x-markdown-tokens": String(tokenEstimate), | ||
| Vary: "Accept", | ||
| "Cache-Control": "public, max-age=300, must-revalidate", | ||
| }, | ||
| }); | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -6,7 +6,9 @@ | |
| "dev": "astro dev", | ||
| "start": "astro dev", | ||
| "docs": "bash build_docs.sh", | ||
| "prebuild": "node scripts/generate-agent-skills-index.mjs", | ||
| "build": "astro check && astro build && bash build_docs.sh", | ||
| "generate:agent-skills-index": "node scripts/generate-agent-skills-index.mjs", | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It'd be good if this ran on CI somewhere to auto-update (or at least check in CI so that we force it to stay up to date).
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Either that or add it onto the |
||
| "preview": "astro preview", | ||
| "astro": "astro" | ||
| }, | ||
|
|
||
|
ewels marked this conversation as resolved.
|
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,30 @@ | ||
| { | ||
| "$schema": "https://schemas.agentskills.io/discovery/0.2.0/schema.json", | ||
| "source": "https://github.com/nextflow-io/agent-skills", | ||
| "skills": [ | ||
| { | ||
| "name": "create-workflow", | ||
| "type": "skill-md", | ||
| "description": "INVOKE THIS SKILL IMMEDIATELY when user asks to: write/create/build a Nextflow pipeline or workflow,\ncreate any bioinformatics pipeline (RNA-seq, DNA-seq, variant calling, ChIP-seq, etc.),\nor compose/chain Nextflow modules from the Nextflow Registry. This skill handles all Nextflow workflow creation tasks.", | ||
| "url": "https://nextflow.io/.well-known/agent-skills/create-workflow/SKILL.md" | ||
| }, | ||
| { | ||
| "name": "install-nextflow", | ||
| "type": "skill-md", | ||
| "description": "Install or upgrade Nextflow on the user's machine. Use when the user wants to install Nextflow, check their current Nextflow version, upgrade Nextflow, or set up the prerequisites (Java 17+) needed to run Nextflow.", | ||
| "url": "https://nextflow.io/.well-known/agent-skills/install-nextflow/SKILL.md" | ||
| }, | ||
| { | ||
| "name": "launch-workflow", | ||
| "type": "skill-md", | ||
| "description": "Launch Nextflow pipeline executions on cloud and HPC clusters via Seqera Platform. Use when the user wants to run/launch/submit a pipeline on a cloud or cluster compute environment, configure a compute environment, push pipeline changes to GitHub before launching, or sign in to Seqera Platform.", | ||
| "url": "https://nextflow.io/.well-known/agent-skills/launch-workflow/SKILL.md" | ||
| }, | ||
| { | ||
| "name": "run-module", | ||
| "type": "skill-md", | ||
| "description": "Run Nextflow Registry modules natively using `nextflow module` commands. Use when running, listing, or getting info about Nextflow modules.", | ||
| "url": "https://nextflow.io/.well-known/agent-skills/run-module/SKILL.md" | ||
| } | ||
| ] | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| { | ||
| "linkset": [ | ||
| { | ||
| "anchor": "https://nextflow.io/", | ||
| "service-doc": [ | ||
| { | ||
| "href": "https://docs.seqera.io/nextflow/", | ||
| "type": "text/html" | ||
| } | ||
| ] | ||
| } | ||
| ] | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| { | ||
| "serverInfo": { | ||
| "name": "nextflow.io", | ||
| "version": "1.0.0" | ||
| }, | ||
| "transport": { | ||
| "type": "webmcp", | ||
| "pageUrl": "https://nextflow.io/" | ||
| }, | ||
| "capabilities": ["tools"] | ||
| } |
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can remove, as specifically for netlify |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,26 @@ | ||
| / | ||
| Link: </.well-known/api-catalog>; rel="api-catalog", </docs.seqera.io/nextflow/>; rel="service-doc" | ||
|
|
||
| /index.html | ||
| Link: </.well-known/api-catalog>; rel="api-catalog", </docs.seqera.io/nextflow/>; rel="service-doc" | ||
|
|
||
| /.well-known/api-catalog | ||
| Content-Type: application/linkset+json | ||
| Cache-Control: public, max-age=300, must-revalidate | ||
| Access-Control-Allow-Origin: * | ||
|
|
||
|
|
||
| /.well-known/mcp/server-card.json | ||
| Content-Type: application/json | ||
| Cache-Control: public, max-age=300, must-revalidate | ||
| Access-Control-Allow-Origin: * | ||
|
|
||
| /.well-known/agent-skills/index.json | ||
| Content-Type: application/json | ||
| Cache-Control: public, max-age=300, must-revalidate | ||
| Access-Control-Allow-Origin: * | ||
|
|
||
| /index.md | ||
| Content-Type: text/markdown; charset=utf-8 | ||
| Cache-Control: public, max-age=300, must-revalidate | ||
| Access-Control-Allow-Origin: * |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,56 @@ | ||
| # Nextflow | ||
|
|
||
| > Reproducible Scientific Workflows at Scale | ||
|
|
||
| Nextflow enables scalable, reproducible, and portable scientific workflows for research and production use cases. | ||
|
|
||
| ## Quick links | ||
|
|
||
| - [Documentation](https://docs.seqera.io/nextflow/) | ||
| - [Community forum](https://community.seqera.io/tag/nextflow) | ||
| - [Training](https://training.nextflow.io/latest/) | ||
| - [Examples](/basic-pipeline.html) | ||
| - [VS Code extension](https://marketplace.visualstudio.com/items?itemName=nextflow.nextflow) | ||
| - [Seqera AI assistant](https://seqera.io/ask-ai/) | ||
|
|
||
| ## Features | ||
|
|
||
| ### Fast prototyping | ||
|
|
||
| Nextflow allows you to write a computational pipeline by making it simpler to put together many different tasks. You may reuse your existing scripts and tools without learning a new language. | ||
|
|
||
| ### Reproducibility | ||
|
|
||
| Nextflow supports [Docker](https://www.docker.com/) and [Singularity](https://apptainer.org/) containers, with Git integration for versioned, self-contained pipelines. | ||
|
|
||
| ### Continuous checkpoints | ||
|
|
||
| Intermediate results are automatically tracked so you can resume from the last successful step. | ||
|
|
||
| ### Portable | ||
|
|
||
| Pipelines run on GridEngine, SLURM, LSF, PBS, Kubernetes, AWS, Google Cloud, Azure, and more without code changes. | ||
|
|
||
| ### Stream oriented | ||
|
|
||
| Nextflow extends the Unix pipes model with a fluent DSL for complex stream interactions and functional composition. | ||
|
|
||
| ### Unified parallelism | ||
|
|
||
| Parallelisation is defined by process input and output declarations; applications scale transparently. | ||
|
|
||
| ## Community resources | ||
|
|
||
| - [nf-core](https://nf-co.re/) — curated community pipelines | ||
| - [Seqera Pipelines](https://seqera.io/pipelines/) — browse open-source pipelines | ||
| - [GitHub issues](https://github.com/nextflow-io/nextflow/issues) — report bugs or request features | ||
|
|
||
| ## Discovery | ||
|
|
||
| Machine-readable resources for agents: | ||
|
|
||
| - API catalog: `/.well-known/api-catalog` | ||
| - MCP server card: `/.well-known/mcp/server-card.json` | ||
| - Agent skills: `/.well-known/agent-skills/index.json` | ||
|
|
||
| Supported by [Seqera](https://seqera.io). |
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -12,5 +12,6 @@ Disallow: /misc/ | |||||
| Disallow: /logs/ | ||||||
| Disallow: /tests/ | ||||||
| Disallow: /releases/ | ||||||
| Content-Signal: ai-train=no, search=yes, ai-input=yes | ||||||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We want to be in training sets..
Suggested change
|
||||||
|
|
||||||
| Sitemap: https://nextflow.io/sitemap-index.xml | ||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't want to touch netlify