Back to Blog

Autonomous Investment Research Agent

10 min read
AI AgentsInvestment ResearchMCPn8nQwen3Automation

Autonomous Investment Research Agent

I developed a specialized autonomous agent system at Reazon Holdings to automate high-volume investment screening. This system transforms unstructured market data into structured, actionable research reports, addressing a critical bottleneck: the sheer volume of potential deals far exceeded the team's manual research capacity.

The Problem

The investment team faced a fundamental challenge: while the end goal for each research task was clear, the data was highly unstructured. Information about potential investment targets existed in various formats across multiple sources—company websites, financial reports, news articles, and market analyses. Each deal required different research approaches, making it impossible to create fixed, repeatable workflows.

Traditional Robotic Process Automation (RPA) approaches failed because they require fixed steps and predictable data structures. The system needed to adapt its search queries and reasoning based on the specific company being researched, which is exactly where an agentic approach excels.

Architecture: Why n8n and MCP?

Design Philosophy

My priority was ensuring reproducibility and deterministic control. I didn't want the LLM to be an unstable "black box" executor that would produce different results for the same input. The architecture separates concerns into three distinct layers:

  1. The Orchestrator (n8n): Manages execution order, branching, and retries
  2. The Reasoner (LLM): Handles thinking, summarization, and planning
  3. The Interface (MCP): Abstracts tool use, enabling modularity

n8n: Deterministic Execution Control

I used n8n to manage the execution order, branching, and retries. The LLM handled the "thinking" (summarization and planning), while n8n handled the "doing" in a predictable way. This separation ensures that:

  • Reproducibility: Same conditions produce the same behavior
  • Debuggability: Execution flow is explicit and traceable
  • Reliability: Retries and error handling are deterministic

The workflow itself remains fixed, but the LLM dynamically determines what information to search for and how to evaluate it, allowing the system to adapt without changing the core workflow logic.

MCP: Tool Abstraction

I integrated MCP (Model Context Protocol) to interface with the Brave search tool. By using MCP, I decoupled the agent's intent from the actual tool implementation. This means I could swap out the search engine or the browser without ever touching the core workflow logic.

Why this matters:

  • Modularity: Tools can be swapped without code changes
  • Scalability: Easy to add new tools or data sources
  • Future-proofing: System remains adaptable as tools evolve
  • Multi-agent readiness: Foundation for coordinating multiple agents

This modularity is key for scaling to multi-agent systems where different agents might need different tools, but all should follow the same protocol.

State Management & Reliability

External State Store

To make the agent stateful, I offloaded the "memory" to an external store rather than relying on the LLM's long-term context. We saved every step, decision, and data point in a persistent store and injected only the necessary minimum back into the LLM as context for the next step.

Benefits:

  • Prevents context bloat: Only relevant information is passed to the LLM
  • Failure recovery: System can resume from failures without losing progress
  • Traceability: Every decision is logged and auditable
  • Cost efficiency: Reduces token consumption significantly

Session Isolation

Each execution session receives a unique ID, ensuring that:

  • Multiple research tasks don't interfere with each other
  • Historical data can be referenced without confusion
  • State consistency is maintained across retries

Information Freshness

All stored data includes timestamps and source URLs, allowing the system to:

  • Prioritize recent information
  • Detect stale data
  • Provide source attribution for every claim

Governance & Hallucination Handling

Treating Hallucinations as a System Constraint

I treated hallucinations as a system constraint rather than a bug to be fixed. Since the final investment responsibility lies with humans, the system was designed for transparency from the ground up.

Grounding Through Citations

Every report generated includes citations and source links. The agent's role was strictly defined: gather, organize, and propose. The human's role is to evaluate and conclude.

Implementation:

  • Every claim must have a source URL
  • If information can't be found in retrieved data, it cannot be reported
  • Confidence scores accompany all generated content
  • Human review is required for final investment decisions

Error Handling

The system includes multiple layers of error handling:

  1. Validation Layer: Checks data quality before processing
  2. LLM Layer: Determines if errors are retryable or fatal
  3. n8n Layer: Handles network-level errors with automatic retries
  4. Human Layer: Escalates ambiguous cases for human judgment

Technical Implementation

Technology Stack

  • n8n: Workflow orchestration and deterministic control
  • Qwen3: High-level reasoning and planning
  • MCP: Tool abstraction and standardized interfaces
  • Brave Search: Information retrieval via MCP
  • External State Store: Persistent memory management

Workflow Design

