Skip to content

Adapter: record CHAP human-decision events from AG2 (AutoGen) human input#7

Open
BrightbeamBogdanCastraveti wants to merge 1 commit into
mainfrom
adapter/ag2
Open

Adapter: record CHAP human-decision events from AG2 (AutoGen) human input#7
BrightbeamBogdanCastraveti wants to merge 1 commit into
mainfrom
adapter/ag2

Conversation

@BrightbeamBogdanCastraveti

Copy link
Copy Markdown
Collaborator

Closes #3.

Adapter mirroring chap-langgraph / the other two: at an AG2 human-input turn, the human's decision is recorded as a CHAP envelope.

approve   -> decide.approve
override  -> decide.override   (message vs reply, as a diff)
reject    -> decide.reject

Design, per your corrections on #3:

  • decision is explicit and authoritative. The only inference is empty reply → approve; any non-empty reply with no explicit decision records nothing"exit" is not a reject, and dialogue is not an edit.
  • intent_preserved defaults true on override, overridable; no-op edit → approve.
  • Hooked at get_human_input, where both the message (self.last_message()) and the reply are available — not the prompt string. Verified last_message() returns the message under review at that point.
  • ag2 is optional; the bridge reads the message/reply structurally, so it and its tests run without it.
  • 0.2.6-correct by construction: approver joined, review.request addressed to them.

Verified against main (0.2.6): pytest 14 passed; example runs a real AG2 conversation (no LLM) through approve / edit / reject, with exit recording nothing; conformance harness 23/23.

Adapter mirroring chap-langgraph: at an AG2 (AutoGen) human-input turn,
record the human's decision as a CHAP envelope.

  approve   -> decide.approve
  override  -> decide.override (message vs reply, as a diff)
  reject    -> decide.reject

- ag2 is an optional dependency; the message and reply are read
  structurally, so the bridge and tests run without it.
- decision is explicit and authoritative. The only inference is that an
  empty reply means approve; a non-empty reply with no explicit decision
  records nothing (exit is not a reject, dialogue is not an edit).
- hooked at get_human_input, where both the message (last_message()) and
  the reply are available.
- 0.2.6-correct by construction: approver joined, review.request
  addressed to that approver.

Closes #3.
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.

Adapter: record CHAP human-decision events from AG2 (AutoGen) human input

1 participant