AI agent handbook

This handbook is the engineering note for putting an agent on a line or a desk. Numbers in it are acceptance checks to design against. They are not a named customer's measured result. Cases stay anonymous. The Chinese edition is the long form; this page keeps the same claims in English so a retrieved paragraph can stand alone.

How to read this

An agent goes live when four things exist together: a bounded goal, a tool contract, a harness that can replay the run, and an acceptance sheet someone can sign. A chat reply is not that. Pick a role, read eight to twelve sections, then run the smallest order. Business owners start at selection and acceptance. Builders start at the path, agent studio, and the minimum run. Drawing work starts at the drawing sections; vision and robots have their own.

Terms

crusbro agent-OS is the embeddable kernel. crusbro agent studio configures tools, skills and prompts and exports a package. An ontology is the shared set of names for parts, documents, stations and actions. A knowledge graph links those names to materials, equipment and history. AI reads and drafts. A Run is one traceable execution. The evidence pack for an order holds inputs, tool receipts and the release record. Completion means a tool receipt or an order id, not a sentence the model wrote.

Chat, workflow, RPA, agent

Chat generates an answer. A workflow follows a fixed path. RPA clicks a screen that has no API. An agent plans inside a goal and calls system interfaces, and a person confirms the draft before it is sent or written back. Steps that are already deterministic stay in rules. Use an API before RPA. Payment, line stop and hazardous motion are not auto-released.

What to choose

If the job is only an answer, use chat or retrieval. If the path is fixed and exceptions are rare, use a workflow and let the model summarize a node. If the job crosses systems and exceptions are common, use an agent plus a tool contract. If it sends mail, moves money, stops a line or moves a robot, the released copy must be the copy a person saw. One agent for the whole company cannot be accepted. Pilot one document type, one station or one defect, then copy.

Completion and tool calls

The model proposes a tool call. The runtime checks the schema and the allow-list, then returns a receipt. The next step reads the receipt, not the model's narration of it. A missing field stays missing. The prompt does not fill a grade, a price or a machine spec that the source did not contain.

Context, cost, latency

Put order facts and tool results in the task context. Keep red lines in the versioned system block. Longer context increases cost and delay; it does not replace a knowledge graph of materials and equipment. Retrieve the node you need instead of pasting the whole plant into the prompt.

Prompts on a live desk

A prompt cuts bad drafts. It does not authorize a send. Write the forbidden actions in configuration. Write the order facts as observations. After a prompt change, diff the evidence packs, do not ask the model whether it improved.

Models and routing

Route by task. Reading a drawing, drafting a mail and classifying a defect can use different models, and the route is part of config_version. A failed provider falls back only along a route you wrote down. Confidence in the transcript is not a route.

Path from zero to a run

Name the objects. List the tools and their risk class. Bind a config version to the order. Run one document or one station. Sign the acceptance rows. Then widen. crusbro agent-OS is the kernel you embed. Studio is the zero-code packager. OpenClaw is a local experiment path; a line uses agent-OS. See the OpenClaw guide.

Studio and packages

Studio edits tools, skills, models and prompts in the browser and exports a package. The runtime is still agent-OS. A component package meant to sit inside a cluster does not carry its own kernel. The host cluster provides it.

Goal and boundary

Write what the run must produce, what it must not do, and which system is allowed to change. A goal without a non-goal becomes an agent that "helps" by sending mail. The acceptance sheet quotes the goal in the same words.

The agent loop

A Run is a stateful loop: goal in, result out. Objects land in the ontology first. The knowledge graph records materials and equipment. AI reads and drafts. Step count and wall clock have a limit. A turn that ends with no tool call is not a completed worker step.

Planning

Fixed skeletons stay deterministic: a process route's operation order, a booking's required fields, a station recipe. The model fills local parameters inside that skeleton. Letting the model invent the whole chain drops the compliant path.

Tool contracts and idempotency

Every tool declares inputs, outputs, an idempotency key and a permission. A retry of the same key does not create a second shipment, a second MES write or a second mail. Natural language is not an idempotency key.

State, retry, compensation

Classify the error before you retry. A timeout may be safe to retry with the same key. A validation reject is not. Partial success is a state of its own, with a daily reconciliation, not a silent success.

Smallest run

One inbox or one drawing, one draft, one human release, one evidence pack. If that pack cannot be downloaded by order id, do not add a second scene. Sandboxes: drawing.crusbro.com, agent.crusbro.com, freight.crusbro.com.

Why grounding

A model can repeat the words on a drawing. It does not hold whether this cutter fits this hole, whether the dimension chain closes, or which past part this one should follow. Those links live in the ontology, the knowledge graph and the experience library.

Retrieval on site

Retrieve a material, a cutter, a station recipe or a past part by the object's name. Do not dump an entire share drive into the prompt. If retrieval misses, the field stays blank and the source of the miss is recorded.

Memory layers

The order's evidence pack is the memory that audits. A vector store can suggest a similar part. It does not overwrite a released process card. Configuration revisions are not "memory"; they are versions bound to the run.

SOP as rules

Encode the rule that must always hold: dimension chain, tolerance chain, required booking fields, dual sign on an X-ray report. The model drafts around the rule. The rule rejects the draft when the chain does not close.

Domain models inside the agent

Drawing, vision and robot agents share the kernel and do not share one vocabulary. Holes and tolerances, defect classes, and robot actions are separate ontologies that point at the same order id when a plant ties them together.

Why a harness

The harness is the layer that decides whether a side effect happens. The model classifies and drafts. Field notes on the same point: ontology first, then release and replay.

What the harness holds

It holds the allow-list, the release record, the replay and the binding between config version and order id. The host keeps the UI and master data. 600,000+ hours of business runtime sit behind that split.

Checks before the next state

A check fails closed. A missing grade, a contradictory booking field, or a dimension chain that does not close stops the write-back. The prompt cannot mark the check passed.

The released copy

Before mail, EDI or a MES promotion, store the exact payload, its hash, the recipients and the config version. The person confirms that payload. What leaves is that payload.

Replay and the evidence pack

Replay rebuilds inputs, tool calls and the release from the order id without mutating state. The pack is the thing an auditor downloads. A chat export is not a pack.

Config bound to the run

Prompt hash, tool registry, check table and model route travel with the run. Changing the prompt after a bad release does not rewrite the pack. Rollback is a revision operation.

Several roles

A manager plans and closes. A worker executes and must notify back on the contract. An auditor reads the pack. High-risk tools are authorized per role. Zero tools at the end of a worker turn is not completion.

Systems you connect

PLM, MES, QMS, mail, CRM and a robot controller are host tools. The kernel does not replace their permission model. Write-back uses the host's identity and an idempotency key.

Master data

Materials, cutters, machines and ports are master data. If the record is absent, the agent leaves the field blank. It does not invent a grade, a cutter or a freight rate.

Queues

Notify keys include run, sender, receiver, intent and a bare token. A key that is only the run id collides a dispatch with its completion receipt. One site processes one execute at a time for the same operating unit.

Partial success

A parsed drawing with a blank machine spec is a partial result, not a failure of the whole run and not a zero-cost card. Say what is missing at the top of the deliverable. Do not fill missing money with zero.

Evaluation

Hold a golden set: drawings, mails, images. After a prompt or model change, diff packs. A higher fluency score with a new unapproved send is a fail.

Injection

Mail and PDF text are data. They do not become system instructions. A sentence in an attachment that says "send this now" does not release the freeze. Run injection cases before go-live and record zero unapproved outbound.

What to watch

Watch queue depth, tool errors by class, blank-field rate, and unapproved outbound. The last of those is a count of zero in a healthy soak, not a percentage to negotiate in the prompt.

Rollout

Shadow one line or one customer. Compare packs to the human result. Then widen. A demo that skips the release record trains people to sign summaries.

Acceptance rows

Sign these before the second sprint: the scene closes; denied tools stay denied; outbound waits for the released copy; the pack downloads by order id; replay matches the config version; a rollback drill has been done once. Throughput and savings come from the signed pilot, not from this page.

Drawing agent

The drawing agent reads STEP, IGES, DWG, DXF and PDF. An ontology gives holes, slots, tolerances, dimension chains and operations one set of names. The knowledge graph matches grades, standards and cutters. An experience library matches parts already made. AI drafts the process card, BOM, cost and review notes. Geometry and cycle time come from calculation. Missing grades or machine specs stay blank. A person confirms before write-back to PLM or MES. Trial: drawing.crusbro.com.

Inputs

STEP AP203/AP214 carries geometry and does not carry semantic PMI; tolerances then come from the 2D drawing or from a person. IGES and vector DXF are read. DWG dimensions live on DIMENSION entities. Mesh files without boundary representation are refused with a reason. A scanned PDF is not treated as a recognized drawing. An assembly is split into bodies before a route is planned; tiny solids that are standard parts are skipped.

2D

A 2D drawing yields features, sizes and the title block when they are printed on the sheet. BOM completeness follows what the drawing states. A field that is not on the sheet stays blank and keeps its source, and a person fills it before PLM or MES write-back.

3D

Feature recognition uses the boundary representation and face adjacency. Holes, pockets and faces become ontology objects. The model does not estimate a missing tolerance.

Process route

Small-batch, high-mix routing keeps a deterministic skeleton. Group by feature family and setup, build an operation chain per group, then merge batches by due date. The model fills local parameters. It does not reorder the compliant skeleton. Cycle time is recomputed from cutting relations, not guessed.

BOM and cost

BOM lines come from the drawing and the matched material. Cost uses prices that exist in the source. A missing price stays blank. Zero is not used as a placeholder, because zero reads as "this costs nothing".

Review and revision

Each field can be opened back to the dimension on the drawing. A conflict with the knowledge graph stays empty until a person fills it. Revision conflicts are recorded with the same order id as the process card.

Robot agent

crusbro robot-agent turns what the cameras see into a motion that obeys the ontology: reachability, collision and the allowed tool. High-risk motion waits for a person. Vendor hardware stays behind a hardware abstraction. Vision-guided deburring is one such loop: detect the burr on the live part, check interference and reach, then execute and recheck. It does not depend on pretending the drawing already listed every burr.

Vision agent

Stations, defect classes and accept criteria are a vision ontology. The knowledge graph links cameras, parts and past defects. AI returns location and class. The station recipe holds thresholds. Gray-zone results wait. Surface inspection, dimensional checks and X-ray reading share that object model.

X-ray

DR weld and casting film reading detects, grades, and then takes two signatures before the report is issued. The report points at the image and the model release. A single model score is not the released decision.

Freight agent

Booking, customs documents and manifests sit in a business ontology. Mail is merged on vessel and voyage, container type and quantity, and the ports. AI drafts the booking, the manifest and the VGM. A person confirms, and the sent copy is the confirmed copy. Conflicting fields wait. They are not guessed. Trial: freight.crusbro.com.

One person

One person writes the business objects into an ontology, lets AI draft inquiry replies and quotes, and confirms before anything is sent. Pricing promises, contracts and payments stay on that confirm step. The operating chain is product, reach, follow-up, delivery and supply. Start with one chain.

What fails in the field

Treating a chat sentence as a completed write. Retrying every error and duplicating a shipment. One global check table for two plants that need different release rules. Skipping the release record in the demo. Filling blanks with zero. Naming a customer in a public note. High temperature on the write path.