AI-Powered Intelligence Hub: Natural Language Financial & Patent Analysis | Nerd Stuff
Darshan Rajopadhye unifies SEC filing and patent analysis into one Mycroft Intelligence Hub, using a local LLM to route plain-English queries.
Two working AI workflows are useful on their own, but they become something more once you can ask a single plain-English question and let the system figure out which one to run. That's the jump Darshan Rajopadhye makes in this walkthrough of the Mycroft Intelligence Hub, which unifies an SEC filings analysis workflow and a patent intelligence workflow, both built earlier as part of the Mycroft Agentic Framework, into one orchestrated system.
From manual triggers to webhooks
Both underlying workflows needed the same core changes before they could be integrated. The biggest one: replacing a manual trigger with a webhook, exposing each workflow as a REST API endpoint that can be called programmatically from anywhere rather than run by hand inside the workflow editor. Darshan demonstrates this on the SEC filings workflow specifically, showing that once the workflow is active, passing a query parameter like a ticker symbol through a browser URL triggers the entire workflow automatically, with no manual execution step required. The only wrinkle: the webhook method needs to be set to POST for the actual intelligence hub, even though GET works fine for casual testing.
Logging and persistent storage
The second change was comprehensive execution logging. Python nodes were added at each step to write progress to a log file, so the system's current stage stays visible centrally, which matters once a workflow is triggered programmatically instead of watched live in an editor. The third change was persistent storage. Previously, working files were deleted after each run, leaving only the final analysis behind, which is fine for a human checking results by hand but not enough if an LLM or AI system needs that data as context later. Darshan built a persistent storage system where all data gets saved under dedicated directories, passed through the workflow so new data can be added, checked, and reused as context for whatever gets built next. All three changes, webhook triggering, logging, and persistent storage, were replicated identically across both the SEC filings and patent intelligence workflows.
The hub as an AI orchestrator
With both workflows upgraded, the actual problem becomes usability: nobody wants to hand-construct URLs with query parameters, remembering ticker symbols or calculating date ranges for patents by hand. The Intelligence Hub solves that by acting as an AI orchestrator. A local LLM running on Ollama, using Llama 3, acts as the router: it carries a system prompt describing which tools are available and how to decide between them, and it calls the correct workflow, currently either the SEC or the patent workflow, based on the plain-English query it receives. One practical benefit of letting an LLM handle routing rather than exact string matching: it tolerates spelling mistakes and vague phrasing while still choosing the correct workflow.
From raw data to a downloadable report
A second LLM in the pipeline handles the output side. It reads the data saved in persistent storage as context and produces an executive summary report in markdown, which then gets converted to HTML and from HTML to a downloadable PDF, saved to the system for later use. Darshan notes this could be extended further, sending the resulting PDF automatically to email, Discord, or Slack through an HTTP request.
Watching it run
In the demo, a chat-triggered window accepts a query like "analyze Nvidia's financials." The query goes to the routing LLM, which decides which tool to call, correctly identifying the SEC workflow for a financial question, then runs it, logs progress along the way, and, if multiple workflows were relevant, would aggregate their results. An extraction step pulls the files saved by the SEC workflow and passes them into the analyst LLM chain, running on a locally served model, which takes a noticeable amount of time given the volume of context and numbers involved. Once that finishes, the system logs again, converts markdown to HTML to PDF, and writes the final file. The resulting report includes an executive summary, key findings, and risk factors, all built from actual numbers pulled from the company's real SEC filings.
Key takeaways
- Both the SEC filings and patent intelligence workflows were converted from manual triggers to webhook-based REST endpoints so they can be called programmatically.
- Comprehensive logging and persistent, directory-based storage replaced ephemeral files, making saved data reusable as context for downstream AI analysis.
- A local LLM running on Ollama with Llama 3 acts as a router, choosing the correct workflow from a natural-language query and tolerating typos or vague phrasing.
- A second LLM turns raw workflow output into a markdown executive summary, converted through HTML into a downloadable PDF report.
- The architecture and code for the Intelligence Hub are documented in the Mycroft GitHub repository under the Financial Intelligence Hub.
Who this is for
This walkthrough is for anyone building agentic systems that need to coordinate multiple specialized workflows behind one natural-language interface, particularly developers interested in n8n-based automation paired with local LLM routing. It's part of the Mycroft project's open, documented build process, with the Core Components and workflow code linked directly from the Humanitariansai GitHub for anyone who wants to extend it with more tools.
Full transcript(auto-generated, with timestamps)
[0:00]Hello everyone, my name is Darin and in my last few videos we've looked at the SEC filings analysis workflow and the patent intelligence workflow which have been developed as part of the Microsoft framework. Uh but to be honest both of them have been standalone and uh we were now working on integrating them into a uh central intelligence hub. Uh to do that I had to make a few changes and improvements to both of the workflows. Uh first uh let's go through these changes and uh then I'll show you what the uh intelligence hub does. Uh both of the uh workflows have pretty much the same changes. So I'll go through the sec
[0:42]Filings analysis workflow and explain you the changes. First uh the biggest change in here is that instead of a manual trigger uh the workflow get now gets triggered using a web hook. Uh this just exposes uh the workflow to a rest API endpoint and it can be called programmatically from anywhere. Uh this you can set the URL based on the uh path over here uh test production. Uh if you can see uh for test URL uh the way you do it is just copy it uh make sure that your workflow is uh on and then from any browser if you just go and pass in the query
[1:26]Parameters uh for ticker equal to Microsoft uh you'll see that the workflow gets automatically triggered and does all the uh steps that it's supposed to do and we didn't have to uh manually execute it. Uh and yeah, so it just gets uh completed. Uh the uh next uh change that I did was uh a comprehensive uh execution logging. Uh I added uh Python nodes uh that log uh the progress uh to a log file. Uh at each step uh the log file gets updated with the progress and we can keep track of it centrally so that we know uh at what step the system is currently at the
[2:20]Moment. uh this just gives us uh a better monitoring and better view of the system when we integrate it into a central system instead of uh just keeping it active which we can't anymore since this will be triggered programmatically. Uh and next is the uh persistent storage. So uh previously uh all the files were getting deleted and we were just storing the uh analysis uh which is enough if you manually want to check it. But if you want some LLM or some AI system to use that data uh to generate some insights that's not enough. So we need all the data saved. So uh I created
[3:01]A persistent uh system where all the data gets stored under uh certain directories and those directories are passed throughout the uh workflow so that we can uh add new data, check the data and use that as a context for uh whatever system that we will be uh building next. Uh so these were the three main changes and these are exactly replicated same in the patent intelligence system as well. So I won't go through uh all of those again. Uh but one major change is while testing the web hook URL uh is a get method but in uh the actual intelligence hub uh I've configured it as a post. So make sure to
[3:45]Keep the method as post before saving. I'll save it. And yeah uh but then now the challenge is that uh people wouldn't want to construct these URLs with query parameters uh manually. So because we wouldn't want to remember ticker symbols and calculate all the periods for patents. Uh we would just like to ask questions. So that's where the intelligence hub uh comes into the play. Uh the intelligence hub is basically an AI orchestrator. uh it uses local LMS to understand natural language and uh it automatically calls the right workflows based on the query that has been asked. Uh the first LLM uh acts as the router.
[4:30]Uh it has a system prompt that basically explains what tools are available and how to decide which tool to call and it calls uh either or. We currently have just two financial workflows. So those are the two integrated right now. Um and uh the second uh LLM that you can see uh this uses the data. So the data that we stored in the persistent uh data storage uh it uses that as context and creates a executive summary uh report based on the data that we used. Uh and we basically are what we're doing is we're just getting the LLM to give us a markdown uh
[5:11]Format of the report. We're converting it to HTML. uh from HTML to PDF. Uh we download that PDF and save it on the uh system so that uh we can use it for analysis. This could further improve to send those PDFs to emails or discord or slack bots uh based on uh any HTTP request that we can make. Um yeah, so I'll just show you how this works briefly. This is a chat uh based triggered window. So uh if you just open the chat and just say analyze uh Nvidia's financials. Uh one more uh thing about having a LLM do the routing is that there could be
[5:59]Spelling mistakes, there could be vague options and it will still choose the correct uh routing. So as you can see uh once the query is passed it goes to the LLM. It works on it. It decides what tools to call. Um it should work any moment. It takes a while at the first execution because it has a certain uh startup period. But as you can see it did correctly go to the call sec workflow uh node over here. If I can zoom in. Yeah. Uh now it's running it. uh we log it again over here. We aggregate the results if we were to call both of them. Uh then uh the extract
[6:42]From file node basically just extracts all the file that we saved as part of the sec workflow and passes it to the uh analyst LLM chain. Uh it also has the uh model which is served locally. Uh this takes a while because it has quite a lot of context and quite a lot of numbers to go through to generate the report. Uh once that is done uh we just log it again. Convert the markdown to HTML, HTML to PDF. Uh we write it and we log. So if we go to the folders you can see we have the final analysis report which has all the
[7:25]Executive summary the key findings risk factors uh and all these uh numbers are actual numbers based on the uh SEC filings that uh were filed by the company. So yeah uh this is how uh the progress has been on the two workflows and the intelligence hub that uh we've been working on. Uh the next steps are to just build more and more tools and keep adding them to this so that by the time uh we get a uh report generated it takes into account everything and uh all the possible data sources uh that are available. Um you can find all the uh documentation and system architecture uh
[8:16]For the intelligence hub and the improvements uh over the Microsoft GitHub repository under financial intelligence hub and my details are also linked into the readme at the top. So if you have any more questions feel free to uh email me or reach out anywhere. Thank you.
More videos
2:08Bridging the Pixel Gap in Browser Automation.
2:23How One Narrow Safety Rule Can Make an AI Less Safe Everywhere Else.
2:04Why splitting a chunk from its document makes it retrieve for the wrong question
4:20Three You Can Take Back. One You Can't.
2:21Why a 50-turn agent pays for the same screenshot 35 times unless it caches the pixels
1:53