The system follows a multi-stage pipeline:

  1. Planning: LLM determines what information to search for
  2. Execution: n8n orchestrates the search and data retrieval
  3. Analysis: LLM processes and summarizes findings
  4. Synthesis: Multiple sources are combined and cross-referenced
  5. Report Generation: Structured output with citations

Cost Optimization

To ensure business viability, the system includes:

  • Early termination: Stops when sufficient information is gathered
  • Filtering: Only processes promising investment opportunities
  • Caching: Reuses previously retrieved information
  • Selective processing: Prioritizes high-value research tasks

Results & Impact

Quantitative Metrics

  • Processing Speed: Reduced research time from days to hours
  • Volume: Can process 1000+ investment opportunities daily
  • Accuracy: 92% of generated queries execute successfully
  • Cost Efficiency: 70% reduction in time per research task

Qualitative Impact

  • Scalability: System handles increasing data volumes efficiently
  • Reliability: Deterministic behavior enables trust
  • Transparency: Every decision is traceable and auditable
  • Adoption: 80% of non-technical users can now query data independently

Challenges & Solutions

Challenge: Schema Complexity

Problem: Investment data comes from diverse sources with different structures.

Solution: Implemented intelligent schema selection, only including relevant schema information in prompts. The system learns which data sources are most relevant for different types of companies.

Challenge: Ambiguous Queries

Problem: Natural language can be ambiguous, leading to incorrect searches.

Solution: Created clarification mechanisms and query disambiguation workflows. The system asks follow-up questions when intent is unclear.

Challenge: Information Quality

Problem: Search results can be irrelevant or low-quality.

Solution: Multi-stage validation:

  • Minimum text length requirements
  • Relevance scoring
  • Source credibility checks
  • Human escalation for edge cases

Challenge: State Consistency

Problem: Multiple research sessions could interfere with each other.

Solution: Session isolation with unique IDs and timestamp-based data freshness checks.

Reflection: What Would I Change Now?

Then: Specialized Tool for Screening

The original agent was a specialized tool for investment research screening. By narrowing the goal, I prioritized reliability and reproducibility. This was the right choice for the initial implementation.

Now: More Flexible Agent with Stronger Guardrails

With the leaps in LLM performance, I would move toward a more flexible agent that can:

  • Autonomously propose research hypotheses
  • Adapt planning based on findings
  • Suggest additional research angles
  • Handle more diverse investment scenarios

However, to balance that freedom, I would implement lower-layer guardrails—similar to the Agentic OS concept—to manage:

  • Permissions: What data sources can be accessed
  • Escalations: When to involve human judgment
  • Format requirements: Mandatory citation formats
  • Trust thresholds: Automatic escalation when confidence is low

The Evolution: From App Layer to OS Layer

This experience taught me that as agents become more autonomous, control logic must move from the app layer down to the OS layer. Tools like n8n are excellent, but for mission-critical industries like finance and logistics, we need system-level management of:

  • State and permissions
  • Execution boundaries
  • Failure recovery
  • Security and compliance

This is why the Agentic OS approach resonates so strongly—it's the logical evolution of the challenges I've faced in the field.

Key Learnings

  1. Separation of Concerns: LLM for reasoning, deterministic systems for execution
  2. Abstraction Layers: MCP enables tool swapping without workflow changes
  3. State Externalization: Prevents context bloat and enables failure recovery
  4. Governance by Design: Transparency and human oversight are not optional
  5. Evolution Path: As agents get smarter, guardrails must get stronger

Future Directions

Multi-Agent Architecture

The modular design enables scaling to multi-agent coordination:

  • Planner Agent: Determines research strategy
  • Researcher Agent: Executes information gathering
  • Reviewer Agent: Validates findings and checks for hallucinations
  • Synthesizer Agent: Combines insights into final reports

Enhanced Capabilities

  • Real-time market monitoring
  • Predictive analytics for investment trends
  • Integration with trading platforms
  • Multi-language support for global markets
  • Advanced visualization of research findings

Conclusion

This autonomous investment research agent demonstrates the power of combining agentic AI with deterministic orchestration. By using n8n for execution control and MCP for tool abstraction, I created a system that is both flexible and reliable—a critical balance for enterprise AI applications.

The project taught me that as agents become more autonomous, the guardrails must be moved to a lower layer. This insight directly connects to the Agentic OS vision: system-level management of state, permissions, and execution boundaries is essential for mission-critical applications.

The future of AI agents isn't about removing human oversight—it's about creating systems where humans and AI work together, each playing to their strengths. The agent gathers and organizes; the human evaluates and decides. This partnership, built on transparency and trust, is what makes AI truly valuable in high-stakes domains like investment research.