api-functions-return-dicts

IN premise

Every public API function returns a `dict` (or `str` for markdown/compact), never a `Network` or `Node` object, ensuring JSON-serializability at the boundary for CLI, HTTP, and tool-call consumers.

Summary

All public-facing functions in the API layer hand back plain dictionaries or strings rather than internal data structures. This guarantees that any consumer — whether a command-line tool, a web server, or an LLM tool call — can serialize the response to JSON without extra conversion steps, keeping the API boundary clean and integration-friendly.

Dependents

These beliefs depend on this one:

Details

Sourceentries/2026/04/23/reasons_lib-api.md