Skip to content

Agents API in-repo module: create core-style agents-api boundary #1631

@chubes4

Description

@chubes4

Refs #1561, #1596, #1618.

Problem

Data Machine now contains Agents API-shaped vocabulary and contracts, but they are scattered across Data Machine product directories instead of living behind a core-style in-repo module boundary.

Current examples include:

  • inc/Engine/Agents/register-agents.php
  • inc/Engine/Agents/class-wp-agent.php
  • inc/Engine/Agents/class-wp-agents-registry.php
  • inc/Engine/AI/AgentConversationRequest.php
  • inc/Engine/AI/AgentMessageEnvelope.php
  • inc/Core/FilesRepository/AgentMemoryStoreInterface.php
  • inc/Core/Database/Chat/ConversationTranscriptStoreInterface.php

The desired architecture is an in-repo agents-api module that is treated like WordPress core substrate while it still ships inside Data Machine.

Target shape

Create a Data Machine-owned in-repo module:

data-machine/
  agents-api/
    agents-api.php
    inc/
    tests/
  inc/
    ...Data Machine product code...

Data Machine loads agents-api first, then consumes it as product code.

Boundary rules

  • agents-api must not import Data Machine product namespaces.
  • Data Machine may import agents-api.
  • agents-api owns WordPress-shaped public vocabulary such as wp_register_agent(), WP_Agent, WP_Agents_Registry, wp_agents_api_init, AgentMessageEnvelope, and runtime contracts.
  • Data Machine keeps flows, pipelines, jobs, handlers, queues, retention, admin UI, pending actions, adjacent handler tools, and product adapters.

Acceptance criteria

  • data-machine/agents-api exists.
  • Data Machine loads the module before product runtime bootstraps.
  • agents-api can run a bootstrap smoke without loading Data Machine product code.
  • No agents-api file imports DataMachine\Core\Steps, DataMachine\Core\Database\Jobs, handlers, queues, retention, or admin UI.
  • Existing Data Machine behavior remains unchanged.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions