A new open source project called 1rok is bringing a fully transparent, agent-driven approach to algorithmic portfolio construction—and it's running on your terms, not some hedge fund's black box. The repository by developer achaljhawar implements a complete pipeline where AI agents across seven different LLM providers can research, score, and construct stock portfolios through a unified tool-calling interface.
The Pipeline Architecture
The system operates in two distinct stages: run generates a portfolio-construction JSON artifact containing trade recommendations, while execute reads that artifact and places orders via the Alpaca brokerage API. Crucially, paper trading is the default behavior—real money only flows when you explicitly pass the --live flag. This separation of concerns means you can audit every decision the agents make before risking capital. The pipeline chains ten specialized agents together in a carefully orchestrated workflow. It starts with a Macro Agent that reads market regime indicators through FRED data, feeding into a Screener Agent that surfaces 25-30 candidates from Yahoo Finance. Six analysis agents then work in parallel—Fundamental, Valuation, Technical, Sentiment, Catalyst, and Risk—each scoring the candidate stocks through their respective lenses before an Orchestrator Agent composites those scores using weighted averages: fundamental and valuation each get 20%, risk gets 15% (inverted), technical and catalyst each get 15%, sentiment gets 10%, with a 5% macro gate acting as a final filter.
Multi-Provider Tool Registry
The inline tool registry is where 1rok really shines for developers who want to compare model behavior. Rather than forcing you into OpenAI's ecosystem or Anthropic's, the project maintains Zod-typed definitions across eight tool groups—market data, stock queries, research endpoints, technical indicators, options data, earnings information, portfolio management, and Tavily web search—that get converted to each provider's native tool-call format with shared retry logic. Supported providers include OpenAI (GPT-5.2/5.4/5.5), Anthropic (Claude Opus 4.7, Sonnet 4.6, Haiku 4.5), Gemini, xAI, DeepSeek, GLM, and OpenRouter for accessing models not natively supported. The Anthropic adapter leverages @anthropic-ai/claude-agent-sdk and automatically resolves the claude binary across macOS, Linux (glibc and musl), and Windows.
Live Performance Tracking
Since January 20, 2026, a live leaderboard has been tracking how each model performs in paper trading against Alpaca's sandbox environment. You can watch GPT-5.2-medium compete with Claude Opus 4.7-high, Gemini variants, DeepSeek, and the rest in real time at investingbench.vercel.app. The constructor agent caps positions at eight holdings while maintaining at least 85% invested capital and a maximum 40% allocation per single name—discipline baked into the system rather than delegated to human judgment.
Getting Started
The project requires Bun >= 1.1.0 and supports macOS, Linux (x64/arm64 with glibc or musl), and Windows (x64/arm64). After running bun install and copying .env.example to .env, you'll need API keys for whichever data providers and LLM models you intend to use—Yahoo Finance requires nothing, but Alpaca, FRED, Tavily, and your chosen AI providers each have their own key requirements.
Key Takeaways
- 1rok runs a ten-agent pipeline from macro analysis through order execution entirely in open source code—no proprietary trading systems involved
- Paper trading is the default;
--liveflag is required for real orders, making experimentation safe by default - The live leaderboard at investingbench.vercel.app has been tracking model performance since January 2026
- Portfolio constructor enforces position limits (8 max positions, ≤40% per name) automatically
The Bottom Line
This isn't just an academic exercise—1rok represents a credible framework for anyone who wants to pit AI models against each other in actual investment decision-making. Whether you're a developer curious about agent reliability or a trader tired of opaque quant systems, the code is right there on GitHub waiting for you to tear it apart and build something better.