Record real OpenAI/Anthropic HTTP back-and-forth (requests + responses, including streaming text/event-stream) and print paste-ready Swift fixtures for SwiftAgent unit tests (ReplayHTTPClient) using the AgentRecorder CLI or HTTPReplayRecorder. Use when adding/updating any provider adapter tests (text, streaming, structured outputs, tool calls), when payload formats change, or when debugging agent loop mismatches by inspecting recorded JSON/SSE payloads.
Use AgentRecorder to capture real provider payloads and generate paste-ready Swift fixtures for tests using ReplayHTTPClient.
This is the fastest loop for keeping SwiftAgent’s unit tests (and agent-loop behavior) in sync with real OpenAI/Anthropic traffic.
AgentRecorder/AgentRecorder/Scenarios/ (grouped by provider + one file per scenario).AgentRecorder --list-scenarios.Secrets.plist in the repo root (not committed).
--secrets-plist Secrets.plistOpenAI_API_Key_Debug / Anthropic_API_Key_DebugOptional:
OPENAI_API_KEY, ANTHROPIC_API_KEYAGENT_RECORDER_SECRETS_PLIST is also supported (fallback if env vars are missing).Legacy:
Secrets.plist under Examples/Example App/ExampleApp/Secrets.plist, either move/symlink it to the repo root or pass the full path via --secrets-plist.AgentRecorder scheme, set env vars, Run → copy stdout from Debug console.# Run from repo root.
# Apple Silicon: add `arch=arm64` to avoid “multiple matching destinations” warnings.
xcodebuild -workspace SwiftAgent.xcworkspace -scheme AgentRecorder -destination "platform=macOS,arch=arm64" -derivedDataPath .tmp/DerivedData build -quiet
./.tmp/DerivedData/Build/Products/Debug/AgentRecorder --list-scenarios
./.tmp/DerivedData/Build/Products/Debug/AgentRecorder --secrets-plist Secrets.plist --provider openai --scenario openai/streaming-tool-calls/weather --no-include-headers
ReplayHTTPClient(recordedResponses:).Tests/SwiftAgentTests/OpenAISession/...Tests/SwiftAgentTests/AnthropicSession/...xcodebuild -workspace SwiftAgent.xcworkspace -scheme SwiftAgentTests -testPlan SwiftAgentTests test -quietHTTPReplayRecorder redacts common auth header fields, but always review before committing.--no-include-headers unless you’re explicitly testing header handling.-quiet to xcodebuild to keep logs readable.xcodebuild may print noisy destination warnings; ignore if the build succeeds.text/event-stream. If the SDK stops consuming early, the recorded payload may be partial (this is usually fine for replaying the SDK’s behavior).--include-requests..tmp/DerivedData (and/or wrote capture files like .tmp/AgentRecorderOutput/*.txt), delete them after you’ve pasted fixtures into tests.npx skills add SwiftedMind/agent-recorder-fixtures下载完整 Skill 目录,包含 SKILL.md 及所有相关文件
Search for places (restaurants, cafes, etc.) via Google Places API proxy on localhost.
Interact with GitHub using the `gh` CLI. Use `gh issue`, `gh pr`, `gh run`, and `gh api` for issues, PRs, CI runs, and advanced queries.
Create or update AgentSkills. Use when designing, structuring, or packaging skills with scripts, references, and assets.
Start voice calls via the OpenClaw voice-call plugin.
Notion API for creating and managing pages, databases, and blocks.
Gemini CLI for one-shot Q&A, summaries, and generation.
Category:developer