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.

discover.sh
npx @lunnoa/client tools list --for-agent --jsonnpx @lunnoa/client tools search email --for-agent --jsonnpx @lunnoa/client tools get http_action_send-request --jsonnpx @lunnoa/client apps list --jsonnpx @lunnoa/client connections list --jsonnpx @lunnoa/client agents list --jsonnpx @lunnoa/client workflows list --jsonnpx @lunnoa/client entity-types list --jsonnpx @lunnoa/client projects list --jsonnpx @lunnoa/client features --json

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)

discovery.ts
const features = await lunnoa.discovery.enabledFeatures();const agents = await lunnoa.agents.list({ expansion: ['description'] });const workflows = await lunnoa.workflows.list({  expansion: ['description', 'isActive'],});const entityTypes = await lunnoa.entityTypes.list({  expansion: ['attributeSchema', 'stateSchema'],});

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. Prefer entities.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.

Next

  • CLI: tools list / tools get and deploy
  • Entities: create and update records from those schemas
  • Workflows: read trigger input config and run workflows
  • Codegen: replace runtime discovery with typed accessors