Submitting Work
Submit work batches to a running you-agent-factory and relate work items with DEPENDS_ON or PARENT_CHILD.
Work Batches
A FACTORY_REQUEST_BATCH is one JSON document that creates multiple work items in a single validated submission. Required fields are requestId, type set to FACTORY_REQUEST_BATCH, and a works array. Each works entry needs a name and a workTypeName that exists in the target factory. The factory validates the full batch before creating any work, so an invalid batch rejects the whole submission.Minimal batch document:
Submit that document to a factory that is already running:
Validate the batch without creating work:
Relationships
Batch relations tell the factory how work items in the same submission should wait on each other or nest under a parent. Put them in the relations array on the FACTORY_REQUEST_BATCH. Choose DEPENDS_ON when one sibling must wait for another. Choose PARENT_CHILD when a child should belong under a parent for parent-aware fan-in. Both types can appear in the same batch when you need ordering and membership together.| Need | Relation type | Source and target |
|---|---|---|
| Sibling prerequisite ordering | DEPENDS_ON | Source waits for target |
| Child membership under a parent | PARENT_CHILD | Source is the child of target |
Minimal relations fragment: