ref() system.
Colin includes eight built-in providers:
| Provider | Purpose | URI Schemes |
|---|---|---|
| Project | Reference other project documents | project:// |
| GitHub | Access GitHub repositories, issues, and PRs | github:// |
| Linear | Fetch issues from Linear | (functions only) |
| Notion | Access Notion pages | (functions only) |
| HTTP | Fetch web content | http://, https:// |
| MCP | Connect to MCP servers | mcp.<name>:// |
| LLM | Invoke language models | (functions only) |
| S3 | Read from S3-compatible storage | s3:// |
Configuration
Providers are configured incolin.toml under [[providers.<type>]] sections. The double brackets indicate a TOML array—you can define multiple instances of the same provider type as long as they have unique names.
colin.toml
Default vs Named Providers
Providers can be configured with or without aname field, which determines how you access them in templates.
A provider without a name becomes the default for that type. Its functions are available directly on the type namespace:
colin.toml
name becomes a named instance accessible under that name:
colin.toml
colin.toml
Builtin Providers
HTTP and LLM providers are registered automatically with sensible defaults. You only need to configure them if you want to customize behavior (like setting a specific model or timeout). MCP and S3 providers require explicit configuration before use.Architecture
Providers serve two roles in Colin. First, they implement URI scheme handlers for theref() system. When you write ref('s3://bucket/key'), Colin routes the request to the S3 provider based on the s3:// scheme. Second, providers contribute template functions accessible through the colin namespace like colin.http.get() or colin.mcp.github.resource().
URI Handling
Each provider declares the URI schemes it handles:read() method. The provider returns raw content as a string, and Colin wraps it in a RefResult for dependency tracking.
Template Functions
Providers expose functions through theget_functions() method. These functions return domain objects with .content and metadata properties:
schemes = ["http", "https"] that returns {"get": self._get} becomes accessible as colin.http.get() in templates. The first scheme in the list determines the namespace.
Domain Objects
Provider functions return domain objects rather than raw strings. These objects contain both content and metadata:to_ref_result() method for converting to RefResult when dependency tracking is needed.
Dependency Tracking
By default, provider function calls are ephemeral. To record a dependency in the manifest, wrap the result withref():
refs_evaluated in the manifest. Changes to tracked resources trigger recompilation of dependent documents.
Lifecycle Management
Providers that manage stateful resources implement thelifespan() async context manager. Colin enters this context when starting and exits when shutting down. Database connections, HTTP clients, and API sessions are set up before the yield and cleaned up automatically when the context exits.
Staleness Detection
Providers can implementget_last_updated() to support efficient staleness checking. This method returns a timestamp without loading full content, enabling Colin to detect when sources have changed:
None means “treat as stale and reload.”