This repository contains the formal TypeSpec specification for the NLWeb protocol, which defines a standardized interface for natural language interactions with web endpoints.
NLWeb provides two main endpoints:
- Ask: Query endpoints with natural language and receive structured responses
- Who: Discover which agents/tools can answer a given question
Use the companion nlweb_core Python library which provides Pydantic models.
Generate types from the OpenAPI schema:
# View the generated schema
cat tsp-output/openapi/openapi.yaml
# Generate TypeScript types
npx openapi-typescript tsp-output/openapi/openapi.yaml -o nlweb-types.ts
# Generate Go types (example)
oapi-codegen -generate types -package nlweb tsp-output/openapi/openapi.yaml > nlweb.gonpm install
npx tsp compile .cat tsp-output/openapi/openapi.yamlCurrent version: 0.5