microsoft / microsoft/agentsleague

Project: Creative Apps - Market Bard AI Financial Storyteller

Open
#80 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

🎨 Creative Apps
Dominant language
No language data
Stars
286
Forks
92
Avg merge
12h 44m
Merged PRs (30d)
1

Description

Track

Creative Apps (GitHub Copilot)

Project Name

Market Bard - AI Financial Storyteller

GitHub Username

@writejrc

Repository URL

https://github.com/writejrc/market-bard

Project Description

[Creative Apps] Market Bard - AI Financial Storyteller

🚀 Project Overview

Market Bard is a lightweight Python CLI application that transforms dry, real-time financial data into entertaining micro-fiction.

Built for the Microsoft Agents League (Creative Apps track), the tool proves that agentic AI can take strictly quantitative data (like a stock's daily price and delta) and instantly wrap it in highly stylized, thematic narratives. By passing a stock ticker and a "Persona" argument, the Gemini-powered agent adapts its storytelling voice on the fly—from a 1920s Gangster reacting to a market dip, to an Overcaffeinated Data Engineer explaining a surge.

Demo Video or Screenshots

Demo Video: https://youtu.be/80mHkYES2jk

Primary Programming Language

Python

Key Technologies Used

AI Engine: Google Gemini 2.5 Flash (google-genai SDK)
Financial Data: Alpha Vantage API (Real-time Global Quote)
UI/Formatting:rich Python library (for terminal rendering and text wrapping)
Environment: Python 3, dotenv

Submission Type

Individual

Team Members

No response

Submission Requirements
  • My project meets the track-specific challenge requirements
  • My repository includes a comprehensive README.md with setup instructions
  • My code does not contain hardcoded API keys or secrets
  • I have included demo materials (video or screenshots)
  • My project is my own work with proper attribution for any third-party code
  • I agree to the Code of Conduct
  • I have read and agree to the Disclaimer
  • My submission does NOT contain any confidential, proprietary, or sensitive information
  • I confirm I have the rights to submit this content and grant the necessary licenses
Quick Setup Summary
  1. The user executes the CLI command: python app.py [TICKER] --persona "[ANY PERSONA]"
  2. The script hits the Alpha Vantage REST API to fetch the live price and daily change of the requested stock.
  3. The data is injected into a prompt structure instructing the Gemini Agent to act as the specified persona and generate exactly three sentences explaining the market movement.
  4. The response is passed through the rich library to render a perfectly formatted, 80-character-wide ASCII "trading card" directly in the terminal.
Technical Highlights

Built for the Microsoft Agents League (Creative Apps track), the tool proves that agentic AI can take strictly quantitative data (like a stock's daily price and delta) and instantly wrap it in highly stylized, thematic narratives. By passing a stock ticker and a "Persona" argument, the Gemini-powered agent adapts its storytelling voice on the fly—from a 1920s Gangster reacting to a market dip, to an Overcaffeinated Data Engineer explaining a surge.

Challenges & Learnings

Challenges: The biggest hurdle was balancing the AI's creative freedom with standard safety guardrails. When fetching data for a stock that was down significantly (e.g., NVDA dropping $7), the "1920s Gangster" persona naturally generated gritty mobster dialogue to describe the financial loss. This repeatedly tripped the default HARM_CATEGORY_DANGEROUS_CONTENT filter mid-sentence, causing the terminal UI to crash as it tried to render an incomplete string.

Fix: I engineered a custom GenerateContentConfig to explicitly lower the safety thresholds for both dangerous content and harassment, strictly for this application's execution environment. Additionally, I had to hardcode text-wrapping logic (expand=False, width=80) into the rich panel, as the AI generated its stories as single continuous strings that would otherwise shatter the terminal UI on smaller screens.

Contact Information

writejrc@gmail.com

Country/Region

Unites States

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

This issue is a project submission rather than a scoped change; the payload identifies app.py, README.md, and the CLI command python app.py [TICKER] --persona "[ANY PERSONA]". Read the README and run the command first, but no implementation target or completion criteria are specified in the issue.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
ai, cli, fintech-quant
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.