{"id":29617503,"url":"https://github.com/hakdogan/financial-agent","last_synced_at":"2026-04-11T01:56:38.236Z","repository":{"id":305324573,"uuid":"1020774528","full_name":"hakdogan/financial-agent","owner":"hakdogan","description":"This is a financial AI agent that utilizes function calling to invoke application-specific methods in response to user prompts.","archived":false,"fork":false,"pushed_at":"2025-07-19T11:51:05.000Z","size":14,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-07-19T16:22:20.577Z","etag":null,"topics":["ai-agents","langchain","ollama","quarkus"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/hakdogan.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-07-16T11:25:35.000Z","updated_at":"2025-07-19T11:51:08.000Z","dependencies_parsed_at":"2025-07-19T16:30:48.077Z","dependency_job_id":"2a911093-79f2-4b4d-acc1-41eda233867f","html_url":"https://github.com/hakdogan/financial-agent","commit_stats":null,"previous_names":["hakdogan/financial-agent"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/hakdogan/financial-agent","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hakdogan%2Ffinancial-agent","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hakdogan%2Ffinancial-agent/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hakdogan%2Ffinancial-agent/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hakdogan%2Ffinancial-agent/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hakdogan","download_url":"https://codeload.github.com/hakdogan/financial-agent/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hakdogan%2Ffinancial-agent/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266226982,"owners_count":23895728,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ai-agents","langchain","ollama","quarkus"],"created_at":"2025-07-21T02:01:07.675Z","updated_at":"2026-04-11T01:56:36.625Z","avatar_url":"https://github.com/hakdogan.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# financial-agent\n\n`financial-agent` is an AI-powered financial assistant built with [Quarkus's](https://quarkus.io/), [Ollama](https://ollama.com/) and [LangChain4j](https://github.com/langchain4j/langchain4j) extensions.  \nIt leverages **function calling** to query real-time stock, currency, and precious metal prices from external APIs.\n\n## ✨ Features\n\n- 💱 **Exchange Rates**: Fetches real-time stock and currency exchange rates using the [Alpha Vantage API](https://www.alphavantage.co/).\n- 🪙 **Precious Metals Prices**: Retrieves current metal prices (gold, silver, etc.) using the [GoldAPI](https://www.goldapi.io/).\n- 🧠 **LLM-powered reasoning**: Uses [Ollama](https://ollama.com/) and [LangChain](https://www.langchain.com/) for intelligent prompt interpretation and function calling.\n- 🐳 **Automatic Ollama Integration**: If Docker or Podman is available, the Ollama instance is automatically launched by Quarkus during dev mode.\n\n## 🚀 Getting Started\n\n### Prerequisites\n\n- JDK 17+\n- Maven 3.8+\n- Docker or Podman (for automatic Ollama instance startup)\n- Alpha Vantage and GoldAPI API keys\n\n### Run in development mode\nYou can start the application with your API keys as system properties:\n```bash\nmvn -DEXCHANGE_API_KEY=your_alpha_vantage_key -DMETAL_API_KEY=your_goldapi_key quarkus:dev\n```\n\n\u003e ℹ️ During startup, if Docker or Podman is available, Quarkus will automatically launch an Ollama container.\n\n### 🐳 Run with Docker Compose\nYou can also run the application and Ollama together using Docker Compose.\n\n1. Set your API keys\n   Create a `.env` file in the project root:\n\n```bash\nEXCHANGE_API_KEY=your_alpha_vantage_key\nMETAL_API_KEY=your_goldapi_key\n```\n\n2. Build the JAR\n```bash\nmvn clean package -DskipTests\n```\n3. Start with Docker Compose\n```bash\ndocker-compose up --build\n```\nThis will:\n\n- Start an Ollama container and automatically download the llama3:2 model.\n- Start your Quarkus-based financial agent service.\n- Connect both services in the same Docker network.\n\n## 🛠️ Configuration\n| Property\t      | Description                | \tExample                    |\n|----------------|----------------------------|-----------------------------|\n| EXCHANGE_API_KEY\t | API key for Alpha Vantage  | \tABC123XYZ                  |\n| METAL_API_KEY\t | API key for GoldAPI | \tgoldapi-xxxxxxxx-xxxx-xxxx |\n| OLLAMA_BASE_URL |\tBase URL for Ollama service (optional) | http://ollama:11434 |\n\n### Example Prompts\n\n```bash\nhttp GET \"http://localhost:10001/api/v1/exchange/1 dolar kaç Türk lirası?\"\n\n1 dolar 40.24630000 Türk lirasıdır. Güncellenme tarihi: 2025-07-16 13:54:11.\n\nhttp GET \"http://localhost:10001/api/v1/exchange/Altının ons fiyatı ne kadar?\"\n\nAltının (XAU) ons fiyatı şu anda 3323.72 USD'dir.\n\nhttp GET \"http://localhost:10001/api/v1/exchange/Apple güncel fiyatı nedir?\"\n\nApple'ın (AAPL) güncel fiyatı 211,18 USD'dir.\n```\n\n### A2A Support\n\n[A2A](https://developers.googleblog.com/en/a2a-a-new-era-of-agent-interoperability/) is an open protocol that provides a standard way for agents to collaborate with each other, regardless of the underlying framework or vendor. \n\nIn this example, the Financial Assistant exposes its capabilities to the outside, depending on the A2A protocol.\n\nWhen the application is running, and you visit the [agent-card.json](http://localhost:10001/.well-known/agent-card.json) link, you should get an output similar to the one below.\n\n```json\n{\n  \"name\": \"Financial Assistant Agent\",\n  \"description\": \"Provides financial information\",\n  \"url\": \"http://localhost:10001\",\n  \"version\": \"1.0.0\",\n  \"capabilities\": {\n    \"streaming\": true,\n    \"pushNotifications\": false,\n    \"stateTransitionHistory\": false\n  },\n  \"defaultInputModes\": [\n    \"text\"\n  ],\n  \"defaultOutputModes\": [\n    \"text\"\n  ],\n  \"skills\": [\n    {\n      \"id\": \"financial_assistant\",\n      \"name\": \"Financial Assistant\",\n      \"description\": \"Provides real-time stock prices, exchange rates, and precious metals pricing.\",\n      \"tags\": [\n        \"financial\"\n      ],\n      \"examples\": [\n        \"What is the current dollar-TL exchange rate?\",\n        \"What is the price of gold per ounce?\",\n        \"How many dollars is a Tesla?\"\n      ]\n    }\n  ],\n  \"supportsAuthenticatedExtendedCard\": false,\n  \"additionalInterfaces\": [\n    {\n      \"transport\": \"JSONRPC\",\n      \"url\": \"http://localhost:10001\"\n    }\n  ],\n  \"preferredTransport\": \"JSONRPC\",\n  \"protocolVersion\": \"0.3.0.Alpha1\"\n}\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhakdogan%2Ffinancial-agent","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhakdogan%2Ffinancial-agent","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhakdogan%2Ffinancial-agent/lists"}