Proposal: Email Intelligence toolkit (contextual analysis on top of Gmail) #2820
Rachamim Kennard (Sammy-spk)
started this conversation in
Tool/Toolkit Request
Replies: 1 comment
|
This solves a real pain point. Email is one of those domains where the raw source looks easy to feed into an LLM until quoting, headers, signatures, and duplicated context make the output noisy and unreliable. The toolkit shape you described feels like the right level of abstraction. If I were evaluating this for adoption, I would want one concrete example showing it side by side with existing Gmail tooling inside an agent workflow. That would make the complementarity obvious and help people see where it fits instead of reading it as a separate competing tool. |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
We've been building iGPT, an email intelligence API, and we'd like to propose adding it as a Composio toolkit. Wanted to share the thinking here before submitting formally, and get feedback from the community and the Composio team on whether this makes sense and what the best integration path would be.
The problem we keep seeing
The Gmail toolkit gives agents solid email access: fetch messages, list threads, send replies, manage labels. What it doesn't do is help agents actually understand what's in those threads once they get them.
A typical pattern looks like this: agent fetches a 15-message email thread using GMAIL_FETCH_MESSAGE_BY_THREAD_ID, gets back the raw content, and then the LLM has to figure out who said what across a bunch of quoted text blocks, nested replies, forwarded fragments, and CC chains. The results are unpredictable. The model confidently attributes statements to the wrong person, misses commitments buried in reply #9, hallucinates action items that were never discussed, and can't tell you how a decision evolved from message 3 to message 12. We've seen this across LangChain agents, CrewAI crews, and OpenAI function-calling setups, the failure mode is consistent regardless of framework.
The core issue is that raw email content is structurally hostile to LLMs. Quoted text gets duplicated across every reply. Participants are buried in headers. There's no way to distinguish who committed to something versus who was just CC'd. Signature blocks, disclaimers, and auto-generated footers consume tokens without adding signal. Thread reconstruction across fragmented replies requires understanding MIME structure, In-Reply-To headers, and conversation threading logic that the Gmail API doesn't expose in a clean way.
What iGPT does
iGPT sits between raw email access and the LLM. It handles thread reconstruction, participant detection, quoted text deduplication, and structured extraction, then returns reasoning-ready JSON instead of raw email text. A single API call to /recall/ask with a natural language query returns structured output with participants, decisions, action items, sentiment, and source citations.
For example, instead of the agent receiving 12,000 tokens of raw MIME content and trying to parse it, it gets back something like:
The API also supports freeform search (/recall/search with date filters and result limits), datasource management, and streaming responses.
How it would work as a Composio toolkit
We're thinking the toolkit would expose these tools:
Auth is straightforward: API key as Bearer token. No OAuth flow needed from Composio's side since iGPT handles user-level email auth separately.
The mental model for developers would be: use Composio's Gmail toolkit for email operations (send, label, draft), use iGPT's toolkit for email understanding (who said what, what was decided, what needs to happen next). Connectivity and intelligence as two complementary layers.
What we're offering
Our engineering team will build and maintain the integration. We have Python and JS SDKs already published (pip install igptai / npm install igptai), full API docs at docs.igpt.ai, and a playground for testing at igpt.ai/hub/playground.
We'd appreciate guidance from the Composio team on:
Is the custom tools path the right approach, or is there a better route for a third-party API toolkit?
Any specific requirements for toolkit submissions we should be aware of?
Would it be useful to build a cookbook example showing Gmail toolkit + iGPT working together first?
Happy to jump on a call or answer any technical questions here. You can also reach us at hello@igpt.ai.
Links:
All reactions