Expand description
MinIO S3 Bus Sink
Subscribes to the AgentBus and uploads all messages to MinIO S3 as structured JSONL records suitable for LLM pretraining.
Each bus message is transformed into a training-friendly record with:
- Clear role attribution (system/user/assistant/tool)
- Paired tool_call → tool_result sequences
- Full, untruncated content (code, file paths, arguments, outputs)
- Rich metadata for filtering, deduplication, and curriculum design
The output format follows the OpenAI chat-completions schema so it can be fed directly into fine-tuning pipelines (SFT, DPO, RLHF).
§Usage
ⓘ
use codetether_agent::bus::s3_sink::BusS3Sink;
let sink = BusS3Sink::new(
bus.clone(),
"http://localhost:9000",
"access-key",
"secret-key",
"codetether-training",
"bus/",
).await?;
// Runs forever, uploading bus messages to S3
sink.run().await;Structs§
- BusS3
Sink - S3 sink that archives all bus messages as JSONL training records
- BusS3
Sink Config - Configuration for the bus S3 sink
Functions§
- spawn_
bus_ s3_ sink - Spawn the bus S3 sink in a background task.