HRiggs cf0693f319
Build Release EXE / build-windows-exe (release) Successful in 51s
versioning: 0.0.9
2026-06-09 11:24:33 -04:00
2026-06-09 11:24:15 -04:00
2026-06-09 11:24:33 -04:00
2026-06-09 11:24:15 -04:00
2026-06-09 11:24:15 -04:00
2026-06-09 11:24:33 -04:00
2026-06-08 23:41:46 -04:00
2026-06-08 23:41:46 -04:00
2026-06-08 23:41:46 -04:00
2026-06-09 11:24:33 -04:00
2026-06-08 23:41:46 -04:00

TraderAI

Local Ollama-, DeepSeek-, OpenAI-, or Codex-powered chat for UEX marketplace workflows.

What It Does

  • Searches active/current UEX marketplace listings through GET /marketplace_listings/.
  • Searches SCMDB mission data so the assistant can answer what Star Citizen missions pay or reward, including UEC, reputation, item rewards, blueprint rewards, partial payouts, and hauling cargo.
  • Searches Cornerstone Universal Item Finder data so the assistant can find where in-game items are sold, including store/location, base price, and verified date.
  • Reads authenticated marketplace negotiations and negotiation messages when UEX_SECRET_KEY or UEX_BEARER_TOKEN is set.
  • Drafts negotiation messages and marketplace listings as pending actions.
  • Requires browser approval before sending authenticated write requests to UEX.
  • Maintains local SQLite memory with searchable recall for user facts, preferences, and prior chat context.
  • Can create one-time or recurring wake jobs that prompt the assistant later and surface the result in the UI.
  • Loads the configured UEX user profile from GET /user so the assistant knows the current account username, display name, timezone, language, and marketplace-relevant profile details.
  • Polls authenticated GET /user_notifications for unread UEX notifications and surfaces new pending alerts in the chat notification queue.

Setup

  1. Install Python 3.11+.

  2. Install Ollama and pull a tool-capable model, for example:

    ollama pull qwen3.5:9b
    
  3. Create .env from .env.example and set UEX_SECRET_KEY and/or UEX_BEARER_TOKEN if you want authenticated actions. If you want the cheapest hosted default, set MODEL_PROVIDER=deepseek, set DEEPSEEK_API_KEY, and keep DEEPSEEK_MODEL=deepseek-v4-flash unless you specifically want deepseek-v4-pro. If you want to use OpenAI instead of Ollama, set MODEL_PROVIDER=openai, set OPENAI_API_KEY, and optionally change OPENAI_MODEL from the default gpt-5.4-mini. If you want to use Codex models with ChatGPT/Codex OAuth, install the Codex CLI, set MODEL_PROVIDER=codex, and optionally change CODEX_MODEL from the default gpt-5.4. TraderAI uses the local codex app-server JSON-RPC interface for both authentication and chat turns. MODEL_REASONING_EFFORT controls reasoning depth for DeepSeek, OpenAI, and Codex and defaults to medium. SCMDB_BASE_URL defaults to https://scmdb.net. CORNERSTONE_BASE_URL defaults to https://finder.cstone.space.

  4. Install and run:

    pip install -e .
    uvicorn traderai.server:app --reload
    
  5. Open http://127.0.0.1:8000.

Notes

Ollama runs locally at http://localhost:11434 by default. This app can talk to Ollama's native chat API, DeepSeek's OpenAI-compatible Chat Completions API, OpenAI's Chat Completions API, or the local Codex App Server authenticated through ChatGPT/Codex OAuth, then executes approved UEX calls in the FastAPI backend. OLLAMA_NUM_CTX controls the per-request Ollama context window; 64512 is the default because Ollama recommends at least 64k tokens for agent-style workflows when hardware allows it. DeepSeek context caching is provider-side and automatic when repeated prompt prefixes line up.

Releases And Updates

Change the app version before cutting a release:

.\scripts\set_version.ps1 0.2.0

Create a Gitea release with a matching tag such as v0.2.0. The release workflow builds dist\TraderAI.exe and attaches only that exe to the release.

The desktop app can check https://git.hudsonriggs.systems/LambdaBankingConglomerate/TraderAI/releases from Settings > Updates. When a newer release has a TraderAI.exe attachment, the packaged app downloads it to the user app data update folder, exits, replaces the current exe, and relaunches.

UEX marketplace posting and negotiation messages are guarded because they are account-affecting write actions. The model can draft them, but the UI approval button performs the final API call.

The assistant gets runtime context on every chat: current date/time, authenticated UEX identity when credentials are configured, remembered user profile, last interaction time, relevant memories, and recent conversation excerpts. It is instructed to prefer open/current marketplace data, avoid historical sale information unless explicitly requested, and treat UEX prices as in-game aUEC/UEC credits rather than real-world dollars. Memory is stored locally at TRADERAI_MEMORY_PATH.

Wake jobs can be created from chat, for example:

At 9 PM remind yourself to check my open Polaris Bit negotiations.

or:

Every day at 9 AM, wake up and check whether I have marketplace followups.

The scheduler accepts one-time ISO datetimes and five-field cron expressions through the schedule_wake_job tool. When a wake job fires, the assistant receives context like the current time and last interaction time, then places its response into the UI notification queue.

UEX notifications are checked every UEX_NOTIFICATION_POLL_SECONDS seconds by default. New unread notifications are deduplicated locally, then displayed in the chat through the same notification queue used by wake jobs.

Sources Used

S
Description
A AI for UEX
Readme 2.1 MiB
Languages
JavaScript 69.7%
Python 26.6%
CSS 2.2%
HTML 1.4%