Discovery
Inspect the catalogue, agents, workflows, and entity schemas for an API key.
If you cannot run codegen yet, discover schemas at runtime and build forms from them. Prefer codegen once you have a stable deployment and API key.
Do not invent catalogue action ids. For a coding agent, prefer the CLI (tools list / tools get --json). lunnoa.actions.get(appId, actionId) only looks up one action you already know.
CLI (preferred for agents)
Same credentials as deploy (--url, --api-key, or LUNNOA_* / lunnoa.config). --json is the machine-readable form.
tools list is compact (appId, actionId, name, flags). tools get returns inputConfig, inputFields, and a defineAction sketch. Full command table: CLI.
List what the deployment offers (SDK)
Call discovery.enabledFeatures() early so you can hide areas the deployment's edition or infrastructure does not support.
Use the schemas
attributeSchema.sections[].fields[]defines each entity field (id,label,type,required). Build forms and tables from this.stateSchema.states[]/transitions[]is the entity state machine. Preferentities.getStateTransitions(id)for transitions valid now.- Manual-trigger input fields live on
workflows.get(id, { expansion: ['triggerNode'] })→triggerNode.value.customInputConfig.
Field types commonly include text, number, currency, date, boolean, and dropdown (with config.options). Always request the expansions you need: responses are minimal by default.