為 AI Agent 與 Agent 開發者打造

TutorFlow Agent Platform

Agent 透過 API 和 MCP 產生課程、批改答案
自行註冊,按次付費。

1
API 呼叫
<3s
平均評估耗時
40+
支援語言
6
回饋欄位
開始使用

從這四個呼叫開始

請逐一展開步驟。第 1 步設定的 TUTORFLOW_KEY 和 CLASSROOM_ID,後續步驟都會用到。

需要 curl 和 jq。執行前請修改 slug 和電子郵件。

1註冊 Agent

不需要金鑰,呼叫一次就好。回應中包含 contentApiKey、defaultClassroomId 和 50 個試用額度。金鑰只會顯示一次,請妥善保存。

bash
RESPONSE=$(curl -s -X POST https://api.tutorflow.io/v1/platform/agent/register \
  -H "Content-Type: application/json" \
  -d '{"name":"My Agent","slug":"my-agent-2048","email":"you@example.com"}')
export TUTORFLOW_KEY=$(echo "$RESPONSE" | jq -r .contentApiKey)
export CLASSROOM_ID=$(echo "$RESPONSE" | jq -r .defaultClassroomId)
2開始產生課程

TutorFlow 會在背景產生課程,並回傳 202 和 runId。只有一個課程單元的課程需要 6 個額度。

bash
RUN_ID=$(curl -s -X POST \
  "https://api.tutorflow.io/v1/content/classrooms/$CLASSROOM_ID/courses/generate" \
  -H "Authorization: Bearer $TUTORFLOW_KEY" \
  -H "Content-Type: application/json" \
  -d '{"topic":"Fractions for grade 4","lessonCount":1}' | jq -r .runId)
3查詢產生進度

每隔 20 到 30 秒查詢一次,直到 status 變成 completed 或 failed。完成後,resourceId 就是新課程的 ID。

bash
curl -s "https://api.tutorflow.io/v1/content/classrooms/$CLASSROOM_ID/runs/$RUN_ID" \
  -H "Authorization: Bearer $TUTORFLOW_KEY" | jq '{status, resourceId, error}'
4批改答案

批改結果會立即回傳,包含分數、優點和改進建議。每次批改需要 1 個額度。

請求

bash
curl -s -X POST "https://api.tutorflow.io/v1/content/classrooms/$CLASSROOM_ID/evaluations" \
  -H "Authorization: Bearer $TUTORFLOW_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "evaluationType": "open_ended",
    "questionText": "Explain photosynthesis",
    "learnerAnswer": "Plants use sunlight to convert CO2 and water into glucose.",
    "maxScore": 10,
    "language": "en",
    "learnerExternalId": "learner-42"
  }'

回應

json
{
  "id": "5023...",
  "status": "COMPLETED",
  "evaluationType": "open_ended",
  "learner": { "externalId": "learner-42", "name": null },
  "score": 7,
  "maxScore": 10,
  "normalizedScore": 70,
  "strengths": ["Correctly identifies sunlight as key factor"],
  "suggestions": ["Mention the role of chlorophyll", "Explain the chemical equation"],
  "feedbackSummary": "Good foundational understanding. To improve, include the role of chlorophyll."
}
慣用終端機?試試 CLI

@tutorflow/cli 也能發出同樣的呼叫。agent register 會把金鑰存到 ~/.tutorflow/config.json,之後的指令就不必再帶金鑰或教室參數。

bash
npm install -g @tutorflow/cli
tutorflow agent register --name "My Agent" --slug my-agent-2048 --email you@example.com
tutorflow course generate "Fractions for grade 4" --lessons 1 --wait
tutorflow evaluate --type open-ended --question "Explain photosynthesis" \
  --student-answer "Plants use sunlight to make glucose." --learner-id learner-42
查看 CLI 指南
Agent 能做什麼

不必等人處理,Agent 自己就能完成

一把 Content API 金鑰就能用於 REST、MCP 和 CLI。REST 涵蓋所有功能,MCP 支援註冊、計費、課程與批改。

批改學習者答案

送出答案並附上評分標準或參考答案,回傳的分數、優點和改進建議都是有型別的欄位。

產生教材

一次呼叫即可開始產生課程、評量、投影片、影片或學習模組,並追蹤進度直到完成。

當作 MCP 工具呼叫

加入伺服器網址和金鑰後,Claude Code 或任何 MCP 用戶端都能把 TutorFlow 當作工具使用。

不需人工就能註冊

Agent 自行建立帳號,同一個回應就會取得金鑰、教室和 50 個試用額度。

每次呼叫的費用一清二楚

每項操作從同一個餘額扣除固定數量的額度,每個額度 2 美分;開始執行前,estimatedCredits 會先列出費用。速率限制資訊會在回應標頭中傳回。

依用途分開金鑰

測試金鑰與正式金鑰分開使用,可為每把金鑰設定權限範圍並定期輪換。測試金鑰在沙盒教室中執行,不會消耗額度。

工作完成立即通知

註冊 webhook 後,內容產生、影片轉檔或批改一結束,就會收到附簽章的請求。

依 Agent 指定的語言產出

內容和回饋都會使用 Agent 要求的語言。

MCP 伺服器

為 AI Agent 設計, 不只是給人用的。

Agent 會自己找到並使用 TutorFlow 的工具:註冊、查詢餘額、產生課程、追蹤進度、批改答案,不必撰寫 HTTP 程式碼。

  • 在 MCP 用戶端設定中加入一筆伺服器設定,Claude、Gemini 等任何 MCP 用戶端都能連線
  • Agent 自行註冊,同一次呼叫就能取得金鑰
  • 額度不足時,它會把付款連結傳給人處理;在啟用 x402 的環境中,也能直接用 USDC 付款
  • 輸入有型別,呼叫出錯時會傳回原因
Claude Code
json
// .mcp.json: add to your project root
{
  "mcpServers": {
    "tutorflow": {
      "type": "http",
      "url": "https://mcp.tutorflow.io/api/mcp",
      "headers": {
        "Authorization": "Bearer tf_content_..."
      }
    }
  }
}
MCP SDK
typescript
import { Client } from '@modelcontextprotocol/sdk/client/index.js'
import { StreamableHTTPClientTransport } from '@modelcontextprotocol/sdk/client/streamableHttp.js'

const transport = new StreamableHTTPClientTransport(
  new URL('https://mcp.tutorflow.io/api/mcp'),
  {
    requestInit: {
      headers: { Authorization: 'Bearer tf_content_...' },
    },
  },
)

const client = new Client({ name: 'my-agent', version: '1.0.0' })
await client.connect(transport)

// Call tools directly
const result = await client.callTool('run_evaluation', {
  evaluationType: 'open_ended',
  questionText: 'Explain photosynthesis',
  learnerAnswer: 'Plants use sunlight to make glucose...',
})
自行註冊
json
// No auth needed: agents register themselves
POST https://api.tutorflow.io/v1/platform/agent/register

{
  "name": "My AI Tutor",
  "slug": "my-ai-tutor",
  "email": "agent@example.com",
  "agentIdentity": "claude-3-5-sonnet"
}

// Returns a Content API key and the classroom it works in
// { "contentApiKey": "tf_content_...", "defaultClassroomId": "...", "trialContentCredits": 50 }
定價方案

Agent 產生多少,就付多少

每次呼叫都從帳號的同一個額度餘額扣除,每個額度 2 美分。下方是 Agent 實際計費所用的即時價目表。

產生的內容額度美元
含大綱與所有課程單元的課程3 額度 + 每個課程單元 6 額度US$0.06 + 每個課程單元 US$0.12
一個課程單元模組每個課程單元 6 額度每個課程單元 US$0.12
含自動評分題目的評量每份評量 3 額度每份評量 US$0.06
投影片中的文字頁每張文字頁 1 額度每張文字頁 US$0.02
附 AI 圖片的投影片頁每張圖片頁 3 額度每張圖片頁 US$0.06
影片場景旁白每個場景 1 額度每個場景 US$0.02
將影片轉成 MP4每次轉檔 3 額度每次轉檔 US$0.06
馬上能玩的遊戲每個遊戲 41 額度每個遊戲 US$0.82
批改一份答案每次請求 1 額度每次請求 US$0.02

計費方式

  • 完成電子郵件驗證後,即可用信用卡或 Base 網路上的 USDC 儲值,最低 5 美元。
  • 綁定信用卡後,額度用完時工作仍會繼續,這部分用量從該卡扣款。
  • 新帳號內含 50 個免費額度。
  • 測試金鑰只能在沙盒教室中使用,不會消耗額度。
閱讀計費指南
Agent 隨時可以開始

今天就讓 Agent 產生第一門課程

透過 API、MCP 或 CLI 註冊。50 個試用額度足以產生第一門課程,並批改幾份答案。