A vibe investing agent harness
LangAlpha is built to help interpret financial markets and support investment decisions.
Activated with a skill, the agent dispatches parallel subagents to gather market data, news, and macro context, then presents a morning note with inline interactive visualizations.
Every AI finance tool today treats investing as one-shot: ask a question, get an answer, move on. But real investing is Bayesian -- you start with a thesis, new data arrives daily, and you update your conviction accordingly. It's an iterative process that unfolds over weeks and months: refining theses, revisiting positions, layering new analysis on top of old. No single prompt captures that.
Inspired by software engineering: a codebase persists, and every commit builds on what came before. Code agent harnesses like Claude Code and OpenCode succeeded by building agents that embrace this pattern, exploring existing context and building on prior work. LangAlpha brings that same insight: give the agent a persistent workspace, and research naturally compounds.
In practice, you create a workspace per research goal ("Q2 rebalance", "data center demand deep dive", "energy sector rotation"). The agent interviews you about your goals and style, produces its first deliverable, and saves everything to the workspace filesystem. Come back tomorrow and your files, threads, and accumulated research are still there.
System Architecture
LangAlpha runs on a provider-agnostic model layer that abstracts across multiple LLM backends. The same middleware stack, tools, and workflows work regardless of which model is driving them. It ships with two modes:
Bring your own model -- Use your existing AI subscriptions and API keys directly. Connect ChatGPT or Claude subscriptions via OAuth (OpenAI Codex OAuth, Claude Code OAuth), use coding plans from Kimi (Moonshot), GLM (Zhipu), or MiniMax, or supply your own API keys for any supported provider via BYOK. All keys are encrypted at rest via PostgreSQL pgcrypto (see Security).
Model resilience -- 3 retries with exponential backoff on the same model, then automatic failover to a configured fallback model. Reasoning effort (//) is normalized across providers automatically.
Most AI agents interact with data through one-off JSON tool calls which dump the result into the context window directly. Programmatic Tool Calling flips this: instead of passing raw data through the LLM, the agent writes and executes code inside a Daytona cloud sandbox that processes data locally and returns only the final result. This dramatically reduces token waste while enabling analysis that would otherwise exceed context limits.
PTC Execution Flow
In addition, the workspace environment enables persistence beyond a single session. Each sandbox has a structured directory layout -- for per-task working areas (data, charts, code), for finalized reports, and for shared datasets -- so intermediate results survive across sessions. At the root sits , a persistent memory file that the agent maintains across threads: workspace goals, key findings, a thread index, and a file index of important artifacts. A middleware layer injects into every model call, so the agent always has full context of prior work without re-reading files. Each workspace supports multiple conversation threads tied to a single research goal.
Each workspace maps to a persistent sandbox -- organize research by theme, portfolio, or thesis.
The agent writes code to build interactive dashboards -- here analyzing the AI compute supply chain via PTC.
While PTC excels at complex work like multi-step data processing, financial modeling, and chart creation, spinning up code execution for every data lookup is overkill. So we also built a native financial data toolset that transforms frequently used data into an LLM-digestible format. These tools also come with artifacts that render directly in the frontend, giving the human layer immediate visual context alongside the agent's analysis.
The agent picks the right layer automatically: native tools for fast lookups that fit in context, MCP tools when the task requires bulk data processing, charting, or multi-year trend analysis in the sandbox.
LangAlpha supports a three-tier data provider hierarchy. Each tier is optional -- the system gracefully degrades when higher tiers are unavailable:
Native financial data tools render live stock cards inline while the agent runs a comps analysis.
The agent ships with 23 pre-built financial research skills, each activatable by slash command or automatic detection. Skills follow the Agent Skills Spec and can be extended by dropping a file into the workspace.
Acknowledgement: some of skills are adapted from anthropics/financial-services-plugins.
The Comps Analysis skill builds a multi-sheet Excel workbook with operating metrics and valuation multiples.
The agent natively reads images (PNG, JPG, GIF, WebP) and PDFs -- the multimodal middleware intercepts file reads, downloads content from the sandbox or URLs, and injects it as base64 into the conversation for direct visual interpretation. In MarketView, the user's live candlestick chart can be captured and sent to the agent as multimodal context -- the capture includes both the chart image and structured metadata (symbol, interval, OHLCV, moving averages, RSI, 52-week range) so the agent can reason about both the visual pattern and the underlying data.
MarketView captures the live chart and sends it to the agent for real-time technical analysis.
The agent can schedule its own tasks from within a conversation -- no separate UI needed. Users can also manage automations from the dedicated Automations page with full CRUD, execution history, and manual trigger. All automation types share the same , configurable agent mode (PTC or Flash), and automatic disabling after consecutive failures.
Time-based -- Standard cron expressions for recurring schedules ("run this analysis every Monday at 9 AM") and one-shot datetime scheduling for single future executions.
Price-triggered -- Set a price target or percentage move on any stock or major index, and the agent executes your instructions the moment the condition is met. A subscribes to a shared upstream WebSocket connection to ginlix-data for real-time ticks (stocks on the realtime tier, indices on the delayed tier). Redis-based deduplication prevents duplicate triggers across server instances.
Conditions can be combined (AND logic), and each price automation supports one-shot (fire once) or recurring mode with a configurable cooldown (minimum 4 hours, or once per trading day by default).
Schedule recurring research -- here, pre-earnings analysis for major tech stocks runs automatically before each report.
Agent Architecture
The core agent runs on LangGraph and spawns parallel async subagents via a tool. Subagents execute concurrently with isolated context windows, preventing drift in long reasoning chains. Each subagent returns synthesized results back to the main agent, keeping the orchestrator lean. The main agent can choose to wait for a subagent's result or continue other pending work. Interrupting the main agent does not stop running subagents, so you can halt the orchestrator, update your requirements, or dispatch additional subagents while existing ones finish in the background. You can also switch to the Subagents view in the UI to see their progress in real time (web frontend only).
Beyond simple dispatch, the main agent can send follow-up instructions to a still-running subagent via , or resume a completed subagent with full checkpoint context via for iterative refinement. If the server restarts, subagent state is automatically reconstructed from LangGraph checkpoints.
Three research subagents run in parallel, each covering a different chip family -- results merge into an interactive timeline.
The agent ships with a middleware stack, including:
See for the full set.
Acknowledgement: some of middleware components are adapted or inspired by the implementation in LangChain DeepAgents.
The server streams all agent activity over SSE: text chunks, tool calls with arguments and results, subagent status updates, file operation artifacts, and human-in-the-loop interrupts. Every agent decision is fully traceable in the UI.
Workflows run as independent background tasks behind , fully decoupled from the HTTP/SSE connection. If the browser tab closes or the network drops, the agent keeps working. On reconnect, up to 150,000 buffered events replay from Redis with deduplication, picking up exactly where the client left off. A background cleanup task auto-purges abandoned workflows after one hour. Soft interrupts pause the main agent while background subagents continue running.
PostgreSQL backs LangGraph checkpointing, conversation history, and user data (watchlists, portfolios, preferences), so agent state and user context persist across sessions. Redis buffers SSE events so that browser refreshes and network drops do not lose in-flight messages: the client reconnects and replays automatically. The server also handles synchronization between local data and sandbox data, keeping MCP, skills, and user context in sync. See the full API reference for details.
LangAlpha applies a layered security model across credentials, code execution, and user-supplied secrets.
Encryption at rest -- All sensitive data (BYOK API keys, OAuth tokens, vault secrets) is encrypted inside PostgreSQL using ( / ). Plaintext never exists in the database or in application memory during persistence.
Credential leak detection -- Every tool output is scanned before it reaches the LLM context. The middleware resolves all known secret values (MCP server keys, sandbox tokens, vault secrets) and redacts any match as . The same redaction applies to human-facing surfaces -- file reads and downloads are scrubbed before reaching the client.
Sandboxed code execution -- Each workspace runs in its own Daytona cloud sandbox with a dedicated filesystem and network boundary. Protected path guards prevent the agent from accessing internal system directories -- blocking both tool input (short-circuiting the call before execution) and tool output (redacting leaked paths).
Each workspace has a built-in secret vault for storing API keys and credentials that the agent can use during code execution -- useful for accessing third-party data sources (brokerage APIs, external data vendors, etc.) or building LLM-powered workflows inside the workspace. Store a secret once in the UI, and it's available to every agent session in that workspace via a simple Python API:
Vault secrets inherit every protection layer above -- encrypted at rest, redacted from all agent and human-facing output, and blocked from direct file access. Only the workspace owner can create, update, reveal, or delete secrets.
The web UI is more than a chat interface -- it's a full research workbench:
The dashboard surfaces market indices, personalized news, portfolio tracking, and upcoming earnings at a glance.
Use LangAlpha from the tools you already work in. The integration gateway relays messages between messaging platforms and the core agent, with each channel receiving responses in its native format. Channel integrations are available exclusively on our hosted service with one-click setup and quick account binding -- visit integrations to get started.
Slack and Discord offer native channels and thread-level groups, which map naturally to LangAlpha workspaces and threads -- context is managed natively. Telegram and WhatsApp lack these primitives, so they run a simplified orchestration mode. Feishu has full messaging and card-based UI with OAuth coming soon. Telegram has partial support with full coverage coming soon. WhatsApp is planned.
You can start LangAlpha with nothing but Docker -- no API keys for data, no cloud sandbox. Just Docker for infrastructure and your own LLM subscription for the AI model.
For partnerships, collaborations, or general inquiries, reach out to [email protected].
LangAlpha is a research tool, not a financial advisor. Nothing produced by this software constitutes investment advice, a recommendation, or a solicitation to buy or sell any security. All output is for informational and educational purposes only. Use at your own discretion -- always do your own due diligence before making investment decisions.