AI agentsKatana Agent view

How to add AI agents to Katana

Short answer

Katana is a cloud-only system with a REST API and webhooks, so AI agents connect as an external worker: read stock, orders and manufacturing orders through the API, reason over them, and propose changes that a person approves before anything is written back. Start with read-only agents for shortage triage and PO drafting, then add narrow write tools.

Katana is a favourite of small and mid-size makers who outgrew spreadsheets: it gives them live inventory, a bill of materials per product, manufacturing orders, purchase orders and a shop floor view without an implementation project. The tradeoff is that there is no database you can reach into and no on-prem option. Everything an agent does has to go through the public API.

That constraint is actually helpful for agents. The API is a clean, bounded tool surface, and the objects (sales orders, manufacturing orders, purchase orders, stock levels, variants, materials) map directly onto the decisions a planner makes every morning: what is short, what is late, what should I buy, what should I build first.

This page walks through a practical agent design for Katana: which tools to give the agent, where it should be forbidden to write, and how to run the reasoning on a private model if your customer or contract data should not leave your control.

What teams use it for

Shortage triage for open manufacturing orders

An agent reads open manufacturing orders and the ingredient availability on each, flags the ones that cannot be made as scheduled, and ranks them by the sales order due date they feed.

Draft purchase orders from reorder signals

Using stock levels, reorder points and open POs, the agent proposes purchase orders per supplier and quantities rounded to the supplier minimums you store, leaving them as drafts for a buyer.

Late sales order explainer

For a sales order at risk, the agent walks the chain: variant, recipe, missing material, supplier PO and expected arrival, then writes a two line explanation for the account manager.

Stock adjustment anomaly review

Reads recent stock adjustments and stocktake results, finds items with repeated negative adjustments and suggests cycle counts or a recipe quantity correction.

Order intake from a storefront or inbox

An agent matches incoming order requests to Katana variants and customers, creates a draft sales order when the match is clear and routes ambiguous lines to a human.

Katana integration surface

  • Katana public REST API (base URL has historically been under api.katanamrp.com with a versioned path such as /v1). Authentication is a bearer API key generated in the Katana settings. Check the current developer docs for the exact base URL and key scope for your plan.
  • Resources covering products, variants, materials, recipes (BOM rows), sales orders and their rows, manufacturing orders and operations, purchase orders and rows, stock levels per location, stock adjustments, customers and suppliers. Names and availability vary as the API evolves, so verify against the live reference.
  • Webhooks for events such as order and stock changes, delivered to an HTTPS endpoint you host. Use them to wake an agent instead of polling. Confirm the current event list in the docs.
  • Rate limits apply per API key. Plan for a request budget in the tens per minute and design agents to batch reads and cache the product and recipe catalogue.
  • No direct database access and no on-prem edition. Native connectors (Shopify, WooCommerce, QuickBooks, Xero and similar) and Zapier or Make exist, but they are for sync, not for reasoning.

How it works

  1. 1

    Create a dedicated API key and a service identity

    Generate a key used only by the agent platform, store it in a secrets manager, and record every call made with it so you can tell agent actions from user actions.

  2. 2

    Wrap the API as a small set of typed tools

    Expose tools like get_open_manufacturing_orders, get_stock_by_variant, get_open_purchase_orders and get_recipe. Return trimmed JSON, not raw payloads, so the model sees only what it needs.

  3. 3

    Cache the slow-changing catalogue

    Pull products, variants, materials and recipes on a schedule into a local store. Agents then spend their rate limit on live stock and order status.

  4. 4

    Define the agent task and its stop conditions

    Write the goal as a narrow job (for example, produce a ranked shortage list by 7am), with a step limit and an explicit rule to stop and ask when data is missing.

  5. 5

    Add write tools as proposals

    The agent creates a proposal record (draft PO, suggested stock adjustment) in your own store or posts it in chat. Only an approval step calls the Katana write endpoint.

  6. 6

    Trigger by webhook and by schedule

    Run the shortage agent nightly and re-run it when a webhook reports a stock or order change affecting a watched item.

  7. 7

    Log, review and tune

    Keep the tool calls, the reasoning summary and the human decision together. Tune prompts against real misses before widening the agent's scope.

