工厂

已发布的工厂页说明已打包的工厂面及其配置与运行方式。

什么是工厂

工厂是 you-agent-factory 运行的工作流拓扑。它声明工作类型、工作器、工作站以及可选资源,使长时间运行的智能体工作保持持久与协调,而不是在每次对话后重置。本系列帮助你了解 factory.json 拓扑、命名与全局操作员默认值如何交互、打包工厂如何被发现与刷新、动态工作流 API 如何与工厂配置相关,以及 Factory Session 如何标识正在运行的工厂。

工厂根定义

实时的 Factory 模式根列出 factory.json 可声明的拓扑字段。本索引只显示该根摘要。需要穷尽字段或操作查阅时,请打开完整的 Factory 模式与 API 参考。

You Factory configuration

object

Top-level factory.json contract. Declare the work types, resources, portability resources, workers, and workstations that make up one authored factory here. Guarded loop breakers should be authored as guarded LOGICAL_MOVE workstations using VISIT_COUNT guards instead of a top-level exhaustion-rules field.

  • additionalPropertiesfalse (closed)

Fields

  • descriptiondescriptionOptionalNameValue

    Optional localized customer-facing explanation of this Factory.

  • examplesexamplesOptionalFactoryInvocationExample[]

    Ordered runnable invocation examples. Canonical Factory documents write examples here; legacy invocationSignature.examples are accepted only by the Factory input compatibility mapper.

  • factoryDirectoryfactoryDirectoryOptionalstring

    Directory that contained the factory.json used for this serialized runtime config.

  • guardsguardsOptionalFactoryGuard[]

    Root-level guards that apply across the factory instead of one specific workstation or input.

  • ididOptionalstring

    Factory identifier used as the factory-level template context fallback.

  • inputTypesinputTypesOptionalInputType[]

    Named input kinds accepted by the factory. The default input type is implicit and must not be declared.

  • invocationReturninvocationReturnOptionalInvocationReturn

    Optional factory-authored invocation primary-result policy shared by CLI and API entrypoints. When omitted, runtimes use the SUBMITTED_WORK_TERMINAL fallback and return the first terminal content for the work item originally submitted by the invocation.

  • invocationSignatureinvocationSignatureOptionalFactoryInvocationSignature

    Optional canonical callable argument contract shared by CLI, API, dashboard, docs, and packaged factories. When omitted, callers use the factory's compatibility invocation behavior.

  • layoutlayoutOptionalFactoryLayout

    Optional non-executable graph editor layout metadata keyed by canonical graph node and edge ids.

  • metadatametadataOptionalStringMap

    Free-form factory-level metadata carried through runtime serialization and replay diagnostics.

  • namenameRequiredFactoryName
  • orchestratororchestratorOptionalFactoryOrchestrator

    Authored orchestrator identity for this factory. When omitted, existing Petri factories load through compatibility defaulting to orchestrator.kind = PETRI.

  • resourcesresourcesOptionalResource[]

    Shared capacity pools that workers or workstations can consume while work is executing.

  • runnerrunnerOptionalRunnerID

    Default runner selection for the factory when a workstation does not declare its own runner override.

  • sourceDirectorysourceDirectoryOptionalstring

    Original source directory for record/replay and drift diagnostics.

  • supportingFilessupportingFilesOptionalResourceManifest

    Optional portability manifest for validation-only external tools and portable bundled files. During v1 factory sharing, bundled INPUT files represent a share-time snapshot of the source factory's current inputs work so recipients restore detached starter-work copies that no longer sync back to the original factory. This contract is distinct from runtime-capacity resources.

  • versionversionOptionalHybridLogicalTimestamp

    Server-managed current-factory version metadata. Clients should echo this value on complete replacement saves when they want stale-write detection, but durable factory configuration does not treat it as customer-authored topology.

  • workTypesworkTypesOptionalWorkType[]

    Customer-authored work item categories and the lifecycle states each one can occupy.

  • workersworkersOptionalWorker[]

    Reusable worker definitions that workstations reference by name when dispatching work.

  • workstationsworkstationsOptionalWorkstation[]

    Processing steps that consume work, invoke workers, and emit the next work states.

完整 Factory 模式Factory API 参考

尚无工厂条目

已发布的工厂页加入后会出现在这里。在此之前可返回首页、打开浏览、搜索文档,或阅读博客。