Skip to content

feat(augment): auto-create chatAgents entry on Kagenti agent deploy#3206

Merged
pkliczewski merged 2 commits into
redhat-developer:mainfrom
rrbanda:pr/auto-chatagents-on-deploy
May 21, 2026
Merged

feat(augment): auto-create chatAgents entry on Kagenti agent deploy#3206
pkliczewski merged 2 commits into
redhat-developer:mainfrom
rrbanda:pr/auto-chatagents-on-deploy

Conversation

@rrbanda
Copy link
Copy Markdown
Contributor

@rrbanda rrbanda commented May 21, 2026

Summary

  • When a Kagenti agent is created via POST /kagenti/agents, the handler now auto-creates a chatAgents config entry with lifecycleStage: "draft" and createdBy set to the current user
  • When a Kagenti agent is deleted via DELETE /kagenti/agents/:ns/:name, the handler also cleans up the corresponding chatAgents config entry
  • Adds createdBy field to ChatAgentConfig type in augment-common

This bridges the gap between Kagenti infrastructure deployment and the lifecycle governance system, unblocking the "submit for review" flow for newly deployed agents.

Part of the Agent Lifecycle Governance Epic.

Test plan

  • Create a new agent via the Kagenti wizard
  • Verify the agent appears in the lifecycle stepper with "draft" stage
  • Click "Submit for Review" and verify the lifecycle transitions to "review"
  • Delete the agent from Kagenti and verify the chatAgents entry is also removed

When a Kagenti agent is successfully created via POST /kagenti/agents,
the handler now auto-creates a corresponding chatAgents config entry
with lifecycle stage "draft". This bridges the gap between Kagenti
infrastructure deployment and the lifecycle governance system, enabling
newly created agents to immediately appear in the lifecycle stepper and
support submit-for-review flow.

Changes:
- Add adminConfig and getUserRef to KagentiRouteRegistrarContext
- POST /kagenti/agents now auto-creates chatAgents entry with
  createdBy field on successful deploy
- DELETE /kagenti/agents/:ns/:name now cleans up chatAgents entry
- Add createdBy field to ChatAgentConfig type (augment-common)
@rrbanda rrbanda requested review from a team and pkliczewski as code owners May 21, 2026 14:42
@rhdh-gh-app
Copy link
Copy Markdown

rhdh-gh-app Bot commented May 21, 2026

Missing Changesets

The following package(s) are changed by this PR but do not have a changeset:

  • @red-hat-developer-hub/backstage-plugin-augment-backend
  • @red-hat-developer-hub/backstage-plugin-augment-common

See CONTRIBUTING.md for more information about how to add changesets.

Changed Packages

Package Name Package Path Changeset Bump Current Version
@red-hat-developer-hub/backstage-plugin-augment-backend workspaces/augment/plugins/augment-backend none v0.1.0
@red-hat-developer-hub/backstage-plugin-augment-common workspaces/augment/plugins/augment-common none v0.1.0

@rrbanda rrbanda mentioned this pull request May 21, 2026
9 tasks
@sonarqubecloud
Copy link
Copy Markdown

@codecov
Copy link
Copy Markdown

codecov Bot commented May 21, 2026

Codecov Report

❌ Patch coverage is 12.90323% with 27 lines in your changes missing coverage. Please review.
✅ Project coverage is 53.40%. Comparing base (7d93262) to head (7f7e3b4).
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3206      +/-   ##
==========================================
- Coverage   53.41%   53.40%   -0.02%     
==========================================
  Files        2373     2373              
  Lines       84895    84924      +29     
  Branches    23568    23581      +13     
==========================================
+ Hits        45349    45352       +3     
+ Misses      39200    38023    -1177     
- Partials      346     1549    +1203     
Flag Coverage Δ *Carryforward flag
adoption-insights 83.58% <ø> (ø) Carriedforward from 7d93262
ai-integrations 70.03% <ø> (ø) Carriedforward from 7d93262
app-defaults 69.60% <ø> (ø) Carriedforward from 7d93262
augment 46.65% <12.90%> (-0.03%) ⬇️
bulk-import 72.86% <ø> (ø) Carriedforward from 7d93262
cost-management 16.49% <ø> (ø) Carriedforward from 7d93262
dcm 32.85% <ø> (ø) Carriedforward from 7d93262
extensions 61.79% <ø> (ø) Carriedforward from 7d93262
global-floating-action-button 74.30% <ø> (ø) Carriedforward from 7d93262
global-header 61.68% <ø> (ø) Carriedforward from 7d93262
homepage 50.92% <ø> (ø) Carriedforward from 7d93262
konflux 91.01% <ø> (ø) Carriedforward from 7d93262
lightspeed 68.33% <ø> (ø) Carriedforward from 7d93262
mcp-integrations 81.59% <ø> (ø) Carriedforward from 7d93262
orchestrator 36.36% <ø> (ø) Carriedforward from 7d93262
quickstart 62.88% <ø> (ø) Carriedforward from 7d93262
sandbox 79.49% <ø> (ø) Carriedforward from 7d93262
scorecard 83.84% <ø> (ø) Carriedforward from 7d93262
theme 64.54% <ø> (ø) Carriedforward from 7d93262
translations 8.49% <ø> (ø) Carriedforward from 7d93262
x2a 78.59% <ø> (ø) Carriedforward from 7d93262

*This pull request uses carry forward flags. Click here to find out more.


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 7d93262...7f7e3b4. Read the comment docs.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@pkliczewski pkliczewski merged commit c660aca into redhat-developer:main May 21, 2026
62 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants