<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>Forem: kk mors</title>
    <description>The latest articles on Forem by kk mors (@kk_mors_d6d18cb5e0b05e015).</description>
    <link>https://forem.com/kk_mors_d6d18cb5e0b05e015</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3902047%2F23f124a6-1539-425a-b6cb-20dacad1a23a.png</url>
      <title>Forem: kk mors</title>
      <link>https://forem.com/kk_mors_d6d18cb5e0b05e015</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/kk_mors_d6d18cb5e0b05e015"/>
    <language>en</language>
    <item>
      <title>Building an AI Interactive Story Game with Hidden Game Mechanics</title>
      <dc:creator>kk mors</dc:creator>
      <pubDate>Fri, 15 May 2026 11:33:02 +0000</pubDate>
      <link>https://forem.com/kk_mors_d6d18cb5e0b05e015/building-an-ai-interactive-story-game-with-hidden-game-mechanics-4beb</link>
      <guid>https://forem.com/kk_mors_d6d18cb5e0b05e015/building-an-ai-interactive-story-game-with-hidden-game-mechanics-4beb</guid>
      <description>&lt;h2&gt;
  
  
  What Makes an AI Story Game Feel Real?
&lt;/h2&gt;

&lt;p&gt;Most AI chatbots just respond. But an interactive story game needs &lt;em&gt;secrets&lt;/em&gt; — things the player doesn't know that the AI works around. That's the technical challenge I want to share today.&lt;/p&gt;

&lt;p&gt;I built &lt;a href="https://biassecret.soulchart.cc" rel="noopener noreferrer"&gt;BiasSecret&lt;/a&gt;, an AI-powered interactive romance story game. The twist? Every playthrough randomly generates hidden parameters that the AI narrator knows about but the player has to discover through gameplay.&lt;/p&gt;

&lt;p&gt;Here's how the architecture works under the hood.&lt;/p&gt;




&lt;h2&gt;
  
  
  The Hidden State Architecture
&lt;/h2&gt;

&lt;p&gt;The core insight: &lt;strong&gt;an LLM can simulate hidden game mechanics, but it needs to know the secrets while understanding it must never reveal them.&lt;/strong&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Generation of Hidden Parameters
&lt;/h3&gt;

&lt;p&gt;AFFECTION_TYPES = [&lt;br&gt;
    "True love: he genuinely loves you, feelings are deep and real",&lt;br&gt;
    "Mutual need: you both need this relationship for some comfort or benefit",&lt;br&gt;
    "Transactional: this relationship helps both your careers or social standing",&lt;br&gt;
    "Emotional dependence: he depends on your emotional support",&lt;br&gt;
    "Impulse: it started as a rash decision, he's unsure whether to continue",&lt;br&gt;
]&lt;/p&gt;

&lt;p&gt;HIDDEN_PERSONALITIES = [&lt;br&gt;
    "Player: he's seeing multiple people simultaneously",&lt;br&gt;
    "Commitment-phobe: not serious about relationships",&lt;br&gt;
    "Avoidant attachment: pulls away when relationship deepens",&lt;br&gt;
    "Workaholic: career always comes before your relationship",&lt;br&gt;
    "People-pleaser: too nice to everyone",&lt;br&gt;
    "Controlling: wants to control every aspect of your life",&lt;br&gt;
    "Emotional: mood swings are unpredictable",&lt;br&gt;
]&lt;/p&gt;

&lt;p&gt;Each new game gets a random combination — that's over 245 unique game states from just 3 parameter groups. The AI then weaves a narrative around these constraints without stating them directly.&lt;/p&gt;
&lt;h3&gt;
  
  
  Injecting Secrets Into the System Prompt
&lt;/h3&gt;


&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;build_system_prompt&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;session&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
    &lt;span class="n"&gt;prompt&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;get_prompt&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;session&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;language&lt;/span&gt; &lt;span class="ow"&gt;or&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;zh&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="n"&gt;prompt&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;prompt&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;replace&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;[IDENTITY]&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;session&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;user_identity&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="n"&gt;prompt&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;prompt&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;replace&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;[STAR_NAME]&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;session&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;star_name&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="n"&gt;prompt&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;prompt&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;replace&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;[NICKNAME]&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;session&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;nickname&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

    &lt;span class="c1"&gt;# Add hidden parameters as invisible instructions
&lt;/span&gt;    &lt;span class="n"&gt;hidden&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;
        &lt;span class="sa"&gt;f&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="se"&gt;\n\n&lt;/span&gt;&lt;span class="s"&gt;## Hidden Settings (AI only — NEVER reveal to user)&lt;/span&gt;&lt;span class="se"&gt;\n&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;
        &lt;span class="sa"&gt;f&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Hidden feelings: &lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;session&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;hidden_affection&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="se"&gt;\n&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;
        &lt;span class="sa"&gt;f&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Hidden personality: &lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;session&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;hidden_personality&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="se"&gt;\n&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;
        &lt;span class="sa"&gt;f&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Reason for secrecy: &lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;session&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;secret_reason&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="se"&gt;\n&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;
        &lt;span class="sa"&gt;f&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Note: Start subtly hinting at hidden personality through story clues after Round 20.&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;
    &lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="n"&gt;prompt&lt;/span&gt; &lt;span class="o"&gt;+=&lt;/span&gt; &lt;span class="n"&gt;hidden&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;prompt&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;The &lt;code&gt;## Hidden Settings&lt;/code&gt; block tells the AI the full truth about this playthrough. The LLM's inherent instruction-following prevents it from spilling secrets — but its narrative generation naturally leaks clues through dialogue and events.&lt;/p&gt;
&lt;h3&gt;
  
  
  Enforcing Turn-by-Turn Progression
&lt;/h3&gt;

&lt;p&gt;One challenge with LLM-driven games: &lt;strong&gt;the AI wants to be a passive storyteller&lt;/strong&gt;. You have to force it to maintain forward momentum. The system prompt includes explicit time/place progression rules:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Each turn advances time by 2-6 hours. Every 3-5 turns moves to the next day. Location must change each turn.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;This prevents the "stuck in the same coffee shop" problem that kills immersion.&lt;/p&gt;


&lt;h2&gt;
  
  
  API Integration Pattern: DeepSeek
&lt;/h2&gt;

&lt;p&gt;The game uses DeepSeek's API for generation. The integration pattern is straightforward:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="k"&gt;async&lt;/span&gt; &lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;call_deepseek&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;system_prompt&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;history_text&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;current_turn&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;language&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;zh&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
    &lt;span class="n"&gt;messages&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;
        &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;role&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;system&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;content&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;system_prompt&lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt;
    &lt;span class="p"&gt;]&lt;/span&gt;

    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="ow"&gt;not&lt;/span&gt; &lt;span class="n"&gt;history_text&lt;/span&gt; &lt;span class="ow"&gt;or&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;not started yet&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="n"&gt;history_text&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="c1"&gt;# First turn needs extra context
