Skip to content

Agent Roles

The Librarian (Ingestion Agent)

Responsibility: Parse ERP documentation and code into vector embeddings. Maintain the “System Analysis” schema.

Tools:

  • LangChain for document chunking
  • Pinecone/Weaviate for vector storage
  • AST parsers for PHP/JavaScript code
  • EspoCRM Metadata API

Outputs:

  • Updated vector database
  • system-analysis.json file
  • Entity relationship graph

The Analyst (Discovery Agent)

Responsibility: Semantic search against the Knowledge Base. Compares requirements vs. system capabilities.

Tools:

  • GPT-4o / Claude 3.5 Sonnet (strong reasoning)
  • RAG queries
  • Gap detection algorithms

Inputs:

  • Client interviews / RFP documents
  • Existing system analysis

Outputs:

  • Gap Analysis Report with categories:
  • Native Fit – fully supported (e.g., “Use Sales module”)
  • Configuration – supported via settings (e.g., “Change workflow X”)
  • Development Gap – requires new code

The Architect (Spec Writer Agent)

Responsibility: Key role. Does not write code. Produces precise YAML/JSON definitions.

Tools:

  • Specialized system prompts
  • JSON Schema validation
  • Gherkin parser

Constraints:

  • Must not generate implementation code
  • Must produce structured specification
  • Every specification must be validatable

Outputs:

  • spec.yaml – data structures and logic
  • stories.feature – Gherkin acceptance criteria
  • ui-layout.json – UI definitions

The Builder (Implementation Agent)

Responsibility: Translate YAML specs into API calls or code.

Tools:

  • Python / PHP
  • EspoCRM REST API
  • EspoCRM CLI
  • Module generator

Inputs:

  • spec.yaml (Data & Logic sections)
  • Running ERP instance

Actions:

# Create new entity
php command.php create-entity --name=CustomEntity --type=Base

# Add field
php command.php add-field --entity=Account --name=customField --type=varchar

# Install workflow
php command.php import-workflow --file=workflow.json

Outputs:

  • New/modified entities
  • Workflow hooks
  • UI layouts

The QA Bot (Validation Agent)

Responsibility: Translate Gherkin stories into headless browser scripts.

Tools:

  • Playwright / Puppeteer
  • EspoCRM API client
  • Screenshot comparison

Inputs:

  • stories.feature (from Stage 2)
  • URL of running instance

Actions:

Feature: Custom Logistics Field
  Scenario: Driver assignment on delivery
    Given I am logged in as "admin"
    And I navigate to "Stock/Picking/create"
    When I fill "x_driver_id" with "John Doe"
    And I click "Save"
    Then I should see "John Doe" in field "x_driver_id"
    And the record should be saved successfully

Outputs:

  • Test report (pass/fail)
  • Video recordings of workflows
  • Error screenshots

➡️ Continue to Communication.