HTTP resources
Register one owned resource during module startup and unregister that same instance during shutdown. Declare supported methods, authentication schemes, user-session use, content negotiation, and synchronous/asynchronous behavior explicitly. Parse and bound the request before reading large bodies or contacting other services. For application-style APIs, the Neuron HTTP Router adds controllers, nested routes, binding, middleware, authorization, and generated OpenAPI. Keep controllers thin and place business policy behind services.Agent resources
The Agent module discoversIAgentResource implementations and registers them below /Agent. Existing endpoint classes are the executable pattern:
- constructor: resource path and JSON/XML pattern expressions;
GetAuthenticationSchemes: public, signed, JWT, or other authentication;POST: consume validated pattern variables and return a named dictionary/XML result;- paired
.reqresources: canonical input schemas; - paired integration fixtures/tests: contract protection.
Content negotiation
InternetContent locates encoders, decoders, and converters by media type. Registering a converter can affect calls across the process, including MCP Internet Content and Markdown rendering. Preserve charset, filename, content type, and errors; never reinterpret arbitrary bytes as text.