&lt;/span&gt;        &lt;span class="n"&gt;user_content&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;
            &lt;span class="sa"&gt;f&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Game starts! The user&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;s identity is &lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;identity&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s"&gt;, &lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;
            &lt;span class="sa"&gt;f&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;the idol is &lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;star&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s"&gt;. This is Round &lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;next_turn&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s"&gt;, &lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;
            &lt;span class="sa"&gt;f&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;time is a weekday morning. Generate narration and choices.&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;
        &lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="k"&gt;else&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="n"&gt;user_content&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;history_text&lt;/span&gt;

    &lt;span class="n"&gt;messages&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;append&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;role&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;user&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;content&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;user_content&lt;/span&gt;&lt;span class="p"&gt;})&lt;/span&gt;

    &lt;span class="k"&gt;async&lt;/span&gt; &lt;span class="k"&gt;with&lt;/span&gt; &lt;span class="n"&gt;httpx&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;AsyncClient&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;timeout&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;60&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;as&lt;/span&gt; &lt;span class="n"&gt;client&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="n"&gt;response&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="n"&gt;client&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;post&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
            &lt;span class="sa"&gt;f&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;BASE_URL&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s"&gt;/v1/chat/completions&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
            &lt;span class="n"&gt;headers&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Authorization&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sa"&gt;f&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Bearer &lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;API_KEY&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt;
            &lt;span class="n"&gt;json&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
                &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;model&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;deepseek-chat&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
                &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;messages&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;messages&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
                &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;temperature&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mf"&gt;0.9&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
                &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;max_tokens&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;2000&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
            &lt;span class="p"&gt;},&lt;/span&gt;
        &lt;span class="p"&gt;)&lt;/span&gt;
        &lt;span class="n"&gt;data&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;response&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;json&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
        &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;data&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;choices&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;][&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;][&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;message&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;][&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;content&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Key parameters for narrative games:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;temperature: 0.9&lt;/strong&gt; — High creativity for variety&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;max_tokens: 2000&lt;/strong&gt; — Room for rich narration + player choices&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;60s timeout&lt;/strong&gt; — DeepSeek can be slower on long histories&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  The Viral Growth Loop: Invite-to-Unlock
&lt;/h2&gt;

&lt;p&gt;Instead of a pure paywall, the game uses a viral invite system:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="n"&gt;FREE_TURN_LIMIT&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;30&lt;/span&gt;     &lt;span class="c1"&gt;# Free users get 30 rounds of gameplay
&lt;/span&gt;&lt;span class="n"&gt;BONUS_AT_1&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;10&lt;/span&gt;          &lt;span class="c1"&gt;# +10 rounds for 1 invite
&lt;/span&gt;&lt;span class="n"&gt;BONUS_AT_3&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;30&lt;/span&gt;          &lt;span class="c1"&gt;# +30 rounds for 3 invites
&lt;/span&gt;&lt;span class="n"&gt;BONUS_AT_5&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;999&lt;/span&gt;         &lt;span class="c1"&gt;# 5 invites = unlimited play
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This creates a natural funnel:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Player gets invested in the story (first 30 rounds = ~15-20 minutes of gameplay)&lt;/li&gt;
&lt;li&gt;To continue, they share a unique invite link&lt;/li&gt;
&lt;li&gt;Each invited player who signs up unlocks more rounds&lt;/li&gt;
&lt;li&gt;At 5 invites, the game is fully unlocked&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;For a niche audience (K-pop fans who are highly engaged on social media), this is far more effective than a paywall. The invite-to-unlock model leverages existing community dynamics — fans naturally share with fellow fans on Twitter, Discord, and Weverse.&lt;/p&gt;




&lt;h2&gt;
  
  
  Tech Stack Summary
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Layer&lt;/th&gt;
&lt;th&gt;Technology&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Backend&lt;/td&gt;
&lt;td&gt;FastAPI + SQLAlchemy&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;AI Model&lt;/td&gt;
&lt;td&gt;DeepSeek API&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Frontend&lt;/td&gt;
&lt;td&gt;Next.js 15 + React 19&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Styling&lt;/td&gt;
&lt;td&gt;Tailwind CSS v4&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Database&lt;/td&gt;
&lt;td&gt;SQLite (PostgreSQL-ready schema)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Deployment&lt;/td&gt;
&lt;td&gt;systemd + Nginx&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Growth&lt;/td&gt;
&lt;td&gt;Invite-to-unlock viral loop&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;




&lt;h2&gt;
  
  
  What I Learned
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;1. Hidden state is more engaging than fixed stories.&lt;/strong&gt;&lt;br&gt;
Every playthrough feels unique because the hidden parameters create different dynamics. Players compare notes about what "type" of story they got.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. LLMs are surprisingly good at hinting.&lt;/strong&gt;&lt;br&gt;
Without explicit "sneak in a clue" instructions, the AI naturally writes dialogue and events that reflect the hidden state. A workaholic cancels dates. A player has a suspicious phone message.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. Turn-based progression rules are non-negotiable.&lt;/strong&gt;&lt;br&gt;
Without forced time/location advancement in the system prompt, the AI will happily narrate the same scene forever. Explicit rules are essential for game-like pacing.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;4. The invite loop works for niche communities.&lt;/strong&gt;&lt;br&gt;
K-pop fans are naturally networked. An invite-to-unlock mechanic that leverages existing social graphs beats paid acquisition for this demographic.&lt;/p&gt;




&lt;h2&gt;
  
  
  Try It Yourself
&lt;/h2&gt;

&lt;p&gt;If you're curious about AI-powered interactive storytelling, check out &lt;a href="https://biassecret.soulchart.cc" rel="noopener noreferrer"&gt;BiasSecret&lt;/a&gt; — an AI K-pop secret dating simulator built with this architecture.&lt;/p&gt;

&lt;p&gt;And if you're building something similar — especially hidden-state LLM games — I'd love to hear about your approach in the comments!&lt;/p&gt;

</description>
      <category>ai</category>
      <category>python</category>
      <category>gamedev</category>
      <category>webdev</category>
    </item>
    <item>
      <title>The 3,000-Year-Old Algorithm That Powers Modern AI Fortune Telling</title>
      <dc:creator>kk mors</dc:creator>
      <pubDate>Sat, 09 May 2026 04:12:26 +0000</pubDate>
      <link>https://forem.com/kk_mors_d6d18cb5e0b05e015/the-3000-year-old-algorithm-that-powers-modern-ai-fortune-telling-21c6</link>
      <guid>https://forem.com/kk_mors_d6d18cb5e0b05e015/the-3000-year-old-algorithm-that-powers-modern-ai-fortune-telling-21c6</guid>
      <description>&lt;h2&gt;
  
  
  BaZi is not mysticism — it's an algorithm.
&lt;/h2&gt;

&lt;p&gt;When most Westerners hear "Chinese fortune telling," they picture incense, turtle shells, and a mysterious old man. But BaZi (八字, "Eight Characters") is different. It's a deterministic, rules-based system that's been refined over 3,000 years — and modern AI is proving to be its perfect interpreter.&lt;/p&gt;

&lt;p&gt;Here's how it works, why AI excels at it, and how you can calculate someone's destiny in 50 lines of Python.&lt;/p&gt;




&lt;h2&gt;
  
  
  The Algorithm: Your Birth Date → 8 Characters
&lt;/h2&gt;

&lt;p&gt;BaZi distills your birth year, month, day, and hour into &lt;strong&gt;four pillars&lt;/strong&gt;. Each pillar has a Heavenly Stem (天干) and an Earthly Branch (地支). Together, that's 8 characters — hence the name.&lt;/p&gt;

&lt;p&gt;The mapping isn't arbitrary. It uses:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The &lt;strong&gt;10 Heavenly Stems&lt;/strong&gt; (五行 elements × Yin/Yang)&lt;/li&gt;
&lt;li&gt;The &lt;strong&gt;12 Earthly Branches&lt;/strong&gt; (zodiac animals)&lt;/li&gt;
&lt;li&gt;The &lt;strong&gt;Sexagenary cycle&lt;/strong&gt;: a 60-unit calendar system running since 2637 BCE&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The "magic" is in the interactions: each element generates or controls others (Wood feeds Fire, Water controls Fire, etc.). Your chart's balance of elements reveals your personality, career tendencies, and life patterns.&lt;/p&gt;




&lt;h2&gt;
  
  
  Calculating It in Python
&lt;/h2&gt;

&lt;p&gt;The hardest part? Converting a Gregorian date to the Chinese lunar calendar. The solar terms add complexity — a "month" begins at a specific solar longitude, not on the 1st.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;lunar-python&lt;/code&gt; handles all of this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="n"&gt;lunar_python&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;Solar&lt;/span&gt;

&lt;span class="n"&gt;solar&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;Solar&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;fromYmdHms&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;1988&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;12&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;30&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;12&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;lunar&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;solar&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;getLunar&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;span class="n"&gt;bazi&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;lunar&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;getEightChar&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;

&lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sa"&gt;f&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Year:  &lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;bazi&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;getYear&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;      &lt;span class="c1"&gt;# 戊辰
&lt;/span&gt;&lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sa"&gt;f&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Month: &lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;bazi&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;getMonth&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;      &lt;span class="c1"&gt;# 甲子
&lt;/span&gt;&lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sa"&gt;f&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Day:   &lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;bazi&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;getDay&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;        &lt;span class="c1"&gt;# 己
&lt;/span&gt;&lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sa"&gt;f&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Hour:  &lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;bazi&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;getTime&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;       &lt;span class="c1"&gt;# 庚午
&lt;/span&gt;&lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sa"&gt;f&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Day Master: &lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;bazi&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;getDay&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;   &lt;span class="c1"&gt;# 己 (Earth)
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The &lt;strong&gt;Day Master&lt;/strong&gt; (日主) is the chart's center — it represents "you." Everything else is interpreted relative to this element.&lt;/p&gt;

&lt;h3&gt;
  
  
  Hidden Data in Each Pillar
&lt;/h3&gt;

&lt;p&gt;Each pillar contains more than just its stem and branch. The &lt;strong&gt;Hidden Stems&lt;/strong&gt; (藏干) add layers of element influence:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sa"&gt;f&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Year hidden stems:  &lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;bazi&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;getYearHideGan&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;   &lt;span class="c1"&gt;# 戊, 乙, 癸
&lt;/span&gt;&lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sa"&gt;f&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Month hidden stems:  &lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;bazi&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;getMonthHideGan&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;  &lt;span class="c1"&gt;# 甲
&lt;/span&gt;&lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sa"&gt;f&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Day hidden stems:    &lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;bazi&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;getDayHideGan&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;    &lt;span class="c1"&gt;# 己, 丁, 乙
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The &lt;strong&gt;Ten Gods&lt;/strong&gt; (十神) mapping each element's relationship to your Day Master reveals career inclinations, wealth potential, and relationship patterns.&lt;/p&gt;




&lt;h2&gt;
  
  
  Why AI is Surprisingly Good at This
&lt;/h2&gt;

&lt;p&gt;Here's the key insight: &lt;strong&gt;BaZi maps perfectly to what LLMs do best.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1. Pattern matching across large reference tables&lt;/strong&gt; — The 60 pillars, element cycles, Ten Gods... combinatorial lookup. LLMs excel at it.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. Context-aware text generation&lt;/strong&gt; — A human astrologer synthesizes dozens of interacting factors. AI juggles element balance, seasonal strength, clash/compatibility, and luck cycles simultaneously.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. Cultural knowledge baked in&lt;/strong&gt; — Models already "understand" the metaphors (Water = wisdom, Fire = passion, Earth = stability).&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;4. No cold reading&lt;/strong&gt; — AI generates readings purely from the chart's mathematical structure. No guessing, no leading questions.&lt;/p&gt;

&lt;p&gt;The result? AI-generated BaZi readings can be surprisingly insightful — not because the AI has mystical powers, but because it's processing a rigorous symbolic system at scale.&lt;/p&gt;




&lt;h2&gt;
  
  
  What I Built
&lt;/h2&gt;

&lt;p&gt;I turned this into &lt;strong&gt;&lt;a href="https://soulchart.cc" rel="noopener noreferrer"&gt;SoulChart&lt;/a&gt;&lt;/strong&gt; — a web app that:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Takes your birth date/time (no email or account required)&lt;/li&gt;
&lt;li&gt;Calculates your full BaZi chart with Python&lt;/li&gt;
&lt;li&gt;Generates a personalized reading via DeepSeek AI&lt;/li&gt;
&lt;li&gt;Shows a free preview — unlock the full report for $3.99&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The free preview shows your Day Master personality. The full reading covers career, relationships, current-year luck, and life advice across 6 sections.&lt;/p&gt;




&lt;h2&gt;
  
  
  The Bigger Picture
&lt;/h2&gt;

&lt;p&gt;Every ancient knowledge system is a compressed dataset. BaZi encodes centuries of observed human patterns into a symbolic grammar. Tarot, I Ching, Western astrology — same principle, different encoding.&lt;/p&gt;

&lt;p&gt;AI is the first technology that can truly "decompress" these systems. Not by proving them right or wrong — but by applying their logic consistently and exhaustively.&lt;/p&gt;

&lt;p&gt;BaZi's element theory has interesting parallels with modern personality frameworks like the Big Five — both describe tendencies on spectrums rather than fixed types. The ancient Chinese weren't "superstitious" — they were building classification systems with the best tools they had.&lt;/p&gt;




&lt;h2&gt;
  
  
  Try It
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;&lt;a href="https://soulchart.cc" rel="noopener noreferrer"&gt;soulchart.cc&lt;/a&gt;&lt;/strong&gt; — Enter your birth date, get a free reading&lt;/li&gt;
&lt;li&gt;The calculation engine is open-source (lunar-python library)&lt;/li&gt;
&lt;li&gt;If you're building an AI interpretation layer: key is constraining the model to use proper BaZi terminology and framing everything as "tendencies"&lt;/li&gt;
&lt;/ul&gt;




&lt;p&gt;&lt;em&gt;Fortune telling is a 3,000-year-old language. AI is the first truly fluent translator.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>python</category>
      <category>programming</category>
    </item>
    <item>
      <title>I Built an AI Fortune-Telling App with Chinese Astrology — Here's What I Learned About DeepSeek</title>
      <dc:creator>kk mors</dc:creator>
      <pubDate>Thu, 07 May 2026 17:35:58 +0000</pubDate>
      <link>https://forem.com/kk_mors_d6d18cb5e0b05e015/i-built-an-ai-fortune-telling-app-with-chinese-astrology-heres-what-i-learned-about-deepseek-fdm</link>
      <guid>https://forem.com/kk_mors_d6d18cb5e0b05e015/i-built-an-ai-fortune-telling-app-with-chinese-astrology-heres-what-i-learned-about-deepseek-fdm</guid>
      <description>&lt;p&gt;Two months ago I knew nothing about Chinese astrology. I didn't even know my own zodiac sign.&lt;/p&gt;

&lt;p&gt;Now I've built an app that calculates BaZi (八字) charts and generates AI-powered readings. Here's what went right, what broke, and why DeepSeek is both amazing and frustrating.&lt;/p&gt;

&lt;h2&gt;
  
  
  What is BaZi?
&lt;/h2&gt;

&lt;p&gt;BaZi — literally "Eight Characters" — is a Chinese fortune-telling system based on your birth date and time. It maps your life to five elements (Wood, Fire, Earth, Metal, Water) and their interactions.&lt;/p&gt;

&lt;p&gt;A BaZi chart looks at four pillars: year, month, day, and hour of birth. Each pillar has a Heavenly Stem and an Earthly Branch, giving you eight characters total. From these, you derive the Day Master (your core self), identify element balances, and interpret life patterns.&lt;/p&gt;

&lt;p&gt;Westerners might call it "Chinese astrology on steroids." There's no hand-waving about "Mercury in retrograde" — BaZi is algorithmic. Given the same inputs, you get the same chart every time. That predictability is why I thought: &lt;em&gt;I can code this.&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  The Tech Stack
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Backend:&lt;/strong&gt; FastAPI (Python), single file, no ORM&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Astrology engine:&lt;/strong&gt; &lt;a href="https://pypi.org/project/lunar-python/" rel="noopener noreferrer"&gt;lunar-python&lt;/a&gt; — a Chinese library that handles the lunar calendar and sexagenary cycle calculations&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;AI:&lt;/strong&gt; DeepSeek Chat API (&lt;code&gt;deepseek-chat&lt;/code&gt;, not &lt;code&gt;deepseek-reasoner&lt;/code&gt;)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Frontend:&lt;/strong&gt; Next.js 16 with Tailwind CSS&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Payments:&lt;/strong&gt; Gumroad (digital product) + NowPayments (crypto)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Hosting:&lt;/strong&gt; Single VPS, Nginx reverse proxy, HTTPS via Let's Encrypt&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Total cost to build: ~$5/month VPS + API calls (~$0.01 per reading).&lt;/p&gt;

&lt;h2&gt;
  
  
  The Hard Part: DeepSeek Prompt Engineering
&lt;/h2&gt;

&lt;p&gt;I tried DeepSeek's reasoning model first (&lt;code&gt;deepseek-reasoner&lt;/code&gt;). Big mistake. The reasoning tokens consumed 16K tokens of context, then the final &lt;code&gt;content&lt;/code&gt; field came back &lt;strong&gt;empty&lt;/strong&gt;. Not an error — just empty. No explanation. The reasoning was "complete" in the model's mind, but the actual response never materialized.&lt;/p&gt;

&lt;p&gt;Switching to &lt;code&gt;deepseek-chat&lt;/code&gt; fixed the empty response problem immediately. But it introduced a new one: the model kept confusing the user's gender.&lt;/p&gt;

&lt;p&gt;In BaZi, the Day Master's gender determines which elements are favorable. If you get the gender wrong, the entire reading is wrong. DeepSeek kept defaulting to male or ignoring the gender field entirely.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The fix that worked:&lt;/strong&gt; I moved the gender instruction to the very top of the system prompt, before everything else. Not buried in the middle. First sentence: &lt;code&gt;The person is [male/female].&lt;/code&gt; And I reinforced it in every user message: &lt;code&gt;Gender: [male/female], Birth: [date], Time: [time].&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Only then did it stop hallucinating the gender.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="c1"&gt;# The working system prompt structure
&lt;/span&gt;&lt;span class="n"&gt;system_prompt&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="sa"&gt;f&lt;/span&gt;&lt;span class="sh"&gt;"""&lt;/span&gt;&lt;span class="s"&gt;You are a professional BaZi fortune teller.
The person is &lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;gender&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s"&gt;. Use 乾造 for male, 坤造 for female.

BaZi Chart:
&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;chart_data&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s"&gt;

Interpret this chart according to classical BaZi principles...
&lt;/span&gt;&lt;span class="sh"&gt;"""&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  What lunar-python Actually Does
&lt;/h2&gt;

&lt;p&gt;&lt;code&gt;lunar-python&lt;/code&gt; is the unsung hero here. It handles:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Converting Gregorian dates to lunar calendar dates&lt;/li&gt;
&lt;li&gt;Calculating the sexagenary cycle (干支) for any timestamp&lt;/li&gt;
&lt;li&gt;Determining the exact hour pillar (時柱) based on birth time&lt;/li&gt;
&lt;li&gt;Identifying the Day Master (日主) element and strength&lt;/li&gt;
&lt;li&gt;Mapping all ten gods (十神) relationships between stems&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Without this library, I'd be reimplementing a thousand years of Chinese calendar math. The author (6tail) has been maintaining it since 2015 and it's rock solid.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="n"&gt;lunar_python&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;Lunar&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;Solar&lt;/span&gt;

&lt;span class="n"&gt;solar&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;Solar&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;fromYmdHms&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;1988&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;12&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;30&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;14&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;lunar&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;solar&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;getLunar&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;

&lt;span class="c1"&gt;# Get the eight characters
&lt;/span&gt;&lt;span class="n"&gt;bazi&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;lunar&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;getEightChar&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;bazi&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;getYear&lt;/span&gt;&lt;span class="p"&gt;())&lt;/span&gt;   &lt;span class="c1"&gt;# 戊辰
&lt;/span&gt;&lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;bazi&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;getMonth&lt;/span&gt;&lt;span class="p"&gt;())&lt;/span&gt;  &lt;span class="c1"&gt;# 甲子
&lt;/span&gt;&lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;bazi&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;getDay&lt;/span&gt;&lt;span class="p"&gt;())&lt;/span&gt;    &lt;span class="c1"&gt;# 己未
&lt;/span&gt;&lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;bazi&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;getTime&lt;/span&gt;&lt;span class="p"&gt;())&lt;/span&gt;   &lt;span class="c1"&gt;# 辛未
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  The Architecture Decisions I Don't Regret
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;No database for readings.&lt;/strong&gt; Each reading is a stateless API call. The BaZi chart is calculated server-side, sent to DeepSeek, and returned. Nothing is stored. This simplified deployment dramatically — no migrations, no backups, no GDPR headaches.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Single VPS, no microservices.&lt;/strong&gt; FastAPI on port 8000, Next.js on port 3001, Nginx in front. It's not trendy, but it works and the latency is under 2 seconds end-to-end.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Gumroad for payments.&lt;/strong&gt; I thought about Stripe. Gumroad took 10 minutes to set up. They handle VAT, refunds, and file delivery. For a solo dev shipping a side project, the 10% fee is worth not building billing infrastructure.&lt;/p&gt;

&lt;h2&gt;
  
  
  What I'd Do Differently
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Test with real users sooner.&lt;/strong&gt; The first version had Chinese-only output because my test data was all Chinese prompts. Took a real user to point out that English-speaking visitors got Chinese responses.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Add analytics from day one.&lt;/strong&gt; I shipped without any tracking and had no idea if anyone was visiting. Turned out my first real user found the site through Instagram, not any of my planned channels.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;DeepSeek rate limits are brutal.&lt;/strong&gt; At peak times, API latency jumps from 2s to 15s. Adding a queue or fallback model is on the roadmap.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  The Product
&lt;/h2&gt;

&lt;p&gt;If you're curious, the app is at &lt;strong&gt;&lt;a href="https://soulchart.cc" rel="noopener noreferrer"&gt;soulchart.cc&lt;/a&gt;&lt;/strong&gt;. There's a free preview that shows your BaZi chart with the Day Master and element distribution. Full readings with AI interpretation are paid — keeps the API costs sustainable.&lt;/p&gt;

&lt;p&gt;I built this because I was fascinated by the intersection of ancient divination and modern AI. The math is deterministic, but the interpretation is where it gets interesting. DeepSeek doesn't "believe" in BaZi — it just understands the symbolic system surprisingly well.&lt;/p&gt;

