Question / Feature request (?): NPL Source Code Retrieval API

Add an API endpoint to retrieve NPL source code (or parsed metadata) for deployed protocols, enabling runtime extraction of business rules, state machines, and permissions without filesystem access.

Use case:

We’ve built a bridge that dynamically generates Google ADK tools from NPL protocols. The bridge enriches tool docstrings with:

  • Business rules (require() statements)

  • State transitions (become clauses)

  • Party permissions (who can execute which actions)

  • Workflow guidance (“What Happens Next”)

This semantic information is critical for LLM agents, which read the enriched docstrings and understand the business contract.

Hi @jk-nd,

In theory we support this using the various /api/engine/environment/ calls (link), but they require the relevant command ID which is currently only available by listening to the command stream.

A better way of obtaining sources associated with protocols is on the 2026 roadmap.

1 Like

Great, @yigal, looking forward to that feature.