Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
a2cff8b
feat: moved user_data json ro sqlite db approach
sawradip Oct 10, 2025
21deaf8
feat: init coomand interactive
sawradip Oct 10, 2025
0d83c50
feat: fixed & improved template downloading
sawradip Oct 10, 2025
59c7e33
feat: split cli cmds into seperate files
sawradip Oct 23, 2025
eb22618
Merge branch 'main' into sawra/runagent_cloud_support_wip
sawradip Oct 23, 2025
ada8d12
adding stock agent example
Oct 24, 2025
9afeb35
remove stock agent
Oct 24, 2025
33961d6
feat: express login [device-browser code flow] added
sawradip Oct 24, 2025
5ee29dc
adding stock agent example
Oct 24, 2025
731cac5
fixing stock agent for deployment
RadeenXALNW Oct 24, 2025
8c76140
fixed stockagent with python sdk
RadeenXALNW Oct 24, 2025
56ffdda
fixed stock agent for python sdk remote deployment
RadeenXALNW Oct 25, 2025
0159593
fix the rust sdk for remote deployment
RadeenXALNW Oct 25, 2025
56e0c22
fix non stream local deployment rust sdk
RadeenXALNW Oct 25, 2025
a5290b2
lead scoring example
RadeenXALNW Oct 26, 2025
af4a7fa
adding lead score agent example
RadeenXALNW Oct 26, 2025
10313a3
adding new examples of recipe maker
RadeenXALNW Oct 27, 2025
f988161
adding new examples
RadeenXALNW Oct 27, 2025
5d2b287
fix: init command fixing wip
sawradip Oct 28, 2025
3e5ca62
adding examples and fix sdk of rust with cloud
RadeenXALNW Oct 29, 2025
3b97917
feat: persistent agent id working
sawradip Oct 29, 2025
876cb05
Merge branch 'rad/new_ready_example' into sawra/runagent_cloud_suppor…
sawradip Oct 29, 2025
3b776e4
adding new examples
RadeenXALNW Nov 2, 2025
12eb3cc
feat: cleaned emojis form output
sawradip Nov 3, 2025
34b8f3e
rad/examples_v2
RadeenXALNW Nov 5, 2025
df74e25
added rust backend with frontend
RadeenXALNW Nov 5, 2025
e14bef0
feat: Added whoami command
sawradip Nov 6, 2025
a67de60
feat: standardized local agent execution logging
sawradip Nov 6, 2025
a050bfd
feat: auto rewload suported in local server
sawradip Nov 6, 2025
68a8143
feat: removed replacing agent id
sawradip Nov 6, 2025
cf43e0e
feat: muted db replace agent option
sawradip Nov 6, 2025
2d1d84a
removed unnecessary files and fixed ui
RadeenXALNW Nov 6, 2025
3dcd9d5
restructure the examples
RadeenXALNW Nov 6, 2025
6d0eac8
feat: improved debug log
sawradip Nov 6, 2025
6fcabf0
chore: bump version to v0.1.24
sawradip Nov 6, 2025
7aa44e4
Merge branch 'rad/examples_v2' into sawra/runagent_cloud_support_wip
sawradip Nov 6, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -161,4 +161,4 @@ myvenv/
#parlant
parlant-data

test.md
test.md
26 changes: 5 additions & 21 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,35 +1,19 @@
# Changelog
All notable changes to this project's latest version.

## [0.1.22] - 2025-09-25
## [0.1.23] - 2025-09-25

### Bug Fixes

- Langgraph tempate config added
- Langchain advanced template removed
- Release script fixed
- Missing files form last version mess added

### Features

- Template init bugged fixed
- Runagent cloud support - partial implementation
- Release scripts updated

### Miscellaneous Tasks

- Bump version to v0.1.20
- Bump version to v0.1.22

## [0.1.20] - 2025-08-27

### Documentation

- Added changelog

### Features

- Added version command to see package version ([#60](https://github.com/your-org/your-repo/issues/60))

### Miscellaneous Tasks

- Bump version to v0.1.21
- Bump version to v0.1.23

<!-- generated by git-cliff -->
68 changes: 68 additions & 0 deletions examples/Stockagent/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
# When AI Meets Finance (StockAgent): Large Language Model-based Stock Trading in Simulated Real-world Environments

![workflow](fig/workflow.png)
![schematic](fig/schematic.png)

Can AI Agents simulate real-world trading environments to investigate the impact of external factors on stock trading activities (e.g., macroeconomics, policy changes, company fundamentals, and global events)? These factors, which frequently influence trading behaviors, are critical elements in the quest for maximizing investors' profits. Our work attempts to solve this problem through large language model-based agents. We have developed a multi-agent AI system called StockAgent, driven by LLMs, designed to simulate investors' trading behaviors in response to the real stock market. The StockAgent allows users to evaluate the impact of different external factors on investor trading and to analyze trading behavior and profitability effects. Additionally, StockAgent avoids the test set leakage issue present in existing trading simulation systems based on AI Agents. Specifically, it prevents the model from leveraging prior knowledge it may have acquired related to the test data. We evaluate different LLMs under the framework of StockAgent in a stock trading environment that closely resembles real-world conditions. The experimental results demonstrate the impact of key external factors on stock market trading, including trading behavior and stock price fluctuation rules. This research explores the study of agents' free trading gaps in the context of no prior knowledge related to market data. The patterns identified through StockAgent simulations provide valuable insights for LLM-based investment advice and stock recommendation.

## Link
ARXIV LINK: https://arxiv.org/pdf/2407.18957
## Architecture
![architect](fig/workflow2.png)

The Workflow of Trading Simulation Flow. There are four Phases, namely **Initial Phase**, **Trading Phase**, **Post-Trading Phase** and **Special Events Phase**. In the Post-Trading Phase, Daily events and Quarterly events occur with daily and quarterly frequency respectively. A Specific Events Phase is an event that occurs randomly and acts on a random trading day.

## Quick Start

#### Environment

```
conda create --name stockagent python=3.9
conda activate stockagent

git clone https://github.com/dhh1995/PromptCoder
cd PromptCoder
pip install -e .
cd ..

git clone <This Github Project>
cd Stockagent
pip install -r requirements.txt
```

#### API keys

Use GPTs as agent LLM:

```
export OPENAI_API_KEY=YOUR_OPENAI_API_KEY
```

Use Gemini as agent LLM:

```
export GOOGLE_API_KEY=YOUR_GEMINI_API_KEY
```

#### Start simulation

You can choose a basic LLM and start simulation in one line:

```
python main.py --model MODEL_NAME
```

We set gemini-pro for default LLM.

#### Citation
If you find the code is valuable, please use this citation.
```
@article{zhang2024ai,
title={When AI Meets Finance (StockAgent): Large Language Model-based Stock Trading in Simulated Real-world Environments},
author={Zhang, Chong and Liu, Xinyi and Jin, Mingyu and Zhang, Zhongmou and Li, Lingyao and Wang, Zhengting and Hua, Wenyue and Shu, Dong and Zhu, Suiyuan and Jin, Xiaobo and others},
journal={arXiv preprint arXiv:2407.18957},
year={2024}
}
```


Loading
Loading