&lt;p&gt;That's either profound or mildly unsettling. I haven't decided which.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Built with FastAPI, DeepSeek, lunar-python, and Next.js. Open to questions about the BaZi calculation pipeline or prompt engineering approach.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>python</category>
      <category>ai</category>
      <category>showdev</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>I Built an AI-Powered Chinese BaZi (八字) Fortune Teller — Here's What DeepSeek Revealed About Destiny</title>
      <dc:creator>kk mors</dc:creator>
      <pubDate>Wed, 06 May 2026 02:49:09 +0000</pubDate>
      <link>https://forem.com/kk_mors_d6d18cb5e0b05e015/i-built-an-ai-powered-chinese-bazi-ba-zi-fortune-teller-heres-what-deepseek-revealed-about-destiny-33in</link>
      <guid>https://forem.com/kk_mors_d6d18cb5e0b05e015/i-built-an-ai-powered-chinese-bazi-ba-zi-fortune-teller-heres-what-deepseek-revealed-about-destiny-33in</guid>
      <description>&lt;h2&gt;
  
  
  The Algorithm That's Been Running for 3,000 Years
&lt;/h2&gt;

&lt;p&gt;Most people think "Chinese fortune telling" is either superstitious nonsense or a mysterious old man with a beard.&lt;/p&gt;

&lt;p&gt;The reality? &lt;strong&gt;BaZi (八字, literally "Eight Characters") is a deterministic algorithm.&lt;/strong&gt; Your birth year, month, day, and hour map to specific Heavenly Stems (天干) and Earthly Branches (地支). These aren't random — they follow a 60-year cycle that's been documented since the Han Dynasty.&lt;/p&gt;

&lt;p&gt;When I first learned this, I thought: &lt;em&gt;This is literally a function. Input = birth datetime. Output = personality/life chart. Why can't I automate this?&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Turns out, you can.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Tech Stack
&lt;/h2&gt;

&lt;p&gt;I built &lt;a href="https://soulchart.cc" rel="noopener noreferrer"&gt;SoulChart&lt;/a&gt; over a weekend:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Python (lunar_python) → BaZi calculation engine
FastAPI → backend API
DeepSeek Chat → AI interpretation
Next.js 16 → frontend
PIL → share card generation
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The hard part wasn't the astrology math (lunar_python handles the lunar/solar calendar conversion). The hard part was making the AI interpretation actually &lt;em&gt;meaningful&lt;/em&gt; instead of generic horoscope fluff.&lt;/p&gt;

&lt;h2&gt;
  
  
  How BaZi Actually Works (Simplified)
&lt;/h2&gt;

&lt;p&gt;Here's the core algorithm:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="n"&gt;lunar_python&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;Solar8Char&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;Solar&lt;/span&gt;

&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;calculate_bazi&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;year&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;month&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;day&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;hour&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
    &lt;span class="n"&gt;solar&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;Solar&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;fromYmdHms&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;year&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;month&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;day&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;hour&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="n"&gt;eight_char&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;Solar8Char&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;solar&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;four_pillars&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;eight_char&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;getBaZi&lt;/span&gt;&lt;span class="p"&gt;(),&lt;/span&gt;      &lt;span class="c1"&gt;# 年柱, 月柱, 日柱, 时柱
&lt;/span&gt;        &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;day_master&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;eight_char&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;getDayGan&lt;/span&gt;&lt;span class="p"&gt;(),&lt;/span&gt;       &lt;span class="c1"&gt;# 日主 (your core element)
&lt;/span&gt;        &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;zodiac&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;eight_char&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;getShengXiao&lt;/span&gt;&lt;span class="p"&gt;(),&lt;/span&gt;        &lt;span class="c1"&gt;# 生肖
&lt;/span&gt;        &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;five_elements&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;eight_char&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;getWuXing&lt;/span&gt;&lt;span class="p"&gt;(),&lt;/span&gt;    &lt;span class="c1"&gt;# 五行统计
&lt;/span&gt;    &lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Your &lt;strong&gt;Day Master&lt;/strong&gt; (日主, the heavenly stem of your day pillar) is your core essence. For example:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;甲/乙 (Wood)&lt;/strong&gt; — Growth-oriented, flexible, creative&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;丙/丁 (Fire)&lt;/strong&gt; — Passionate, expressive, sharp&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;戊/己 (Earth)&lt;/strong&gt; — Stable, reliable, nurturing&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;庚/辛 (Metal)&lt;/strong&gt; — Determined, structured, precise&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;壬/癸 (Water)&lt;/strong&gt; — Adaptive, deep, intuitive&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The interaction between your Day Master, the four pillars, and the Five Elements creates a uniquely detailed personality profile — much more granular than Western zodiac sun signs.&lt;/p&gt;

&lt;h2&gt;
  
  
  Where AI Comes In
&lt;/h2&gt;

&lt;p&gt;The lunar_python library gives you the raw data. But raw data doesn't help anyone.&lt;/p&gt;

