Skip to content

feat: mark progress with events (not prints)#240

Open
awadell1 wants to merge 11 commits into
mainfrom
events
Open

feat: mark progress with events (not prints)#240
awadell1 wants to merge 11 commits into
mainfrom
events

Conversation

@awadell1
Copy link
Copy Markdown
Collaborator

@awadell1 awadell1 commented May 6, 2026

Excises print statements from agents and tools and replaces them with LangGraph events.
This gives the following wins:

  1. Customized Display: the CLI/dashboard can now customize how progress is surfaced to the user
  2. Observability: events can be logged to disk (and / or displayed) making it way easier to track what URSA did

The downsides:

  • Events aren't printed by default (so nothing is surfaced, this mainly effects the python interface)

  • Callback code can get rather entangled with the rest of the Agent code (see src/cli/callbacks.py)

  • feat: add reusable agent event tagging

  • feat: emit progress events from agents

  • feat: emit progress events from tools

  • feat: render hitl tool progress callbacks

@mikegros
Copy link
Copy Markdown
Collaborator

mikegros commented May 7, 2026

I saw that you made some updates, is this ready for review and did some of those changes reduce those downsides?

@awadell1
Copy link
Copy Markdown
Collaborator Author

awadell1 commented May 7, 2026

Partially, ursa-dashboard now has uses the HITL callbacks and plan_execute_from_yaml does retain graphics for it's progress.

There's a default callback handler in, but it hasn't been fully patched into the examples

@mikegros
Copy link
Copy Markdown
Collaborator

A couple things:

I think this is ready to merge, but I wanted to bring up a couple things I noticed:

  • There still seems to be some console.print-ing happening (at least in the write code tool) that seems to duplication some prints with the events:
ursa> execute make a png with a plot of the first 2100 prime number spacings
✏️ Writing file: prime_spacings.py
Writing file: prime_spacings.py
 ✔  File written: /path/to/workspace/prime_spacings.py
✅ File written: prime_spacings.py
  • I saw some 404 errors in the web server logs for the dashboard, so am a bit worried something was being dropped/missed:
INFO:     127.0.0.1:51037 - "GET /runs/01KPXPY5M6X9RD82C871T5JWFG/events?after_seq=0&limit=5000 HTTP/1.1" 404 Not Found
INFO:     127.0.0.1:50967 - "GET /sessions/01KPXPST4Q9NTC22Q8375KCAQN/workspace HTTP/1.1" 200 OK
INFO:     127.0.0.1:51144 - "GET /runs/01KRN71S2P3XG2WY0NMBCCY6TC/events?after_seq=0&limit=5000 HTTP/1.1" 200 OK
INFO:     127.0.0.1:51037 - "GET /sessions/01KPXPST4Q9NTC22Q8375KCAQN HTTP/1.1" 200 OK
INFO:     127.0.0.1:51144 - "GET /runs/01KPXPY5M6X9RD82C871T5JWFG/events?after_seq=0&limit=5000 HTTP/1.1" 404 Not Found
INFO:     127.0.0.1:51037 - "GET /sessions/01KPXPST4Q9NTC22Q8375KCAQN/workspace HTTP/1.1" 200 OK
INFO:     127.0.0.1:51144 - "GET /runs/01KRN71S2P3XG2WY0NMBCCY6TC/events?after_seq=0&limit=5000 HTTP/1.1" 200 OK

I dont think this needs to hold things up much but thought I'd touch base with you first.

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