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:

{
  "requestId": "release-story-set",
  "type": "FACTORY_REQUEST_BATCH",
  "works": [
    {
      "name": "story-auth",
      "workTypeName": "story",
      "payload": { "title": "Harden auth session handling" }
    }
  ]
}

Submit that document to a factory that is already running:

you submit batch ./batch.json

Validate the batch without creating work:

you submit batch --dry-run ./batch.json
Reuse a stable non-empty requestId with the same body when you retry. That makes the batch upsert idempotent instead of creating duplicate 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.
NeedRelation typeSource and target
Sibling prerequisite orderingDEPENDS_ONSource waits for target
Child membership under a parentPARENT_CHILDSource is the child of target
Read DEPENDS_ON as: the source waits for the target. Read PARENT_CHILD as: the source is a child of the target. requiredState applies only to DEPENDS_ON and names the state the target must reach; it defaults to complete when omitted.

Minimal relations fragment:

{
  "relations": [
    {
      "type": "DEPENDS_ON",
      "sourceWorkName": "publish",
      "targetWorkName": "review",
      "requiredState": "complete"
    },
    {
      "type": "PARENT_CHILD",
      "sourceWorkName": "story-auth",
      "targetWorkName": "story-set"
    }
  ]
}

Limits And Assumptions

Submitting work covers batches and relationships only. It is not a full CLI flag dump, not a sync of packaged you docs, not the configuration topology page, and not the OpenAPI or API reference. Install scripts, first-run walkthroughs, and the broader command matrix belong on sibling documentation and guide pages.

Tags