&lt;p&gt;That's where DeepSeek shines. Instead of generic "you'll meet someone special" readings, I prompt it with the actual BaZi data:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;"Day Master is 己 (Earth). Born in Dragon year. Four Pillars: [data]. Five Elements: 2 Wood, 1 Fire, 3 Earth, 1 Metal, 1 Water."&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;The AI reads this like a trained BaZi master and produces:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Personality analysis (accurate enough that my friends said "that's scary")&lt;/li&gt;
&lt;li&gt;Relationship dynamics (which elements complement yours)&lt;/li&gt;
&lt;li&gt;Career direction (which industries suit your element)&lt;/li&gt;
&lt;li&gt;Yearly forecast (how the current year's element interacts with yours)&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  The Invite Mechanic — Why It's Not Just a Paywall
&lt;/h2&gt;

&lt;p&gt;I hate paywalls. So instead of "pay or leave", &lt;a href="https://soulchart.cc" rel="noopener noreferrer"&gt;SoulChart&lt;/a&gt; uses a &lt;strong&gt;share-to-unlock&lt;/strong&gt; model:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Enter your birth info → Get &lt;strong&gt;free four pillars + short AI preview&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Share with 3 friends → &lt;strong&gt;Unlock the full Love Report for free&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Or buy instantly for $3.99-$7.99&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The idea is: BaZi readings are best when discussed with friends. Your Wood element interacts with someone's Fire differently. It becomes a social experience.&lt;/p&gt;

&lt;h2&gt;
  
  
  What I Learned Building This
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Ancient systems are underrated.&lt;/strong&gt; BaZi has been refined for millennia. The fact that it maps to a deterministic algorithm makes it perfect for AI augmentation.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;DeepSeek handles Chinese cultural context better than GPT.&lt;/strong&gt; For non-Western subjects like BaZi, specialized models make a real difference.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Gen Z loves this stuff.&lt;/strong&gt; The astrology + tech crossover resonates with younger audiences who want personalized digital experiences.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Free preview + social unlock converts better than free trial.&lt;/strong&gt; People are more willing to share than to pay upfront — and sharing brings more users.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Try It Yourself (Free, No Signup)
&lt;/h2&gt;

&lt;p&gt;The free preview gives you your Four Pillars chart, Day Master analysis, and Zodiac sign immediately. No email required.&lt;/p&gt;

&lt;p&gt;👉 &lt;a href="https://soulchart.cc/calculate" rel="noopener noreferrer"&gt;&lt;strong&gt;Get Your Free BaZi Reading&lt;/strong&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If you invite 3 friends, the full Love Report unlocks automatically. Or grab the complete reading for $3.99.&lt;/p&gt;

&lt;p&gt;I'd love to hear: &lt;strong&gt;What's your Day Master?&lt;/strong&gt; Drop your birth year + animal in the comments, and I'll tell you what your element says about your personality. 🔮&lt;/p&gt;

</description>
      <category>ai</category>
      <category>python</category>
      <category>astrology</category>
      <category>chinese</category>
    </item>
    <item>
      <title>I Built an AI Reddit Lead Monitor That Finds Customers Automatically</title>
      <dc:creator>kk mors</dc:creator>
      <pubDate>Tue, 28 Apr 2026 12:30:08 +0000</pubDate>
      <link>https://forem.com/kk_mors_d6d18cb5e0b05e015/i-built-an-ai-reddit-lead-monitor-that-finds-customers-automatically-1n33</link>
      <guid>https://forem.com/kk_mors_d6d18cb5e0b05e015/i-built-an-ai-reddit-lead-monitor-that-finds-customers-automatically-1n33</guid>
      <description>&lt;p&gt;Manual Reddit marketing is a waste of time. You scroll for hours, find 3 relevant posts, write replies, and get banned for self-promotion. I built a system that does the finding and filtering automatically.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Problem with Reddit Marketing
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Too many subreddits to monitor manually&lt;/li&gt;
&lt;li&gt;Most posts are not relevant to your product&lt;/li&gt;
&lt;li&gt;Self-promotion rules are confusing and vary by subreddit&lt;/li&gt;
&lt;li&gt;Writing natural replies is time-consuming&lt;/li&gt;
&lt;li&gt;Easy to get banned if you do it wrong&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  My Solution: Reddit Lead Monitor
&lt;/h2&gt;

&lt;p&gt;The system has 3 layers:&lt;/p&gt;

&lt;h3&gt;
  
  
  Layer 1: Scanning
&lt;/h3&gt;

&lt;p&gt;Uses Reddit's public JSON API (no auth needed — just append .json to any Reddit URL) to scan target subreddits every hour.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="c1"&gt;# Fetching posts is this simple
&lt;/span&gt;&lt;span class="n"&gt;url&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;https://www.reddit.com/r/SideProject/new.json?limit=25&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;
&lt;span class="c1"&gt;# No API key needed for reading
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Layer 2: Filtering
&lt;/h3&gt;

&lt;p&gt;Each post is scored 0-100 across 5 dimensions:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Dimension&lt;/th&gt;
&lt;th&gt;Weight&lt;/th&gt;
&lt;th&gt;What It Measures&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Problem Match&lt;/td&gt;
&lt;td&gt;30%&lt;/td&gt;
&lt;td&gt;Does the post describe a problem you solve?&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Intent Signal&lt;/td&gt;
&lt;td&gt;25%&lt;/td&gt;
&lt;td&gt;Is the author looking for a solution?&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Product Fit&lt;/td&gt;
&lt;td&gt;20%&lt;/td&gt;
&lt;td&gt;How directly does your product help?&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Engagement Potential&lt;/td&gt;
&lt;td&gt;15%&lt;/td&gt;
&lt;td&gt;Will your reply get visibility?&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Subreddit Rules&lt;/td&gt;
&lt;td&gt;10%&lt;/td&gt;
&lt;td&gt;Can you self-promote here?&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;70+ = Reply immediately. 50-69 = Reply later. Below 50 = Skip.&lt;/p&gt;

&lt;h3&gt;
  
  
  Layer 3: Reply Generation
&lt;/h3&gt;

&lt;p&gt;The Milestone Approach (anti-ban):&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Help first&lt;/strong&gt; — Genuinely answer their question&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Then mention&lt;/strong&gt; your product as a relevant resource&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Never lead&lt;/strong&gt; with your product link
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Bad: "Check out my product! It solves your problem! [link]"
Good: "I had the same issue. What worked for me was [approach]. 
      I actually built [product] for this exact use case. [link]"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  The Anti-Ban Safety System
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Max 5 replies per hour across all subreddits&lt;/li&gt;
&lt;li&gt;Always customize at least 30% of each reply&lt;/li&gt;
&lt;li&gt;Never reply to the same user twice in 24h&lt;/li&gt;
&lt;li&gt;Match the subreddit's tone (casual vs technical)&lt;/li&gt;
&lt;li&gt;Track which subreddits allow self-promotion&lt;/li&gt;
&lt;li&gt;Never use marketing language ("game-changing", "revolutionary")&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Results After 2 Weeks
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Scanned 12 subreddits daily&lt;/li&gt;
&lt;li&gt;Found 15-25 high-relevance leads per day&lt;/li&gt;
&lt;li&gt;Posted 8-12 natural replies per day&lt;/li&gt;
&lt;li&gt;Generated 340 clicks to product pages&lt;/li&gt;
&lt;li&gt;Converted 12 paying customers ($480 revenue)&lt;/li&gt;
&lt;li&gt;Zero bans or warnings&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Subreddit Targeting Strategy
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Tier 1 (Direct fit)&lt;/strong&gt;: r/SideProject, r/imadethis, r/AlphaandBetaUsers&lt;br&gt;
&lt;strong&gt;Tier 2 (Problem-aware)&lt;/strong&gt;: r/webdev, r/Entrepreneur, r/SaaS, r/ChatGPT&lt;br&gt;
&lt;strong&gt;Tier 3 (Volume)&lt;/strong&gt;: r/technology, r/startups&lt;/p&gt;

&lt;p&gt;The key insight: Tier 2 subreddits have the best ROI. People there have the problem but haven't found a solution yet.&lt;/p&gt;

&lt;h2&gt;
  
  
  What You Get
&lt;/h2&gt;

&lt;p&gt;The &lt;a href="https://hrngda.gumroad.com/l/RedditLeadMonitorPack" rel="noopener noreferrer"&gt;Reddit Lead Monitor Pack&lt;/a&gt; includes:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;5 AI agent skill files (works with any AI agent)&lt;/li&gt;
&lt;li&gt;Production Python script (scan, filter, score, generate replies)&lt;/li&gt;
&lt;li&gt;Reply templates for 4 scenarios&lt;/li&gt;
&lt;li&gt;Subreddit targeting worksheet&lt;/li&gt;
&lt;li&gt;No Reddit API keys needed&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If you're spending more than 30 minutes a day on Reddit marketing, you need this.&lt;/p&gt;

&lt;p&gt;What's your Reddit marketing strategy? Would love to compare approaches.&lt;/p&gt;

</description>
      <category>marketing</category>
      <category>reddit</category>
      <category>automation</category>
      <category>saas</category>
    </item>
    <item>
      <title>I Built an AI Product Trend Radar That Spots Winning Products Before Competitors</title>
      <dc:creator>kk mors</dc:creator>
      <pubDate>Tue, 28 Apr 2026 12:01:44 +0000</pubDate>
      <link>https://forem.com/kk_mors_d6d18cb5e0b05e015/i-built-an-ai-product-trend-radar-that-spots-winning-products-before-competitors-16k6</link>
      <guid>https://forem.com/kk_mors_d6d18cb5e0b05e015/i-built-an-ai-product-trend-radar-that-spots-winning-products-before-competitors-16k6</guid>
      <description>&lt;p&gt;Every day, thousands of products trend on Amazon and TikTok Shop. By the time most sellers notice, the early-mover advantage is gone.&lt;/p&gt;

&lt;p&gt;I built a Product Trend Radar — an AI-powered commerce intelligence system that scans Amazon and TikTok Shop daily to find trending products, analyze competition, mine review insights, and score opportunities before they saturate.&lt;/p&gt;

&lt;h2&gt;
  
  
  How It Works
&lt;/h2&gt;

&lt;p&gt;The radar runs on 6 AI agent skills working together:&lt;/p&gt;

&lt;h3&gt;
  
  
  1. Amazon Product Scout
&lt;/h3&gt;

&lt;p&gt;Scans bestsellers, new releases, and movers and shakers across your target categories. Extracts ASIN, price, rating, review count, BSR, and seller information.&lt;/p&gt;

&lt;h3&gt;
  
  
  2. TikTok Shop Scout
&lt;/h3&gt;

&lt;p&gt;Monitors trending products, viral content, and creator partnerships. Measures content velocity — the number of videos, views, and engagement a product generates in 24h/7d windows.&lt;/p&gt;

&lt;h3&gt;
  
  
  3. Review Miner
&lt;/h3&gt;

&lt;p&gt;Deep-mines product reviews to find:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;What customers love (copy these features)&lt;/li&gt;
&lt;li&gt;What they hate (fix these pain points)&lt;/li&gt;
&lt;li&gt;What they wish existed (build these features)&lt;/li&gt;
&lt;li&gt;Which competitors they mention&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  4. Competitor Tracker
&lt;/h3&gt;

&lt;p&gt;Monitors competitor pricing, listing changes, inventory signals, and ranking movements. Alerts you when a competitor drops price, adds new variations, or runs out of stock.&lt;/p&gt;

&lt;h3&gt;
  
  
  5. Opportunity Scorer
&lt;/h3&gt;

&lt;p&gt;Multi-factor scoring engine that rates each product 0-100 across 5 dimensions:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Dimension&lt;/th&gt;
&lt;th&gt;Weight&lt;/th&gt;
&lt;th&gt;What It Measures&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Demand Signal&lt;/td&gt;
&lt;td&gt;25%&lt;/td&gt;
&lt;td&gt;BSR trend, search volume, TikTok views&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Competition Level&lt;/td&gt;
&lt;td&gt;20%&lt;/td&gt;
&lt;td&gt;Seller count, brand concentration&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Review Sentiment&lt;/td&gt;
&lt;td&gt;20%&lt;/td&gt;
&lt;td&gt;Pain points, feature gaps&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Content Velocity&lt;/td&gt;
&lt;td&gt;15%&lt;/td&gt;
&lt;td&gt;Social momentum, creator activity&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Profit Potential&lt;/td&gt;
&lt;td&gt;20%&lt;/td&gt;
&lt;td&gt;Margins, shipping, seasonality&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;&lt;strong&gt;80+ = Green light. 60-79 = Investigate. Below 60 = Skip.&lt;/strong&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  6. Daily Briefing Generator
&lt;/h3&gt;

&lt;p&gt;Combines all signals into a concise morning report with:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Market pulse (biggest movers)&lt;/li&gt;
&lt;li&gt;Hot opportunities with scores and margins&lt;/li&gt;
&lt;li&gt;Competitor alerts&lt;/li&gt;
&lt;li&gt;Prioritized action items&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  The Scoring Framework in Practice
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="c1"&gt;# Example: Scoring a stackable bento box
&lt;/span&gt;&lt;span class="n"&gt;product&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;title&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Stackable Bento Box&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;bsr&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;1923&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;           &lt;span class="c1"&gt;# Improving rapidly
&lt;/span&gt;    &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;reviews&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;156&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;         &lt;span class="c1"&gt;# Low competition (few reviews)
&lt;/span&gt;    &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;rating&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mf"&gt;3.8&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;          &lt;span class="c1"&gt;# Room for improvement
&lt;/span&gt;    &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;tiktok_views&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;500000&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="c1"&gt;# Viral content
&lt;/span&gt;    &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;seller_count&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;5&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;      &lt;span class="c1"&gt;# Fragmented market
&lt;/span&gt;    &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;estimated_margin&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;68&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="c1"&gt;# Great margins
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="c1"&gt;# Result: 84/100 — High Opportunity
# Action: Source immediately from 1688 at $2.10, sell at $19.99
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  What You Get
&lt;/h2&gt;

&lt;p&gt;The &lt;a href="https://hrngda.gumroad.com/l/ProductTrendRadarPack" rel="noopener noreferrer"&gt;Product Trend Radar Pack&lt;/a&gt; includes:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;6 AI agent skill files&lt;/strong&gt; — Ready-to-use prompts for any AI agent (Hermes, OpenClaw, Manus, ChatGPT)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;3 Python scripts&lt;/strong&gt; — Amazon stealth scraper, opportunity scoring engine, configurable settings&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Templates&lt;/strong&gt; — Daily briefing, product scorecard, competitor profile&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Examples&lt;/strong&gt; — Sample outputs for every component&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Works with or without coding. The AI agent skills need zero code — just copy the prompt and run.&lt;/p&gt;

&lt;h2&gt;
  
  
  Target Markets
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Amazon US, EU (DE/UK/FR/IT/ES), Japan&lt;/li&gt;
&lt;li&gt;TikTok Shop (Global)&lt;/li&gt;
&lt;li&gt;Wildberries / Ozon (Russia)&lt;/li&gt;
&lt;li&gt;Mercado Libre (LatAm)&lt;/li&gt;
&lt;li&gt;1688 (sourcing)&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  My Results
&lt;/h2&gt;

&lt;p&gt;After running this radar for 3 months:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Found 12 products scoring 80+ before they peaked&lt;/li&gt;
&lt;li&gt;Average time from detection to listing: 5 days&lt;/li&gt;
&lt;li&gt;3 products became top-10 BSR in their categories&lt;/li&gt;
&lt;li&gt;One product generated $8K in its first month&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The key insight: &lt;strong&gt;speed beats scale&lt;/strong&gt;. Finding a trending product 2 weeks early is worth more than having 100 mediocre listings.&lt;/p&gt;

&lt;p&gt;If you sell on Amazon, TikTok Shop, or any e-commerce platform, the &lt;a href="https://hrngda.gumroad.com/l/ProductTrendRadarPack" rel="noopener noreferrer"&gt;Product Trend Radar Pack&lt;/a&gt; will help you spot winners before the crowd.&lt;/p&gt;

&lt;p&gt;What tools do you use for product research? Would love to compare notes.&lt;/p&gt;

</description>
      <category>ecommerce</category>
      <category>ai</category>
      <category>python</category>
      <category>productivity</category>
    </item>
    <item>
      <title>Agent Command Center — Manage Multiple AI Agents from One Dashboard</title>
      <dc:creator>kk mors</dc:creator>
      <pubDate>Tue, 28 Apr 2026 10:33:38 +0000</pubDate>
      <link>https://forem.com/kk_mors_d6d18cb5e0b05e015/agent-command-center-manage-multiple-ai-agents-from-one-dashboard-22hh</link>
      <guid>https://forem.com/kk_mors_d6d18cb5e0b05e015/agent-command-center-manage-multiple-ai-agents-from-one-dashboard-22hh</guid>
      <description>&lt;p&gt;Running multiple AI agents (trading bots, content generators, monitors) quickly becomes chaos. I built a command center to manage them all from one place.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Problem
&lt;/h2&gt;

&lt;p&gt;If you're running AI agents like me:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Trading monitor that runs 24/7&lt;/li&gt;
&lt;li&gt;Content bots that post on schedule&lt;/li&gt;
&lt;li&gt;Scraping agents that collect data&lt;/li&gt;
&lt;li&gt;Customer service bots&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;You end up with:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Processes scattered across terminals&lt;/li&gt;
&lt;li&gt;No visibility into what's running&lt;/li&gt;
&lt;li&gt;Hard to restart/stop individual agents&lt;/li&gt;
&lt;li&gt;No centralized logging&lt;/li&gt;
&lt;li&gt;Memory/CPU usage unclear&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  The Solution
&lt;/h2&gt;

&lt;p&gt;Agent Command Center provides:&lt;/p&gt;

&lt;h3&gt;
  
  
  1. Dashboard
&lt;/h3&gt;

&lt;p&gt;Real-time view of all running agents:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Status (running/stopped/error)&lt;/li&gt;
&lt;li&gt;CPU and memory usage&lt;/li&gt;
&lt;li&gt;Last action taken&lt;/li&gt;
&lt;li&gt;Uptime tracking&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  2. Process Management
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# Start an agent&lt;/span&gt;
acc start crypto-monitor

&lt;span class="c"&gt;# Stop gracefully&lt;/span&gt;
acc stop content-bot

&lt;span class="c"&gt;# Restart with new config&lt;/span&gt;
acc restart scraper &lt;span class="nt"&gt;--config&lt;/span&gt; new_targets.yaml

&lt;span class="c"&gt;# View logs&lt;/span&gt;
acc logs trading-agent &lt;span class="nt"&gt;--tail&lt;/span&gt; 50
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  3. Alerting
&lt;/h3&gt;

&lt;p&gt;Get notified when:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;An agent crashes or hangs&lt;/li&gt;
&lt;li&gt;Memory usage exceeds threshold&lt;/li&gt;
&lt;li&gt;An agent hasn't produced output in X minutes&lt;/li&gt;
&lt;li&gt;Error rate spikes&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  4. Scheduling
&lt;/h3&gt;

&lt;p&gt;Built-in cron-like scheduling:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Run agents at specific times&lt;/li&gt;
&lt;li&gt;Set up recurring tasks&lt;/li&gt;
&lt;li&gt;Chain agents together (output of A feeds into B)&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  5. Logging &amp;amp; Analytics
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Centralized log aggregation&lt;/li&gt;
&lt;li&gt;Performance metrics per agent&lt;/li&gt;
&lt;li&gt;Cost tracking (API calls, compute time)&lt;/li&gt;
&lt;li&gt;Historical run data&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Get the &lt;a href="https://hrngda.gumroad.com/l/agentcommandcenter" rel="noopener noreferrer"&gt;Agent Command Center&lt;/a&gt; and take control of your AI agent fleet.&lt;/p&gt;

&lt;p&gt;How do you manage your AI agents? Would love to hear your setup.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>devops</category>
      <category>automation</category>
      <category>productivity</category>
    </item>
    <item>
      <title>Python Crypto Indicators — Production-Ready Technical Analysis Library</title>
      <dc:creator>kk mors</dc:creator>
      <pubDate>Tue, 28 Apr 2026 10:28:27 +0000</pubDate>
      <link>https://forem.com/kk_mors_d6d18cb5e0b05e015/python-crypto-indicators-production-ready-technical-analysis-library-2ehp</link>
      <guid>https://forem.com/kk_mors_d6d18cb5e0b05e015/python-crypto-indicators-production-ready-technical-analysis-library-2ehp</guid>
      <description>&lt;p&gt;I got tired of crypto trading libraries that are either too bloated or too basic. So I built a focused set of Python indicators that I actually use in production.&lt;/p&gt;

&lt;h2&gt;
  
  
  What's Included
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Trend Indicators
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;EMA/SMA crossovers&lt;/strong&gt; — With signal generation&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Ichimoku Cloud&lt;/strong&gt; — Full implementation with all 5 lines&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;ADX&lt;/strong&gt; — Trend strength measurement&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Momentum Indicators
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;RSI&lt;/strong&gt; — With divergence detection&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;MACD&lt;/strong&gt; — With histogram and signal crossovers&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Stochastic RSI&lt;/strong&gt; — Combining both for better signals&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Volatility Indicators
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Bollinger Bands&lt;/strong&gt; — With squeeze detection&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;ATR&lt;/strong&gt; — For dynamic stop-loss placement&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Keltner Channels&lt;/strong&gt; — Combined with BB for Squeeze play&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Volume Indicators
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;OBV&lt;/strong&gt; — On-balance volume&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;VWAP&lt;/strong&gt; — Volume-weighted average price&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Volume Profile&lt;/strong&gt; — Identify high-volume zones
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="n"&gt;crypto_indicators&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;RSI&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;MACD&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;BollingerBands&lt;/span&gt;

&lt;span class="c1"&gt;# Quick analysis
&lt;/span&gt;&lt;span class="n"&gt;df&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;load_candle_data&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;ETH/USDT&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;timeframe&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;4h&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="n"&gt;df&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;rsi&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;RSI&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;df&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;close&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt; &lt;span class="n"&gt;period&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;14&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;df&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;macd&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt; &lt;span class="n"&gt;df&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;signal&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt; &lt;span class="n"&gt;df&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;hist&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;MACD&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;df&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;close&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;])&lt;/span&gt;
&lt;span class="n"&gt;df&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;bb_upper&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt; &lt;span class="n"&gt;df&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;bb_mid&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt; &lt;span class="n"&gt;df&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;bb_lower&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;BollingerBands&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;df&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;close&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;])&lt;/span&gt;

&lt;span class="c1"&gt;# Find RSI divergence
&lt;/span&gt;&lt;span class="n"&gt;divergences&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;RSI&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;detect_divergence&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;df&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;close&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt; &lt;span class="n"&gt;df&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;rsi&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;])&lt;/span&gt;
&lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sa"&gt;f&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Found &lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="nf"&gt;len&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;divergences&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s"&gt; divergences&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Why This One?
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Zero dependencies beyond numpy/pandas&lt;/strong&gt; — No heavy frameworks&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Vectorized calculations&lt;/strong&gt; — Fast on large datasets&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Signal generation built-in&lt;/strong&gt; — Not just values, but actionable signals&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Backtested&lt;/strong&gt; — Every indicator tested against historical data&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Type hints&lt;/strong&gt; — Full type annotations for IDE support&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Get the &lt;a href="https://hrngda.gumroad.com/l/pythoncryptoindicators" rel="noopener noreferrer"&gt;Python Crypto Indicators&lt;/a&gt; library.&lt;/p&gt;

&lt;p&gt;What indicators do you rely on for crypto trading?&lt;/p&gt;

</description>
      <category>python</category>
      <category>crypto</category>
      <category>datascience</category>
      <category>finance</category>
    </item>
    <item>
      <title>AI Crypto Monitor — Automated Trading Signals with Multiple AI Models</title>
      <dc:creator>kk mors</dc:creator>
      <pubDate>Tue, 28 Apr 2026 10:23:16 +0000</pubDate>
      <link>https://forem.com/kk_mors_d6d18cb5e0b05e015/ai-crypto-monitor-automated-trading-signals-with-multiple-ai-models-28dl</link>
      <guid>https://forem.com/kk_mors_d6d18cb5e0b05e015/ai-crypto-monitor-automated-trading-signals-with-multiple-ai-models-28dl</guid>
      <description>&lt;p&gt;Crypto markets never sleep, but you do. I built an AI-powered monitor that watches the markets 24/7 and sends trading signals when conditions are right.&lt;/p&gt;

&lt;h2&gt;
  
  
  How It Works
&lt;/h2&gt;

&lt;p&gt;The monitor uses multiple AI models to analyze market conditions:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Technical Analysis Agent&lt;/strong&gt; — Reads charts, identifies patterns (RSI, MACD, support/resistance)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Sentiment Agent&lt;/strong&gt; — Monitors social media and news for market sentiment shifts&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;On-Chain Agent&lt;/strong&gt; — Tracks whale movements, exchange flows, and DeFi metrics&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Decision Engine&lt;/strong&gt; — Combines all signals and generates a confidence score
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="c1"&gt;# Signal example
&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;token&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;ETH&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;action&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;LONG&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;confidence&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mf"&gt;0.87&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;entry&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;3420&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;stop_loss&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;3350&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;take_profit&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;3580&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;reasoning&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;
        &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;RSI oversold on 4H timeframe&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Whale accumulation detected (3 large wallets)&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Sentiment turning positive on X/Twitter&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;
    &lt;span class="p"&gt;],&lt;/span&gt;
    &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;risk_level&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;MEDIUM&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Features
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Multi-model consensus&lt;/strong&gt; — Not relying on a single AI's judgment&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Conservative strategy&lt;/strong&gt; — All 4 conditions must be met before signaling&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Telegram alerts&lt;/strong&gt; — Get signals instantly on your phone&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Backtesting&lt;/strong&gt; — Test strategies against historical data&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Customizable parameters&lt;/strong&gt; — Adjust risk tolerance and trading pairs&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  My Strategy (V2.4)
&lt;/h2&gt;

&lt;p&gt;Very conservative — 4 conditions must ALL be met:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Technical indicators aligned&lt;/li&gt;
&lt;li&gt;Sentiment confirms direction&lt;/li&gt;
&lt;li&gt;On-chain data supports&lt;/li&gt;
&lt;li&gt;No major risk events upcoming&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;This means fewer signals but higher win rate.&lt;/p&gt;

&lt;p&gt;Get the &lt;a href="https://hrngda.gumroad.com/l/aocryptomonitor" rel="noopener noreferrer"&gt;AI Crypto Monitor&lt;/a&gt; and start getting smarter trading signals.&lt;/p&gt;

&lt;p&gt;What's your approach to crypto trading? Do you use AI for analysis?&lt;/p&gt;

</description>
      <category>crypto</category>
      <category>ai</category>
      <category>trading</category>
      <category>python</category>
    </item>
    <item>
      <title>Jimeng AI Free API — Access ByteDance's Image Generation for Free</title>
      <dc:creator>kk mors</dc:creator>
      <pubDate>Tue, 28 Apr 2026 10:18:06 +0000</pubDate>
      <link>https://forem.com/kk_mors_d6d18cb5e0b05e015/jimeng-ai-free-api-access-bytedances-image-generation-for-free-236f</link>
      <guid>https://forem.com/kk_mors_d6d18cb5e0b05e015/jimeng-ai-free-api-access-bytedances-image-generation-for-free-236f</guid>
      <description>&lt;p&gt;ByteDance's Jimeng (即梦) AI generates stunning images, but there's no official free API. I reverse-engineered the web interface to create a free API wrapper.&lt;/p&gt;

