The Cross-Module Context Engine: How Ostavio Connects Everything
When you open an email, you see CRM + Tasks + Meetings. When you open a task, you see Emails + Deals + Documents. One API call, under 500ms.
The Problem Every Tool Ignores
Open an email in Gmail. You see the message, the thread, and the sender's name. That is it. You do not see that the sender is your biggest client, that they have an overdue invoice, that you met with them last week, or that three tasks are waiting on their response.
Open a task in Linear. You see the title, description, assignee, and status. You do not see the email that triggered this task, the deal it is tied to, or the meeting where the team discussed the approach.
Open a contact in HubSpot. You see their info and maybe their email history. You do not see their open tasks, their upcoming meetings with you, or the documents they have shared.
Every tool shows you one slice. Your brain is expected to hold the rest. The cross-module context engine is the technology that eliminates this gap.
How the Context Panel Works
Every screen in Ostavio has a context panel on the right side. The panel is collapsible -- you can hide it for a focused view or expand it for full context. When expanded, it shows related data from every connected module, assembled in real time.
In the Mail module: Open an email from Sarah Chen. The context panel shows:
- CRM: Sarah is CTO at Meridian Corp. $180K deal in Negotiation stage. Renewal in 45 days. 3 previous deals, all renewed.
- Tasks: 2 open tasks related to Meridian -- "API rate limit proposal" (due tomorrow, assigned to you) and "Webhook reliability fix" (in progress, assigned to engineering).
- Meetings: Last meeting with Sarah was June 5. Key topics: API performance concerns, custom SLA request. Action items: send revised pricing (overdue).
- Timeline: 14 interactions in the last 30 days. Communication frequency is above average. Sentiment: positive but declining.
- AI Insight: "Sarah's email tone has shifted from enthusiastic to neutral over the last 3 weeks. Overdue pricing commitment may be causing friction. Recommend: address the pricing in your reply."
In the Tasks module: Open the "API rate limit proposal" task. The context panel shows:
- Origin: Created from meeting action item on June 5 -- Sarah requested revised pricing for higher API rate limits.
- Email context: 3 email threads with Sarah mentioning API rate limits. Most recent: Sarah asking for an update (2 days ago, no response).
- CRM: This task is tied to the Meridian deal. Deal value: $180K. Completing this task is likely critical to renewal.
- Meetings: The API topic was discussed in 2 meetings. Key data point from the June 5 meeting: Sarah needs 10K requests/minute minimum.
- AI Insight: "This task has been open for 15 days and is blocking a $180K renewal. Sarah has followed up once with no response. Priority should be elevated."
In the CRM module: Open Meridian Corp's company record. The context panel shows everything:
- All contacts at Meridian (Sarah Chen, Alex Rivera, Lisa Park)
- All active deals ($180K renewal, $25K expansion opportunity)
- All open tasks (4 tasks across 2 team members)
- All recent emails (12 threads in last 30 days)
- All meetings (3 in last 60 days)
- Relationship health score: 72/100 (declining from 85 due to overdue commitments)
- AI summary: "Meridian is a key account at renewal risk. Two overdue commitments and declining communication sentiment suggest immediate attention needed."
The Technical Architecture
The context engine is the core of Ostavio's architecture. Here is how it works under the hood.
One API Call, Three Data Sources
When the context panel renders, it makes a single API call to the context engine endpoint. That endpoint fans out to three data sources in parallel:
1. Postgres (structured data). CRM records, task details, email metadata, meeting records, and deal information live in Postgres. The query uses the current entity's identifiers (email address, contact ID, company ID) to find related records across all tables. Typical query time: 50-80ms.
2. Neo4j (knowledge graph). The knowledge graph stores relationships between entities that are too complex for relational queries. "Show me everything connected to Meridian Corp within 2 hops" returns contacts, deals, tasks, emails, and meetings -- plus second-degree connections like "Alex Rivera attended a conference with your CEO last month." Typical query time: 30-60ms.
3. Embedding index (semantic search). For content-level connections, the engine searches vector embeddings of email bodies, meeting transcripts, and task descriptions. This finds semantically related content even when there is no explicit link -- an email discussing "API performance" matches a task about "rate limiting" even though the keywords are different. Typical query time: 80-120ms.
All three queries run in parallel. The total context assembly time is the duration of the slowest query -- typically under 200ms. With result merging and ranking, the full context panel renders in under 500ms.
The Knowledge Graph Schema
The Neo4j knowledge graph uses 10 node types and 9 relationship types:
Node types:
- Person (contacts, team members)
- Company (organizations)
- Deal (sales opportunities)
- Task (work items)
- Email (messages and threads)
- Meeting (calendar events with notes)
- Document (files, attachments)
- Project (groups of related work)
- Tag (labels and categories)
- Insight (AI-generated observations)
Relationship types:
- WORKS_AT (Person -> Company)
- OWNS (Person -> Deal, Task, Project)
- RELATES_TO (any node -> any node, with a strength score)
- MENTIONED_IN (Person, Company -> Email, Meeting)
- CREATED_FROM (Task -> Email, Meeting)
- PART_OF (Task -> Project, Document -> Project)
- CONTACTED_VIA (Person -> Email, Meeting)
- TAGGED_WITH (any node -> Tag)
- GENERATED (AI analysis -> Insight)
When a new email arrives, the engine creates nodes and edges automatically. The sender becomes a Person node (or links to an existing one). The email body is analyzed for mentions of other people, companies, and projects. Each mention becomes a MENTIONED_IN edge. If the email creates a task, a CREATED_FROM edge connects them.
Over time, the graph becomes a comprehensive map of your professional universe. Every person, every project, every email, and every meeting is connected. The AI can traverse this graph to answer questions like "what is the full history of our relationship with Meridian?" in milliseconds.
Context Ranking
Not all context is equally relevant. The engine ranks context items by:
Recency. Recent interactions rank higher. An email from yesterday is more relevant than one from six months ago.
Strength. Direct connections rank higher than indirect ones. The email that created this task ranks higher than an email that mentions the same client but is about a different topic.
Business impact. Items connected to high-value deals, upcoming deadlines, or elevated priority tasks rank higher.
Relevance score. The semantic search returns a similarity score. Higher-similarity content ranks higher.
The top items are displayed in the context panel, with a "Show more" option for the full list. Most users find the top 5-8 items are exactly what they need.
What This Means for AI Quality
The context engine does not just power the sidebar -- it powers every AI feature in Ostavio.
When the AI drafts an email reply, it queries the context engine first. The draft is informed by CRM data (who is this person, what is their deal status), task data (what is outstanding), meeting data (what was discussed recently), and email data (what is the conversation history).
When the proactive engine detects a stale deal, it used the context engine to check: were there recent meetings? Unread emails? Pending tasks? The proactive alert includes the full context, not just "deal has been inactive."
When you ask a question in Ostavio's chat module -- "what is happening with Meridian?" -- the AI queries the knowledge graph, the embedding index, and Postgres simultaneously, then synthesizes a comprehensive answer from every data source.
The context engine is why Ostavio's AI produces better results than standalone AI tools. It is not a better model. It is better data.
Building Your Graph
The knowledge graph starts building the moment you connect your first data source. Connect email, and the graph populates with contacts, companies, and email relationships. Add meetings, and it adds calendar data and meeting notes. Add the CRM, and it adds deals and relationship structures.
After one week of connected email, a typical user's graph contains 200-500 person nodes, 50-100 company nodes, and thousands of relationship edges. After a month, the graph is comprehensive enough that the context panel provides genuinely useful insights on almost every interaction.
The more you use Ostavio, the smarter the context engine gets. Every email, every meeting, every task adds nodes and edges to the graph. The compound effect means the tool becomes more valuable over time, not less.
Try It Yourself
Connect two data sources and open any email. The context panel shows you data you would have spent 10 minutes assembling manually -- instantly. That is the cross-module context engine at work.
See it in action at ostavio.com.
Ready to automate your workflow?
Connect your first data source in 30 seconds. Free plan includes 2 sources and 50 AI analyses per month.
Get Started