Skip to content

(feat-redraw)Integrate recruiter into the backend topology and SSE ecosystem#659

Merged
delthazor merged 4 commits into
rework-dynamic-graph-drawing3from
rework-dynamic-graph-drawing4
Jul 2, 2026
Merged

(feat-redraw)Integrate recruiter into the backend topology and SSE ecosystem#659
delthazor merged 4 commits into
rework-dynamic-graph-drawing3from
rework-dynamic-graph-drawing4

Conversation

@delthazor

@delthazor delthazor commented Jun 23, 2026

Copy link
Copy Markdown
Contributor

Description

Recruiter as a pattern currently uses the recruiter agent purely from the UI side, and the discovered agents are added through an UI overlay which is not compatible with the backend-driven topology based dynamic graph rendering.
The proper way to do it is that the recruiter agent should add the discovered agent to the backend-stored topology (corresponding to the current workflow), and then SSE events should notify the UI that a new node needs to be rendered.

Topology graphs should be rendered dynamically based on backend provided data. This was partially done before, but was mostly reverted, due to stylistic and structural reasons, e.g.: specific icons were not rendered correctly, nodes not appearing as they should, etc.

This change aims to correct the recruiter pattern/workflow discrepancies by integrating the discovered agents into the existing ecosystem, so the automatic topology rendering can take care of the node representation correctly.

This PR is not a standalone change, it is a part of a chain of smaller changes reviewed independently.

The previous PR, this one immediately depends on:
#658

The dynamic graph rendering change, that this PR logically depends on:
#657

The follow-up PR is here:
#661

Other corresponding PRs:
#656
#663

Issue Link

No specific issue was opened for the change.

Type of Change

  • Bugfix
  • New Feature
  • Breaking Change
  • Refactor
  • Documentation
  • Other (please describe)

Checklist

  • I have read the contributing guidelines
  • Existing issues have been referenced (where applicable)
  • I have verified this change is not present in other open pull requests
  • Functionality is documented
  • All code style checks pass
  • New code contribution is covered by automated tests
  • All new and existing tests pass

delthazor and others added 3 commits June 23, 2026 09:48
…pology

recruit_agents emits a STATE_PROGRESS_UPDATE that creates one node per
discovered agent (carrying the OASF record and CID inline) plus an anchor
node sharing the seeded "Agentic Recruiter" label, so the frontend collapses
it onto the real node and re-points the discovered-agent edges there.

The recruiter-service A2A hop drops the topology middleware so only the
seeded recruiter and the discovered agents appear; the delegation middleware
moves to dynamic_workflow_agent (its only remaining user).

Co-authored-by: Cursor <cursoragent@cursor.com>
Signed-off-by: pdobrei <pdobrei@cisco.com>
… renderer

Discovered agents now arrive through the normal workflow-instance topology
channel instead of a frontend overlay, so they anchor to the seeded
"Agentic Recruiter" node, render with full OASF/directory parity, and are
disposed of when the instance is torn down.

The recruiter stream sends workflow_instance_id; the dynamic renderer maps
inline oasf_record/agent_cid onto node data (OASF modal, directory link,
target handle). Removes the discovery overlay (useMainAreaDiscoveryGraph,
mergeDiscovery*, discoveryResponseEvent wiring), which mispositioned nodes,
used a fragile recruiter-label match, and prevented disposal.

Co-authored-by: Cursor <cursoragent@cursor.com>
Signed-off-by: pdobrei <pdobrei@cisco.com>
…ance-id validator

- extract _forward_status_update so recruit_agents and evaluate_agent share one
  intermediate A2A status-forwarding path instead of duplicating it
- validate workflow instance ids via the public InstanceId schema model instead
  of importing the private _INSTANCE_ID_REGEX (recruiter_client + middleware)
- add merge round-trip tests locking the inline oasf_record/agent_cid extras
  through create and partial-update so discovered-agent data is never dropped

Co-authored-by: Cursor <cursoragent@cursor.com>
Signed-off-by: pdobrei <pdobrei@cisco.com>
@delthazor delthazor self-assigned this Jun 23, 2026
@delthazor delthazor added bug Something isn't working enhancement New feature or request labels Jun 23, 2026
Resolve discovered-agent anchoring authoritatively in the store's serial
merge worker instead of relying on frontend dedup. A new
reconcile_event_node_identities transform collapses an incoming create-node
whose stable_agent_id matches an existing node, drops the duplicate, and
repoints edge endpoints to the existing runtime id. The recruiter anchor now
carries the seeded recruiter's stable_agent_id so the graph stays a single
continuous entity, and the normalized event is what gets dispatched over SSE.

Co-authored-by: Cursor <cursoragent@cursor.com>
Signed-off-by: pdobrei <pdobrei@cisco.com>

@pregnor pregnor left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, get @misi-bp 's approval on the FE parts and make sure to manually test it when assembled.

@misi-bp misi-bp left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@delthazor delthazor merged commit a9e06e6 into rework-dynamic-graph-drawing3 Jul 2, 2026
23 checks passed
@delthazor delthazor deleted the rework-dynamic-graph-drawing4 branch July 2, 2026 07:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working enhancement New feature or request

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants