Skip to content

feat: Add ROI Reporting Agent to treasure-boxes#430

Merged
toru-takahashi merged 2 commits into
treasure-data:masterfrom
ko47kmr:add-roi-reporting-agent
Apr 1, 2026
Merged

feat: Add ROI Reporting Agent to treasure-boxes#430
toru-takahashi merged 2 commits into
treasure-data:masterfrom
ko47kmr:add-roi-reporting-agent

Conversation

@ko47kmr

@ko47kmr ko47kmr commented Mar 27, 2026

Copy link
Copy Markdown
Contributor

Overview

This PR adds a comprehensive ROI reporting solution to treasure-boxes by integrating the ROI Reporting Agent into the existing roi_reporting directory structure.

What's Added

1. ROI Reporting Agent (engage-box/roi_reporting/agent/)

An AI-powered agent that generates interactive ROI dashboards and reports:

  • Overall Summary Report: KPIs, trends, top performers across campaigns/journeys
  • Campaign Detail Report: Deep-dive analysis with revenue attribution

2. Main README (engage-box/roi_reporting/README.md)

  • Solution overview with architecture diagram
  • Links to agent and workflow documentation
  • Getting started guide
  • Troubleshooting section

3. Form Interfaces

  • td_managed_overall_summary.yml - Overall Summary report form
  • td_managed_campaign_details.yml - Campaign Details report form
  • Ready for use when Form Interface API becomes available

4. Documentation

All documentation in English and Japanese:

  • System prompts (system_prompt.md, system_prompt_JA.md)
  • Knowledge bases for report specs (overall summary, campaign details)
  • README files with setup and usage instructions
  • Tool configurations (tools.yml)

Features

✅ Multilingual support (English/Japanese)
✅ Multi-currency support (USD/JPY)
✅ Autonomous SQL generation and execution
✅ Interactive Plotly visualizations
✅ Revenue attribution analysis (direct/contributed)
✅ Graceful degradation when components fail
✅ Progressive disclosure with intermediate visualizations

Structure

engage-box/roi_reporting/
├── README.md                    # ✨ NEW: Solution overview
├── agent/                       # ✨ NEW: AI Reporting Agent
│   ├── README.md
│   ├── README_JA.md
│   ├── system_prompt.md
│   ├── system_prompt_JA.md
│   ├── knowledge_base_overall_summary.md
│   ├── knowledge_base_overall_summary_JA.md
│   ├── knowledge_base_campaign_details.md
│   ├── knowledge_base_campaign_details_JA.md
│   ├── tools.yml
│   └── forms/
│       ├── td_managed_overall_summary.yml
│       └── td_managed_campaign_details.yml
└── workflows/                   # EXISTING: Data preparation workflows
    └── reporting_agent/
        └── README.md            # UPDATED: Added link to agent

Integration

  • Data Flow: Workflows prepare data → Agent generates reports
  • Unified Documentation: Main README provides complete solution overview
  • Cross-linking: Workflow README links to agent, agent README links to workflow

Testing

  • ✅ All files follow email-delivery-reporter pattern
  • ✅ English and Japanese documentation
  • ✅ YAML syntax validated for form interfaces
  • ✅ Knowledge bases follow spec format
  • ✅ System prompts compatible with Claude 4.5 Sonnet

Related

This follows the same pattern as the email-delivery-reporter agent (#XYZ), providing a consistent experience for users.

Next Steps

Once merged, users can:

  1. Run data preparation workflows
  2. Deploy agent to AI Agent Foundry
  3. Generate ROI reports via agent interface
  4. (Future) Use Form Interfaces when API becomes available

🤖 Generated with Claude Code

Add comprehensive ROI reporting solution with AI agent and workflows.

## Summary
- Integrated ROI Reporting Agent into existing roi_reporting directory
- Added agent configuration files (system prompts, knowledge bases, tools)
- Added form interfaces for Overall Summary and Campaign Details reports
- Added main README to provide overview of complete solution
- Updated workflow README to link to agent

## Features
- Overall Summary Report: KPIs, trends, top performers
- Campaign Detail Report: Deep-dive analysis with revenue attribution
- Multilingual support (English/Japanese)
- Multi-currency support (USD/JPY)
- Autonomous SQL generation and execution
- Interactive Plotly visualizations

## Structure
roi_reporting/
├── README.md                    # Solution overview
├── agent/                       # AI Reporting Agent (new)
│   ├── README.md
│   ├── system_prompt.md
│   ├── knowledge_base_*.md
│   ├── tools.yml
│   └── forms/
└── workflows/                   # Data preparation (existing)
    └── reporting_agent/

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
@ko47kmr ko47kmr requested a review from a team as a code owner March 27, 2026 07:45
…bility

- Rename forms/ to form_interfaces/ directory
- Convert form_schema (YAML) to form_json_schema (JSON string)
- Convert ui_schema (YAML) to form_ui_schema (JSON string)
- Add agent.yml and tdx.json for tdx push support
- Update tools.yml with actual database name

These changes align with the form interface format expected by
tdx PR #2139 (form-interface-support branch).

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
@toru-takahashi toru-takahashi merged commit e619f81 into treasure-data:master Apr 1, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants