Bỏ qua để đến nội dung

AI Models & Vai trò

Galaxy CLI hỗ trợ nhiều AI models khác nhau, cho phép bạn linh hoạt chọn agent phù hợp với nhu cầu.

Google Gemini

Models: gemini-2.5-flash, gemini-pro

Orchestration, tool calling, multi-language support

Anthropic Claude

Models: claude-3.5-sonnet, claude-3-opus

Complex reasoning, code generation, analysis

OpenAI Codex

Models: gpt-4, gpt-3.5-turbo

Code completion, documentation, refactoring

Ollama (Local)

Models: qwen3-coder, gpt-oss, codellama

Local inference, privacy-focused, customizable

Galaxy CLI sử dụng kiến trúc orchestrator với các specialized agents:

┌──────────────────────┐
│ User Input (CLI) │
└──────────┬───────────┘
┌────────────────────────────────────┐
│ Orchestrator Agent │
│ (Gemini / Claude / GPT-4) │
│ - Tool calling │
│ - Workflow decisions │
│ - Multi-language responses │
└────────────┬───────────────────────┘
┌────────────────┼────────────────┐
│ │ │
▼ ▼ ▼
┌───────────┐ ┌───────────┐ ┌────────────┐
│ Analysis │ │ Planning │ │ Code Gen │
│ Agent │ │ Agent │ │ Agent │
│ (Any AI) │ │ (Any AI) │ │ (Any AI) │
└───────────┘ └───────────┘ └────────────┘

Supported Models:

  • Google Gemini 2.5 Flash (default)
  • Claude 3.5 Sonnet
  • GPT-4

Vai trò:

  • Central coordinator & workflow manager
  • Tool calling & function execution
  • Context management
  • Multi-language support (VI/EN)

Capabilities:

// Tool calling
orchestrator.callTool('file_read', { path: './app.tsx' });
// Agent coordination
const analysis = await orchestrator.callTool('analyze', {...});
const plan = await orchestrator.callTool('plan', {...});
// Execution
for (const step of plan.steps) {
await orchestrator.executeStep(step);
}

Supported Models:

  • Claude 3.5 Sonnet
  • GPT-4
  • Ollama: gpt-oss:120b

Vai trò:

  • Business & requirements analysis
  • Tech stack recommendations
  • Feature breakdown
  • Data modeling

Output Example:

{
projectName: "Next.js E-commerce",
type: "create_project",
coreFeatures: [
{ name: "Product Catalog", priority: "must-have" },
{ name: "Shopping Cart", priority: "must-have" },
{ name: "Checkout", priority: "must-have" }
],
technicalStack: {
frontend: ["Next.js 14", "TypeScript", "Tailwind"],
backend: ["Prisma", "PostgreSQL"]
}
}

Supported Models:

  • Claude 3.5 Sonnet
  • Ollama: qwen3-coder:480b
  • GPT-4

Vai trò:

  • Feature-driven planning
  • Tool selection
  • Execution strategy
  • Time estimation

Planning Strategy:

[
{ step: 1, tool: 'command_run', action: 'Initialize project' },
{ step: 2, tool: 'install_dependencies' },
{ step: 3, tool: 'code_generate', featureName: 'Feature A' },
{ step: 4, tool: 'code_generate', featureName: 'Feature B' },
{ step: 5, tool: 'test_generate' }, // if testEnabled
{ step: 6, tool: 'code_review' } // if reviewEnabled
]

Supported Models:

  • Claude 3.5 Sonnet (recommended)
  • Ollama: qwen3-coder:480b
  • GPT-4
  • Codex

Vai trò:

  • Generate production-ready code
  • File management
  • Self-contained execution
  • Result reporting

Integrated Tools:

  • file_write - Write code files
  • file_read - Read existing code
  • command_run - Run commands
  • file_search - Search codebase
Terminal window
# Galaxy tự động chọn agent phù hợp
galaxy

Galaxy sẽ:

  • Sử dụng Gemini cho orchestration (nhanh, rẻ)
  • Sử dụng Claude cho code generation (chất lượng cao)
  • Sử dụng local models khi có thể (privacy)
Terminal window
# Chỉ định agent cụ thể
galaxy --agent gemini
galaxy --agent claude
galaxy --agent gpt4
galaxy --agent ollama:qwen3-coder
.galaxyrc
{
"agent": {
"orchestrator": "gemini",
"analysis": "claude",
"planning": "claude",
"codeGen": "claude"
}
}
ModelProviderSpeedQualityCostUse Case
Gemini 2.5 FlashGoogle⚡⚡⚡⭐⭐⭐💰Orchestration
Claude 3.5 SonnetAnthropic⚡⚡⭐⭐⭐⭐⭐💰💰Code Gen, Analysis
GPT-4OpenAI⚡⚡⭐⭐⭐⭐💰💰💰Complex reasoning
Ollama (Local)Local⭐⭐⭐🆓 FreePrivacy, Offline
Terminal window
# .env hoặc ~/.galaxyrc
GEMINI_API_KEY=your_key_here
ANTHROPIC_API_KEY=your_key_here
OPENAI_API_KEY=your_key_here
// Adjust creativity/determinism
{
"modelConfig": {
"temperature": 0.7, // 0-1, higher = more creative
"maxTokens": 8192,
"topP": 0.95
}
}