流量模型——拦截与管理
概览
**Odel **ver **raffic — **ntercept & **anage 为人工智能代理提供网络流量的搜索、检查和重放层。 motim 运行一个本地代理,将 HTTP(S) 流量捕获到 SQLite 数据库。代理通过 CLI 查询 Web 服务的工作原理和操作——无需 API 文档,无需凭证布线,无需猜测。 你浏览一个网站。Motim 会记录每一个请求和回复。现在你的代理可以搜索这些流量,理解 API,并重放请求——包含浏览器所使用的确切认证、头部和正文。 每个命令都支持 --json 以实现机器可读输出。 Motim发布了一个技能档案,教特工如何使用它。 该技能为代理提供了决策树:何时搜索、何时重放、何时探测、如何处理认证失败。代理使用带有 --json 的 CLI——无需 Python SDK。
概述(AI 翻译)
ModelOver Traffic — Intercept & Manage
为人工智能代理提供网络流量的搜索、检查和重放层。
motim 运行一个本地代理,将 HTTP(S) 流量捕获到 SQLite 数据库。代理通过 CLI 查询 Web 服务的工作原理和操作——无需 API 文档,无需凭证布线,无需猜测。
你浏览一个网站。Motim 会记录每一个请求和回复。现在你的代理可以搜索这些流量,理解 API,并重放请求——包含浏览器所使用的确切认证、头部和正文。
示例
代理发现API的工作原理:
代理重放捕获请求:
特工调查故障:
代理探测端点:
代理从JavaScript中提取端点:
每个命令都支持 --json 以实现机器可读输出。
安装
可选附加内容:
开始
代理集成
Motim发布了一个技能档案,教特工如何使用它。
该技能为代理提供了决策树:何时搜索、何时重放、何时探测、如何处理认证失败。代理使用带有 --json 的 CLI——无需 Python SDK。
CLI参考
Python 库
发展
许可证
麻省理工学院
本页由 AI 翻译,技术细节请以原文为准。
README
以下为原文 README 节选,完整内容请查看原文。
motim
Model Over Traffic — Intercept & Manage
A search, inspect, and replay layer over network traffic for AI agents.
motim runs a local proxy that captures HTTP(S) traffic into a SQLite database. Agents query it via CLI to understand how web services work and operate on them — no API docs, no credential wiring, no guesswork.
Browser Agent
│ │
▼ ▼
┌──────────┐ ┌────────────┐ ┌──────────────┐
│ motim │───▶│ SQLite │◀───│ search │
│ proxy │ │ (traffic) │ │ inspect │
│ :8080 │ │ │ │ replay │
└──────────┘ └────────────┘ └──────────────┘
You browse a site. motim records every request and response. Now your agent can search that traffic, understand the API, and replay requests — with the exact auth, headers, and body the browser used.
Examples
Agent discovers how an API works:
motim endpoints --service example --json
motim search --host api.example.com --method POST --json
motim show 42 --json # full request + response
Agent replays a captured request:
motim replay 42 --json
motim replay 42 --patch-json '{"page_size": 50}' --json
motim replay 42 --set-header "x-custom=value" --json
Agent investigates a failure:
motim search --host api.example.com --status 403 --json
motim diff 42 43 --json
motim around 42 --window 60 --json # nearby exchanges
Agent probes an endpoint:
motim probe 42 \
--patch-json '{"admin": true}' \
--drop-header "authorization" \
--json
Agent extracts endpoints from JavaScript:
motim linkfinder --host app.example.com --regex '^/api/' --json
Every command supports --json for machine-readable output.
Install
pip install motim
Optional extras:
pip install 'motim[curl]' # browser TLS fingerprinting
pip install 'motim[linkfinder]' # JS endpoint extraction
Getting started
motim init # create dirs, trust CA cert, install agent skill
motim start # start proxy on localhost:8080
# point your browser at localhost:8080 (use FoxyProxy or set system-wide)
# browse normally — traffic flows into ~/.motim/motim.sqlite3
Agent integration
motim ships a skill file that teaches agents how to use it.
motim init # auto-installs skill for Claude Code
motim agents-md # writes AGENTS.md for Codex, opencode, etc.
The skill gives agents a decision tree: when to search, when to replay, when to probe, how to handle auth failures. Agents use the CLI with --json — no Python SDK needed.
CLI reference
# Proxy
motim start # start capture proxy
motim stop # stop proxy
motim status # check proxy status
motim doctor # health check
# Search & inspect
推荐工具
换一个关键词,或者移除筛选条件。
安装
npx skillfish add vaibhavk97/motim