How MiroFish was designed to work out of the box.
User uploads seed document (PDF/MD/TXT)
|
v
[1] Alibaba Qwen-plus LLM --> Ontology (10 entity types + relationships)
|
v
[2] Zep Cloud --> Knowledge Graph (entities, edges, memory)
|
v
[3] Qwen-plus --> 93+ Agent Profiles (persona, behavior, stance)
|
v
[4] OASIS Engine (camel-ai) --> Multi-Agent Simulation (Twitter + Reddit)
|
v
[5] Qwen-plus --> Prediction Report (ReACT agent with tools)
|
v
[6] Interview Mode --> Chat with any simulated agent
| Component | Version | Purpose |
|---|---|---|
| Python | 3.11-3.12 | Backend runtime |
| Node.js | 18+ | Frontend runtime |
| uv | latest | Python package manager |
| Docker | 20+ | Optional: containerized deployment |
- Go to https://bailian.console.aliyun.com/
- Register an Alibaba Cloud account
- Enable the Bailian (百炼) service
- Create an API key under "API密钥管理"
- Note your key — it looks like:
sk-xxxxxxxxxxxxxxxxxxxxxxxx
Model options:
qwen-plus— RECOMMENDED (balanced quality/speed/cost)qwen-turbo— Faster, cheaper (good for testing)qwen-max— Highest quality (expensive)
API endpoint: https://dashscope.aliyuncs.com/compatible-mode/v1
Pricing: Token-based. A full 93-agent simulation costs ~$1-3 with qwen-plus.
- Go to https://app.getzep.com/
- Sign up (free, no credit card)
- Create a project
- Copy your API key from Settings → API Keys
- Key format:
z_xxxxx.yyyyy
Free tier includes:
- 1,000 episodes/month (enough for ~5 simulations)
- Up to 2,000 nodes per graph
- Basic search and memory features
Paid tier ($25/month):
- 20,000 credits
- Custom entity types (5-20)
- Higher rate limits
cd MiroFish
cp .env.example .envEdit .env:
# LLM — Alibaba Bailian Qwen-plus (ORIGINAL DESIGN)
LLM_API_KEY=sk-your-alibaba-key
LLM_BASE_URL=https://dashscope.aliyuncs.com/compatible-mode/v1
LLM_MODEL_NAME=qwen-plus
# Zep Cloud — Knowledge Graph
ZEP_API_KEY=z_your-zep-key
# Optional: Boost LLM (faster model for bulk operations)
# LLM_BOOST_API_KEY=sk-your-key
# LLM_BOOST_BASE_URL=https://dashscope.aliyuncs.com/compatible-mode/v1
# LLM_BOOST_MODEL_NAME=qwen-turbo# One command — installs Node + Python deps
npm run setup:all
# Or step by step:
npm run setup # Node deps (root + frontend)
npm run setup:backend # Python deps (creates venv via uv)npm run devThis starts:
- Frontend: http://localhost:3000 (Vue.js + Vite)
- Backend: http://localhost:5001 (Flask)
- Open http://localhost:3000
- Upload a seed document (PDF, MD, or TXT)
- Enter your prediction requirement in natural language
- Click through the 5 steps:
- Step 1: Graph Building (ontology + Zep knowledge graph)
- Step 2: Environment Setup (agent profiles + simulation config)
- Step 3: Simulation (run OASIS, watch real-time)
- Step 4: Report (ReACT agent generates analysis)
- Step 5: Interaction (interview agents, chat with report agent)
cp .env.example .env
# Edit .env with your keys
docker compose up -d
# Frontend: http://localhost:3000
# Backend: http://localhost:5001- Library:
camel-oasis==0.2.5+camel-ai==0.2.78 - Runs as subprocess:
run_parallel_simulation.py - Dual-platform: Twitter + Reddit simultaneously
- Each agent has: persona, memory, behavior config, stance
CREATE_POST, LIKE_POST, REPOST, FOLLOW, DO_NOTHING, QUOTE_POST
LIKE_POST, DISLIKE_POST, CREATE_POST, CREATE_COMMENT,
LIKE_COMMENT, DISLIKE_COMMENT, SEARCH_POSTS, SEARCH_USER,
TREND, REFRESH, DO_NOTHING, FOLLOW, MUTE
- Based on China Standard Time (CST) by default
- Peak hours: 19-22 (1.5x activity multiplier)
- Dead hours: 0-5 (0.05x activity)
- Work hours: 9-18 (0.7x activity)
- LLM adjusts per simulation context
/backend/uploads/simulations/<sim_id>/
state.json # Simulation metadata
reddit_profiles.json # Agent profiles (Reddit format)
twitter_profiles.csv # Agent profiles (Twitter format)
simulation_config.json # Full config (time, events, agents)
reddit/actions.jsonl # All Reddit actions
twitter/actions.jsonl # All Twitter actions
simulation.log # Process log
run_state.json # Real-time status
The report agent uses Reasoning + Acting:
- Plans table of contents
- For each section: reasons → calls tools → writes → reflects
- Available tools:
search(query)— Full-text Zep graph searchinsight_forge(question)— Deep multi-dimensional searchpanorama_search(topic)— Broad search including expired dataget_statistics()— Simulation statistics
Config:
REPORT_AGENT_MAX_TOOL_CALLS = 5 # Tools per section
REPORT_AGENT_MAX_REFLECTION_ROUNDS = 2 # Iterations
REPORT_AGENT_TEMPERATURE = 0.5 # Focused writing- Alibaba Qwen-plus chosen because: Native Chinese language support, OpenAI-compatible API, JSON mode support, good balance of quality/cost
- Zep Cloud chosen because: Graph-based memory, entity extraction, temporal memory, free tier sufficient
- OASIS chosen because: Purpose-built for social media simulation, dual-platform support, ReACT agent compatibility
- response_format: json_object — Used throughout for structured LLM outputs
- Chinese timezone defaults — All activity patterns based on CST (adjustable by LLM)