Prerequisites
1
Transfer Existing Source to Relace
Start by transferring your existing repositories to Relace.Keep track of the Relace
repo_id
in your database for future reference. You can optionally include a metadata
parameter to add any properties of repos you want to maintain.If you have a lot of repos to transfer, you’ll have to perform this step in batches. See the policies section for information on rate limits.2
Create New Relace Repos
For creating new repositories, we recommend using Relace Templates to minimize repo creation latency. However, you can also use the same functions above.
3
Integrate Repos with Your Agent
Now that your repositories live in Relace, you can integrate them with your agent’s local file system. You can fetch the stored files directly from our API without needing to setup git on your host:After your agent modifies files, push the changes back to Relace. You can either update specific files or overwrite all repository content.
4
Use Built-In Semantic Retrieval
Repositories stored in Relace get automatically indexed with our code embedding model and are refreshed with each code update. Use the retrieve endpoint as an agent tool to score files based on relevance to a user query.You can parse the results the same way you do with direct calls to the reranker.For more details, see our API reference.