Skip to content

A minimal single agent demo project that showcases the core execution pipeline and production-grade features of agents.

License

Notifications You must be signed in to change notification settings

Code-MonkeyZhang/Mini-Agent-TS

Repository files navigation

English | 中文

Mini-Agent (TypeScript Edition) Quick Start Guide

This project is a TypeScript implementation of Minimax's open-source Mini-Agent project.

This is an AI agent that runs in your terminal (command line), capable of helping you read/write files and execute system commands.

🛠️ Step 1: Install Node.js

Run the appropriate command for your system in Terminal/PowerShell:

  • Windows (PowerShell):
    winget install -e --id OpenJS.NodeJS.LTS
  • Mac (requires Homebrew):
    brew install node
  • Linux (Ubuntu/Debian):
    curl -fsSL https://deb.nodesource.com/setup_lts.x | sudo -E bash - && sudo apt-get install -y nodejs

(After installation, close and reopen your terminal, then type node -v. If you see something like v20.x.x, it's successful.)

📥 Step 2: Download the Code

Run these commands in your terminal to clone the project locally:

# 1. Clone repository
https://github.com/Code-MonkeyZhang/Mini-Agent-TS.git
# 2. Enter project directory
cd Mini-Agent/Mini-Agent-Tस

(If Git isn't installed: Windows users can run winget install Git.Git, Mac users run brew install git)

⚙️ Step 3: Install & Link

Run these two commands sequentially to register mini-agent-ts as a system command:

# 1. Install dependencies
npm install

# 2. Build and link to system commands
npm run build && npm link

🔑 Step 4: Configure API Key

You need to provide AI with your credentials.

  1. Navigate to the config folder in the project directory.
  2. Copy config-example.yaml and rename it to config.yaml:
    cp config/config-example.yaml config/config.yaml
  3. Open config.yaml with a text/code editor and modify these key configurations:
# config/config.yaml

# Enter your API Key
api_key: "YOUR_API_KEY_HERE" # Replace with your MiniMax API Key

# API endpoint (choose based on network environment)
api_base: "https://api.minimax.io/anthropic" # Overseas users
# api_base: "https://api.minimaxi.com"        # Mainland China users

# Model and provider
model: "MiniMax-M2"
provider: "anthropic"

# Logging (optional)
enableLogging: false # Set to true to enable file logging (logs saved in logs/ folder at project root)

🚀 Step 5: Run

Ready to go! You can now launch it from anywhere in your terminal.

1. Basic Operation

Launch in current directory:

mini-agent-ts

2. Specify Workspace

Have Agent work in a specific directory to keep generated files organized:

# Windows
mini-agent-ts --workspace D:\MyProjects\TestAgent

# Mac / Linux
mini-agent-ts -w ./my-workspace

You'll see the welcome screen 🤖 Mini Agent. Now give instructions conversationally, e.g.:

"Please create a file named hello.txt in the current directory containing a poem about programmers."


👨‍💻 Developer Guide

For development/debugging, use these commands:

Command Purpose
npm run build Compile project: Transpiles TypeScript to JavaScript (outputs to dist/).
npm run dev Development mode: Runs source directly via tsx with hot-reloading for debugging.
npm run start Production mode: Runs compiled code (requires prior build execution).
npm test Run tests: Executes Vitest unit tests.

About

A minimal single agent demo project that showcases the core execution pipeline and production-grade features of agents.

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •