explaingit

mhdashikofficial/tenshi-ai-agent

Analysis updated 2026-05-18

22PythonAudience · developerComplexity · 4/5Setup · hard

TLDR

A Python trading bot that uses an AI model to decide trades, backed by hard-coded stop-loss and take-profit rules, reporting activity to Telegram.

Mindmap

mindmap
  root((repo))
    What it does
      AI-driven trading
      Hard-coded risk rules
      Runs continuously
    Tech stack
      Python
      Gemini OpenRouter Ollama
      Telegram
    Risk controls
      2 percent stop-loss
      10 percent take-profit
    Reporting
      Telegram notifications
      Hourly summaries
    Setup
      Broker API key
      AI provider key

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

USE CASE 1

Run an automated trading bot with AI-driven buy and sell decisions.

USE CASE 2

Get live trade notifications and daily balance reports via Telegram.

USE CASE 3

Enforce hard stop-loss and take-profit limits around an AI's trading decisions.

What is it built with?

PythonTelegramGeminiOpenRouterOllama

How does it compare?

mhdashikofficial/tenshi-ai-agentagno-agi/agent-platform-railwayalexantaluo0/acot-vla-wm
Stars222222
LanguagePythonPythonPython
Setup difficultyhardmoderatehard
Complexity4/54/55/5
Audiencedeveloperdeveloperresearcher

Figures from each repo's GitHub metadata at analysis time.

How do you get it running?

Difficulty · hard Time to first run · 1h+

Requires a broker API key, an AI provider key, and a Telegram bot token.

In plain English

Tenshi AI Agent is a Python program that trades financial assets automatically, using an AI language model to read market conditions and decide what to buy or sell. The agent runs on its own once started, looping through market data, consulting an AI for decisions, and placing orders without human input. It is designed to run continuously on a remote server so that it can trade around the clock. The key idea behind the project is that it does not just ask the AI what to do and hope for the best. Instead, the code wraps every trade with hard-coded rules written in Python. If a position drops by 2 percent or gains 10 percent, the program forces an immediate close regardless of what the AI says. This means the AI cannot accidentally ignore a stop-loss rule the way a purely conversational system might. Risk limits are enforced by code, not by the model's reasoning. To keep costs down, the agent does not send raw market data to the AI. It pre-processes the feeds in Python, extracts the most important signals, and sends only a short summary. According to the README, this cuts the number of AI tokens used by over 80 percent compared to passing full data dumps. The agent supports several AI providers, including Google Gemini and models accessed through OpenRouter or a locally running Ollama setup. Results and activity are broadcast to a Telegram channel automatically. The agent sends live trade notifications, hourly market summaries, and daily balance reports in a readable format. It also saves its conversational memory to a file so that context is preserved if the program restarts. Setting it up requires a Python 3.9 environment, API keys for a broker (the README references an AI4TRADE token), at least one AI provider key, and a Telegram bot token. The README includes a deployment script that pushes updates to a remote server. The codebase is split into folders for the core AI loop, trading and risk logic, and utility functions for data processing and Telegram formatting.

Copy-paste prompts

Prompt 1
Help me set up API keys for Tenshi AI Agent's broker and AI provider.
Prompt 2
Explain how the stop-loss and take-profit rules work in this trading agent.
Prompt 3
Show me how to switch the AI provider to a local Ollama model.
Prompt 4
Walk me through deploying Tenshi AI Agent to a remote server.

Frequently asked questions

What is tenshi-ai-agent?

A Python trading bot that uses an AI model to decide trades, backed by hard-coded stop-loss and take-profit rules, reporting activity to Telegram.

What language is tenshi-ai-agent written in?

Mainly Python. The stack also includes Python, Telegram, Gemini.

How hard is tenshi-ai-agent to set up?

Setup difficulty is rated hard, with roughly 1h+ to a first successful run.

Who is tenshi-ai-agent for?

Mainly developer.

Open on GitHub → Explain another repo

This repo across BitVibe Labs

Verify against the repo before relying on details.