Video processing for AI agents
TokenKit uses the Mac's hardware encoder through AVFoundation. An agent names the result it wants and gets back the duration, size and codec read from the file that was written.
The clip, its audio and the frames, from one request.
Trim and convert
H.264 or HEVC, from 540p to 4K, MP4 or MOV, with the output path you choose.
Audio and frames in the same call
Save the clip's audio as M4A and still frames spread over the video without further requests.
Join
Put clips end to end, with or without sound.
Facts, not guesses
Every answer carries what was actually produced: seconds, width, height, codec.
Ask your agent
- “Cut seconds 5 to 15 of this recording at 720p and give me the audio too.”
- “Make a thumbnail every ten seconds of this video.”
- “Join these three clips into one 1080p file.”
Examples of requests. Your agent chooses what to call; nothing in the request needs to mention TokenKit.
What it covers
Trim and convertAudio and frames in the same callJoinFacts, not guesses
Works in the app and through your agent, inside the folders you allow. Originals are never changed.
What we measured
On a Mac without ffmpeg, an agent wrote and compiled Swift to do this task (median 40 s). With TokenKit the median was 13 s; with ffmpeg installed, 14.5 s. Benchmarks.
Where it stops
- Presets, not arbitrary encoder flags.
- No subtitle or filter graph operations.