GoogleCloudPlatform / GoogleCloudPlatform/generative-ai

[Bug]: Generated demo agents report unexecuted business actions as completed

Open
#3,047 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Jupyter Notebook
Stars
17.7k
Forks
4.5k
Avg merge
12h 38m
Merged PRs (30d)
42

Description

### File Name

search/gemini-enterprise/ge-demo-generator/agent_template/adk_agent/app/

### What happened?

I reproduced a grounding/action-integrity issue in agents generated by the Gemini Enterprise Demo Generator.

The generated agent can report business side effects as successfully completed even when the underlying tool execution did not perform those actions.

I reproduced this during an automated inventory replenishment workflow.

I asked the generated agent to:

- scan district inventory,
- auto-approve orders within USD 5,000 and 10% variance,
- flag critical threshold breaches,
- and send a summary report.

The scheduled/background task executed successfully. However, when I inspected the actual execution, the worker used read/query and reporting operations such as:

- execute_sql_readonly
- get_table_info
- write_operational_alert
- save_document_to_db

There was no tool execution that approved purchase orders or dispatched orders to SAP ERP.

The SQL operation related to auto-approved orders was a read-only query against records that were already marked AUTO_APPROVED. It counted 68 existing AUTO_APPROVED orders with a total value of USD 57,175.50.

Despite this, the generated agent reported that the standard purchase orders had been auto-approved and dispatched to SAP ERP.

I observed the same class of issue in generated autonomous artifacts.

For example, generated reports/decks stated that delivery discrepancies had been:

- CLOSED & RESOLVED,
- APPROVED BY DM,
- successfully processed,
- recovered through vendor claims,
- or written back successfully,

while the authoritative Firestore state still showed the corresponding records as ESCALATED or PENDING.

Example authoritative state after execution:

ORD-8890: ESCALATED
ORD-8821: ESCALATED
ORD-8845: PENDING_DM_APPROVAL

No approval action had been executed for ORD-8845.

Expected behavior:

A generated agent should only state that a business action was completed when an authoritative write/action tool has actually executed successfully and returned evidence of that state change.

If the workflow only performs a read, simulation, recommendation, alert creation, or report generation, the agent should use language such as:

- recommended for approval,
- eligible for auto-approval,
- pending approval,
- proposed action,
- claim identified,
- claim logged,

instead of claiming that the external/business action was completed.

The final response and generated artifacts should remain consistent with the authoritative operational state after tool execution.

Why this matters:

This creates a significant action-integrity problem for enterprise demos. The underlying tools may execute correctly, but the natural-language response can imply that approvals, ERP dispatches, financial recoveries, or workflow state transitions occurred when they did not.

Because this behavior is produced by the generated agent/template, fixing a single deployed demo would not prevent the same issue from appearing in future demos generated from the same template.

I validated the discrepancy by comparing the generated responses and artifacts against the actual tool execution logs and Firestore state.

Reported and reproduced by:
Nilden Tutalar
Cloud Solution Architect - Cloud4Next
Contact: nilden.tutalar@cloud4next.com

### Relevant log output

```shell
Example scheduled task execution:

Requested workflow:
- scan district inventory
- auto-approve orders <= USD 5,000 and <= 10% variance
- flag critical threshold breaches
- send summary report

Actual executed tool set included:
execute_sql_readonly
get_table_info
write_operational_alert
save_document_to_db

No purchase-order approval tool or SAP ERP dispatch tool was executed.

Read-only query result:
approval_status = AUTO_APPROVED
existing orders found: 68
existing order value: USD 57,175.50

Generated response nevertheless reported:
- standard purchase orders were auto-approved
- orders were dispatched to SAP ERP

Authoritative operational state after execution:
ORD-8890 = ESCALATED
ORD-8821 = ESCALATED
ORD-8845 = PENDING_DM_APPROVAL

Generated artifacts also described these actions using completed-state language such as:
CLOSED & RESOLVED
APPROVED BY DM
Override executed
successful database write
vendor recovery completed

These completed-state claims did not match the authoritative post-execution state.
```

### Code of Conduct

- [x] I agree to follow this project's Code of Conduct

Contributor guide

Open the contributing guide

Research direction

Start in search/gemini-enterprise/ge-demo-generator/agent_template/adk_agent/app/ and trace how tool results become final responses and generated reports or decks. Compare claims against the executed tool set and authoritative Firestore state. Done means completed-state language is supported by a successful authoritative action and state-change evidence, while reads, recommendations, alerts, and proposals remain non-completed claims.

Written by the indexing model from the issue text.

Assessment

Tech stack
google-cloud, sql
Domain
ai, backend, databases
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.