
By The Agent M Team: Shawn Ng, Derrick Lim, Joshua Ang, Bryan Chua, Foo Zi You, Beh Jia Yen
This content is for educational and informational purposes only and should not be construed as investment advice, a recommendation, or an offer to buy or sell any securities or cryptocurrencies. Any strategies discussed are illustrative only and may not be suitable for all investors. This article reflects the experience of an individual user, is not representative of all customers, and should not be considered an endorsement or guarantee of future performance. The views and opinions expressed are those of the author and do not reflect or represent the views and opinions of Alpaca. Alpaca does not recommend any specific securities or investment strategies.The author was not compensated for this content but did receive nominal promotional items from Alpaca.
From Information Overload to Automated Action
As retail investors, we've all felt it. The relentless flood of financial news, reddit threads, and market signals that feel impossible to keep up with manually.
By the time you've read an article, formed a view, and placed a trade, the opportunity has often already moved.
That frustration is what drove us to build Agent M, a multi-agent AI trading research and automation system designed to help automate certain research and trading workflows based on user-defined parameters.
As a team of six from Singapore Management University, we worked together to build Agent M. And through Alpaca's Trading API, we found a brokerage API that enables integration between our research workflow and order submission functionality.
The Problem: Information Doesn’t Translate to Action Fast Enough
Every trader has experienced the same frustration. You read a breaking headline about an earnings miss, a Fed announcement, or a geopolitical event. You process it, cross-reference it against your portfolio, weigh your risk appetite, and by the time you've read an article, formed a view, and decided whether to place a trade, market conditions may have changed.
The real problem isn't access to information. In 2026, information is everywhere. The problem is the gap between signal and execution, the cognitive and mechanical latency that exists between a piece of news appearing and a calibrated trade order hitting the market.
Many existing solutions only solve part of the pipeline. A sentiment dashboard tells you the mood of the market but leaves execution to you. An algorithmic strategy executes fast but doesn't understand news. A chatbot summarises headlines but doesn't act. Agent M was designed to explore an end-to-end workflow that connects information gathering, analysis, and order execution: from raw, unstructured data ingestion, through multi-layered analysis, all the way to a personalized, risk-aware order executed at the broker level, based on user-defined parameters and controls.
A key feature of Agent M is its end-to-end orchestration of multiple workflow components. Any individual component in a trading pipeline could be replicated. One design objective was to integrate these components into a coordinated workflow: the architecture that ensures every stage is aware of every other stage, that credibility scores flow into sentiment weights, that sentiment weights flow into a portfolio-aware agent, and that the agent's decision flows into a live brokerage execution with zero manual steps. The value is not in any single node. The project focuses on how multiple analytical components can operate together within a unified workflow.
What Is Agent M?