Example flows

Morning shortage digest

Trigger: Scheduled run at 06:30 local time

  1. Agent pulls open manufacturing orders due in the next 10 days.
  2. For each, it reads recipe rows and current stock per location.
  3. It checks open purchase orders for expected arrival of missing materials.
  4. It ranks orders by the earliest linked sales order date.
  5. It posts a digest to the planner with a recommended action per line.

Result: The planner starts the day with a ranked list of build risks instead of opening a dozen screens.

PO draft for approval

Trigger: Webhook reports a material falling below its reorder point

  1. Agent reads the material, its default supplier and open POs.
  2. It computes a quantity using your stored order multiple and lead time.
  3. It writes a proposal with the reasoning and the exact PO payload.
  4. A buyer approves in chat; the approval handler creates the PO through the API.

Result: Reorders happen faster, and a person still decides every purchase.

Keeping data on-prem

Katana itself is cloud only, so the system data is already off your premises. What you can still control is where the reasoning happens. Run the agent runtime and an open-weight model on your own GPU server or private cloud, pull Katana data over the API into that environment, and keep prompts, cached catalogue data and logs there. This matters when recipes are trade secrets or when a customer contract limits where order data may be processed. It does not change what Katana holds, so be honest in security reviews about that boundary.

Security checklist

  • Use a dedicated API key, never a person's, and rotate it on a schedule.
  • Keep agents read-only by default; route every write through a human approval and log the approver.
  • Mask customer names and contact details in prompts when the task does not need them.
  • Store the agent's tool calls and outputs as an audit trail separate from Katana's own history.
  • Validate every model-produced payload against a schema and reject unknown fields before calling the API.

Ways to get it done

Use Zapier or Make with an LLM step

Effort: Hours to days

Simple single-step automations such as summarizing a new order. Weak for multi-step reasoning and rate limit handling.

Build in-house with an agent framework and the Katana API

Effort: Two to six weeks for a first useful agent

Teams with a developer who can host a small service, manage secrets and monitor jobs.

Work with a partner such as Netray

Effort: A scoped pilot, then iteration

You want agents, approvals and optional private model hosting built and tuned for your recipes and suppliers.

Pitfalls

  • !Letting the agent hit the API for every question and exhausting the rate limit; cache the catalogue instead.
  • !Treating variants, products and materials as one thing; stock and recipes hang off variants and materials separately.
  • !Giving the agent write access before you have weeks of correct read-only output.
  • !Ignoring multi-location stock, which makes a naive available quantity wrong.
  • !Not handling pagination, so the agent reasons over only the first page of orders.

Frequently asked questions

Does Katana have built-in AI agents?

Katana adds features over time and you should check its current release notes. Built-in features generally work inside its own screens. A custom agent is worth it when you need cross-system reasoning, your own rules for suppliers and priorities, or control over where the model runs.

Can an agent create manufacturing orders in Katana?

Technically yes, if the API exposes it for your plan. In practice you should have the agent propose the order and let a planner approve, because a wrong quantity can reserve stock and distort the schedule for other jobs.

How do agents learn about changes without polling?

Use Katana webhooks where available to post events to an endpoint you host, then queue the relevant agent task. Keep a scheduled sweep as a safety net in case a webhook is missed or delayed.

Is the Katana API enough for a full planning agent?

It covers the core objects for shortage, purchasing and order status work. Gaps usually appear in historical analytics and in anything outside Katana, such as supplier lead times kept in email, so plan to add your own data store.

Can this run on a private model?

Yes. The agent runtime and model can run on your hardware while only API calls go to Katana. Open-weight models handle structured tool use well enough for planning tasks if you keep tools narrow and validate outputs.

Want AI agents working on your Katana?

A free 30 minute assessment: we map the integration path for your version and setup, and where it should run.

Get a free assessment