AIMLFW LLM agent

AIMLFW LLM agent

 

1) Purpose

Conduct a PoC to validate the efficiency of AI model registration and training processes using generative AI technology such as GEMINI, and other LLM models.

2) Package Layout & File Roles

trainingmgr/ ├─ controller/ │ └─ agent_controller.py ├─ service/ │ └─ agent_service.py ├─ schemas/ │ └─ agent.py ├─ common/ │ └─ agent_logger.py └─ trainingmgr_main.py
  • controller/agent_controller.py

    • GET /experiment/agent/modelInfo: returns model metadata snapshot.

    • POST /experiment/agent/generate-content: validates body (text, dry_run) and returns normalized response.

  • service/agent_service.py

    • Available for domain orchestration.

  • schemas/agent.py

    • Available for central request/response schema definitions.

  • common/agent_logger.py

    • Provides a structured stdout logger.

  • trainingmgr_main.py

    • Registers the Blueprint with url_prefix="/agent".

 

3) Processing Flow

image-20250915-142006.png

 

4) Public API

GET 

/experiment/agent/modelInfo

  • Role: Return a snapshot of LLM model metadata for transparency/diagnostics.

  • Success 200 (example):

{ "llm": { "model": "" } }

 

POST 

/experiment/agent/generate-content

  • Role: Receive a natural-language input and return a normalized envelope.

  • Headers: Content-Type: application/json

  • Body (JSON):

    • text (string, required) — user prompt

    • dry_run (boolean, optional, default: true)

  • Success 200 (example):

{ "action": "noop", "request": { "text": "...", "dry_run": true }, "response": { "note": "Received successfully" }, "status": "ok", "error_message": null }
  • Failure 400 (example):

{ "title": "Bad Request", "status": 400, "detail": "The 'text' field is required and must be a non-empty string." }

 

Comments