Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Email thread intelligence layer on top of gws Gmail output #497

Sammy-spk started this conversation in Ideas
Discussion options

The Gmail skills in gws are great for access, listing messages, reading threads, sending mail. For single messages and simple lookups, the JSON output is exactly what agents need.

Where it gets tricky is when an agent needs to reason over email threads rather than just read them. A few specific problems I keep running into when building agents on top of Gmail data:

Quoted text duplication. In a 20-reply thread, every message includes the full quoted history below it. The raw output from gws gmail users messages listgws gmail users messages get contains 20 copies of the first message, 19 of the second, etc. A thread with ~11K tokens of unique content produces ~47K tokens of raw JSON. That's most of your agent's context window spent on duplicated text.

Thread reconstruction. gws gmail users threads get returns messages in a thread, but forwarded chains collapse multiple earlier conversations into a single message body with no structural separation. An agent pulling decisions from the thread can surface an approval from the forwarded section and treat it as the current decision.

Participant role detection. The raw To/From/CC fields are there, but distinguishing who actually made decisions vs. who was just CC'd requires understanding reply patterns, not just header parsing.

I'm curious whether this is something the gws team has considered as a higher-level skill — something like gws-gmail-intelligence that does thread deduplication and structured extraction before the data hits the agent. Or whether the philosophy is to keep gws at the raw access layer and let external tools handle the processing.

We built iGPT to handle this layer, thread reconstruction, deduplication, participant detection, structured extraction so agents get reasoning-ready context instead of raw MIME. It pairs well with gws: gws handles access, iGPT handles understanding. Would be interested in building a gws-email-intelligence skill that connects the two if there's appetite for it.

Would love to hear from the maintainers and anyone building agents on top of gws Gmail output.

You must be logged in to vote

Replies: 0 comments

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Ideas
Labels
None yet
1 participant

AltStyle によって変換されたページ (->オリジナル) /