Examples
Learn how to use Antfly with these production-ready examples. Each example includes complete source code, documentation, and demo scripts.
Available Examples
Documentation Sync (docsaf)
Sync Markdown, MDX, and OpenAPI documentation to Antfly using the Linear Merge API
PostgreSQL Sync
Real-time synchronization from PostgreSQL to Antfly using LISTEN/NOTIFY
Image Search with CLIP
Build a local image search system using CLIP embeddings
Pinecone Migration
Migrate vector embeddings from Pinecone to Antfly with automatic embedder discovery
Common Patterns
All examples demonstrate:
- Linear Merge API - Efficient, stateless synchronization with change detection
- Content Hashing - Skip unchanged documents automatically
- Batch Processing - Handle large datasets efficiently
- Error Handling - Production-ready error handling and logging
Getting Started
-
Start Antfly:
go run ./cmd/antfly swarm -
Build an example:
go build -o example ./examples/<example-name> -
Run the demo:
./examples/<example-name>/run-demo.sh