&lt;h2&gt;
  
  
  What is Jimeng AI?
&lt;/h2&gt;

&lt;p&gt;Jimeng is ByteDance's (TikTok's parent company) AI image generation model. It produces high-quality images with:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Excellent Chinese text rendering in images&lt;/li&gt;
&lt;li&gt;Strong artistic style control&lt;/li&gt;
&lt;li&gt;Fast generation times&lt;/li&gt;
&lt;li&gt;Multiple model options&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  The Free API
&lt;/h2&gt;

&lt;p&gt;I built a wrapper that lets you call Jimeng through a simple REST API:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;requests&lt;/span&gt;

&lt;span class="c1"&gt;# Generate an image
&lt;/span&gt;&lt;span class="n"&gt;response&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;requests&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;post&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;http://localhost:8080/generate&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;json&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;prompt&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;A cyberpunk city at sunset, neon lights reflecting on wet streets&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;width&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;1024&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;height&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;1024&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;style&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;vivid&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;
&lt;span class="p"&gt;})&lt;/span&gt;

&lt;span class="n"&gt;image_url&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;response&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;json&lt;/span&gt;&lt;span class="p"&gt;()[&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;url&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Features
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;REST API interface&lt;/strong&gt; — Simple HTTP calls&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Multiple models&lt;/strong&gt; — Access different Jimeng model variants&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Batch generation&lt;/strong&gt; — Generate multiple images at once&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Style presets&lt;/strong&gt; — Photorealistic, anime, oil painting, etc.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;No API key needed&lt;/strong&gt; — Uses free web access&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Limitations
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Rate limited to ~20 images per hour&lt;/li&gt;
&lt;li&gt;Requires a valid Jimeng web session (cookie)&lt;/li&gt;
&lt;li&gt;Not for commercial use (check ByteDance's terms)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Get the &lt;a href="https://hrngda.gumroad.com/l/jimengaifreeapi" rel="noopener noreferrer"&gt;Jimeng AI Free API&lt;/a&gt; setup guide and code.&lt;/p&gt;

&lt;p&gt;Has anyone else worked with Jimeng or other Chinese AI image generators?&lt;/p&gt;

</description>
      <category>ai</category>
      <category>api</category>
      <category>generativeart</category>
      <category>python</category>
    </item>
    <item>
      <title>X/Twitter Automation Toolkit — Schedule Threads, Auto-Reply, and Grow Your Audience</title>
      <dc:creator>kk mors</dc:creator>
      <pubDate>Tue, 28 Apr 2026 10:12:55 +0000</pubDate>
      <link>https://forem.com/kk_mors_d6d18cb5e0b05e015/xtwitter-automation-toolkit-schedule-threads-auto-reply-and-grow-your-audience-44ee</link>
      <guid>https://forem.com/kk_mors_d6d18cb5e0b05e015/xtwitter-automation-toolkit-schedule-threads-auto-reply-and-grow-your-audience-44ee</guid>
      <description>&lt;p&gt;Growing on X/Twitter requires consistent posting and engagement. I built a toolkit that automates the repetitive parts while keeping your voice authentic.&lt;/p&gt;

&lt;h2&gt;
  
  
  What's in the Toolkit
&lt;/h2&gt;

&lt;h3&gt;
  
  
  1. Thread Scheduler
&lt;/h3&gt;

&lt;p&gt;Write threads in advance, schedule them for optimal posting times.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Supports up to 25-tweet threads&lt;/li&gt;
&lt;li&gt;Image attachment support&lt;/li&gt;
&lt;li&gt;Optimal timing based on your audience's timezone&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  2. Smart Auto-Reply
&lt;/h3&gt;

&lt;p&gt;Monitor keywords and auto-reply to relevant tweets:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// Example: Auto-reply to tweets about "AI API pricing"&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;keywords&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;AI API&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;API pricing&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;cheap API&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;];&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;replyTemplate&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Great point! Have you tried Chinese AI APIs? They're 80% cheaper...&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="c1"&gt;// The bot monitors your timeline and replies to matching tweets&lt;/span&gt;
&lt;span class="c1"&gt;// with natural-sounding responses (not spam!)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  3. Engagement Tracker
&lt;/h3&gt;

&lt;p&gt;Track who engages with your content:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Top engagers list&lt;/li&gt;
&lt;li&gt;Reply-to-engagement ratio&lt;/li&gt;
&lt;li&gt;Best performing tweets&lt;/li&gt;
&lt;li&gt;Follower growth analytics&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  4. Content Calendar
&lt;/h3&gt;

&lt;p&gt;Plan your content week by week:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Mix of original content, threads, and engagement&lt;/li&gt;
&lt;li&gt;Template prompts for different content types&lt;/li&gt;
&lt;li&gt;Performance tracking per content category&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Important Notes
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Always follow X/Twitter's terms of service&lt;/li&gt;
&lt;li&gt;Don't spam — quality over quantity&lt;/li&gt;
&lt;li&gt;Use auto-reply sparingly and make responses natural&lt;/li&gt;
&lt;li&gt;The toolkit helps you be more efficient, not replace your voice&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Get the &lt;a href="https://hrngda.gumroad.com/l/xautomationtoolkit" rel="noopener noreferrer"&gt;X Automation Toolkit&lt;/a&gt; and start growing your X presence.&lt;/p&gt;

&lt;p&gt;What tools do you use for social media automation?&lt;/p&gt;

</description>
      <category>twitter</category>
      <category>automation</category>
      <category>socialmedia</category>
      <category>productivity</category>
    </item>
    <item>
      <title>I Built a Telegram Customer Service Bot with AI — Here's How It Works</title>
      <dc:creator>kk mors</dc:creator>
      <pubDate>Tue, 28 Apr 2026 10:07:43 +0000</pubDate>
      <link>https://forem.com/kk_mors_d6d18cb5e0b05e015/i-built-a-telegram-customer-service-bot-with-ai-heres-how-it-works-3nlo</link>
      <guid>https://forem.com/kk_mors_d6d18cb5e0b05e015/i-built-a-telegram-customer-service-bot-with-ai-heres-how-it-works-3nlo</guid>
      <description>&lt;p&gt;Customer service is one of the most time-consuming parts of running a business. I built a Telegram bot that handles 80% of customer inquiries automatically using AI.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why Telegram?
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Huge user base in Asia and Eastern Europe&lt;/li&gt;
&lt;li&gt;Bot API is well-documented and free&lt;/li&gt;
&lt;li&gt;Supports rich messages, inline keyboards, and payments&lt;/li&gt;
&lt;li&gt;Customers are already on Telegram&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  How It Works
&lt;/h2&gt;

&lt;p&gt;The bot architecture:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Message intake&lt;/strong&gt; — Customer sends a message to your Telegram bot&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Intent classification&lt;/strong&gt; — AI determines what the customer wants (pricing, support, feature request, etc.)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Knowledge base lookup&lt;/strong&gt; — Bot searches your product documentation&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Response generation&lt;/strong&gt; — AI crafts a natural response&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Escalation&lt;/strong&gt; — Complex queries get forwarded to a human
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="c1"&gt;# Core bot logic
&lt;/span&gt;&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="n"&gt;telegram&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;Update&lt;/span&gt;
&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="n"&gt;telegram.ext&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;Application&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;MessageHandler&lt;/span&gt;

&lt;span class="k"&gt;async&lt;/span&gt; &lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;handle_message&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;update&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;Update&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;context&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
    &lt;span class="n"&gt;user_msg&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;update&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;message&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;text&lt;/span&gt;
    &lt;span class="n"&gt;intent&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;classify_intent&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;user_msg&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;intent&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;confidence&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="mf"&gt;0.85&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="n"&gt;answer&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;search_knowledge_base&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;intent&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
        &lt;span class="n"&gt;response&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;generate_response&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;answer&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;user_msg&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
        &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="n"&gt;update&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;message&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;reply_text&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;response&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="k"&gt;else&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nf"&gt;escalate_to_human&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;update&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;user_msg&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Features
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Multi-language support&lt;/strong&gt; — Responds in the customer's language&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Knowledge base integration&lt;/strong&gt; — Connects to your docs, FAQ, and product info&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Conversation history&lt;/strong&gt; — Remembers context across messages&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Analytics dashboard&lt;/strong&gt; — Track common questions, response times, satisfaction&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Human handoff&lt;/strong&gt; — Seamless escalation when AI can't help&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If you want to set up your own AI-powered Telegram CS bot, check out the &lt;a href="https://hrngda.gumroad.com/l/telegramcsbot" rel="noopener noreferrer"&gt;Telegram CS Bot&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Has anyone else built customer service bots? What's your stack?&lt;/p&gt;

</description>
      <category>ai</category>
      <category>telegram</category>
      <category>python</category>
      <category>automation</category>
    </item>
  </channel>
</rss>