Illustrative example only. Screens are demonstrations of system functionality and do not depict actual customer accounts, actual trading results, or future performance.
Agent M is not a single algorithm. It is a collection of software components designed to automate portions of a research and trading workflow — from scraping and understanding news, to generating trading-related outputs and submitting orders according to user-configured settings.
At a high level, Agent M operates in a continuous loop:
- Data Ingestion: News and social signals are scraped in real time from sources like Yahoo Finance RSS feeds and Reddit & TradingView communities (r/stocks, r/wallstreetbets), giving the system a broad pulse of both institutional and retail sentiment
- Preprocessing & Event Identification: Raw text is cleaned, tokenised, and passed through a rule-based pipeline augmented by several LLMs to identify investment-relevant events from articles
- Credibility Scoring: Every source and claim is scored for reliability using AI-assisted fact-checking, intended to reduce the impact of potentially unreliable information before it is incorporated into system outputs
- Sentiment Analysis: Financial domain-specific NLP models, performs sentiment analysis on the processed text; sentiment scores are then weighted by credibility to produce directional signals that may be incorporated into the system's analysis
- RAG-Powered Decision Making: A LangGraph-based trading agent queries a vector database (Qdrant) using Retrieval-Augmented Generation (RAG) to retrieve information that the system determines may be relevant to its analysis before generating an output
- Execution via Alpaca: If predefined conditions are met, the system may submit orders through Alpaca's Trading API in accordance with user-configured settings and risk parameters.
Why Alpaca?
When we needed a brokerage layer for Agent M, Alpaca was the choice for us. The alpaca-py Python package gave us a unified interface for data pulls, order management, position checks, and error handling, all from one clean SDK.
We didn't want to spend engineering effort wrestling with a complex API when the real value was in our intelligence pipeline. Alpaca's API tools allowed us to spend more time developing the project's workflow and infrastructure.
Portfolio Context and Risk Guardrails
One of the most important design principles behind Agent M is that automated systems may involve risks if appropriate controls are not implemented. Users import their personal portfolio holdings into the system, which the RAG pipeline uses to personalize every decision. Agent M incorporates portfolio information as one of several inputs used in its analysis.
Beyond personalization, users define risk guardrails (limits on position sizes, asset classes, or exposure thresholds). The trading agent acts on sentiment signals, but only within the boundaries the user has set.
What We Learned Building Agent M
Building Agent M taught us that the hardest problems in AI-driven trading are not the ones that look hardest on paper.
First, garbage in, garbage out is not a cliché but a central engineering challenge. Early versions of Agent M produced erratic trading signals, and nearly every root cause traced back to data quality rather than model quality. A single low-credibility source spiking a sentiment score could trigger an outsized position. This led us to further develop our credibility scoring process, which serves as one component of the system's analytical framework that weights every signal before it touches the decision layer. We learned to treat data reliability as a first-class feature, not an afterthought.
Second, personalization changes everything about how a system must be designed. When Agent M operates with portfolio context, the same news event can have completely different implications for two different users. A rising oil price is bullish for one portfolio and damaging for another. Designing the RAG pipeline to retrieve and reason against each user's specific holdings rather than producing generic signals, required us to rethink how we structured our vector embeddings and retrieval queries. It also made the system significantly more useful in practice.
What’s Next for Agent M
The next chapter for Agent M is a fundamental shift in how we think about what it is. Today, Agent M is a powerful, integrated system. But we are looking towards building it such that traders can plug their existing workflows into.
The first frontier is opening up the news ingestion pipeline to multiple sources simultaneously. Right now, Agent M ingests from a curated set of feeds. We are exploring a modular ingestion layer where traders can connect any data source they rely on — proprietary news terminals, niche financial blogs, earnings call transcripts, regulatory filings, or alternative data feeds like satellite imagery and shipping data.
If implemented, additional sources may pass through similar credibility-scoring and sentiment-analysis processes., Meaning the quality guarantees remain consistent regardless of what data is flowing in. The pipeline becomes the constant; the sources become configurable.
The second frontier is trader-defined strategy plugins. One of the clearest pieces of feedback we have received is that experienced traders do not want to hand over their entire strategy to a black box. They want to keep their edge, their proprietary rules, their preferred indicators, their personal risk frameworks, all while automating the repetitive, time-sensitive execution work. We are evaluating potential approaches for a strategy layer where traders can express their own logic as modular rules or code blocks that Agent M's orchestration engine will respect and execute around.
This is the future we are building toward: a highly customisable orchestration backbone where the real value is not any fixed opinion about how to trade, but the robust, intelligent infrastructure that connects any signal source to any strategy logic to any execution endpoint.
Conclusion
Agent M is an experimental project that explores how AI tools may assist with information processing, workflow automation, and order submission based on user-defined parameters. The project uses Alpaca's API infrastructure as part of its workflow architecture.
Find more of us at agentic-m.com
Resources
If you want to start building your own systematic trading system, here are the resources I found most useful:
Alpaca's Trading API (docs.alpaca.markets/docs/trading-api) is the place to start. The paper trading quickstart will have you placing simulated orders quickly.
Alpaca's Paper Trading (docs.alpaca.markets/docs/paper-trading) lets you set up a paper account in minutes. Same API, same execution, no risk.
LangGraph
Qdrant
About the Team
Joshua Ang, Engineer (AI & Infrastructure)
Shawn Ng, Product Manager / Engineer
Bryan Chua, Cloud Engineer
Derrick Lim, Engineer (Trading)
Jia Yen Beh, Engineer (Data)
Zi You Foo, Engineer (Data)
This article is for educational and informational purposes only and should not be construed as investment advice, a recommendation, or an offer to buy or sell any security or cryptocurrency. The views expressed are those of the author and do not reflect those of Alpaca. Alpaca does not recommend any specific securities, investment strategies, or trading approaches.
Agent M is an experimental technology project developed by third-party users and is not a product or service offered by Alpaca. Automated trading systems involve significant risks, including model errors, inaccurate or incomplete data, technology failures, cybersecurity incidents, unexpected market events, and the potential for substantial losses. Automation does not guarantee investment success, improved performance, or reduced risk.
Examples, testimonials, screenshots, and use cases are provided for illustrative purposes only and are not indicative of future results or success. Past performance, hypothetical results, and backtested results do not guarantee future returns. All investments involve risk, including the possible loss of principal.
Alpaca does not prepare, edit, endorse, or guarantee the accuracy, completeness, or usefulness of third-party content and is not responsible for content available from third-party websites or services.
The Paper Trading API is offered by AlpacaDB, Inc. and does not require real money or permit a user to transact in real securities in the market. Providing use of the Paper Trading API is not an offer or solicitation to buy or sell securities, securities derivative or futures products of any kind, or any type of trading or investment advice, recommendation or strategy, given or in any manner endorsed by AlpacaDB, Inc. or any AlpacaDB, Inc. affiliate and the information made available through the Paper Trading API is not an offer or solicitation of any kind in any jurisdiction where AlpacaDB, Inc. or any AlpacaDB, Inc. affiliate (collectively, “Alpaca”) is not authorized to do business.
Securities brokerage services are provided by Alpaca Securities LLC ("Alpaca Securities"), member FINRA/SIPC, a wholly-owned subsidiary of AlpacaDB, Inc. Technology and services are offered by AlpacaDB, Inc.
Cryptocurrency services are made available by Alpaca Crypto LLC ("Alpaca Crypto"), a FinCEN registered money services business (NMLS # 2160858), and a wholly-owned subsidiary of AlpacaDB, Inc. Alpaca Crypto is not a member of SIPC or FINRA. Cryptocurrencies are not stocks and your cryptocurrency investments are not protected by either FDIC or SIPC. Please see the Disclosure Library for more information.
This is not an offer, solicitation of an offer, or advice to buy or sell securities or cryptocurrencies or open a brokerage account or cryptocurrency account in any jurisdiction where Alpaca Securities or Alpaca Crypto, respectively, are not registered or licensed, as applicable.


