Documentation Index
Fetch the complete documentation index at: https://docs.lucid.foundation/llms.txt
Use this file to discover all available pages before exploring further.
Deploy from Source
This guide will walk you through building and deploying an agent directly from source code using Lucid. This process is ideal for developers who have access to the source code and want to deploy their agent to a target environment.Prerequisites
Before you begin, ensure you have the following:- Access to the source code of the agent you wish to deploy.
- Lucid CLI installed on your machine.
- A configured Docker registry if deploying to a remote target.
Steps to Deploy
- Navigate to Your Agent’s Source Code Ensure you are in the directory containing your agent’s source code. This directory should contain a Dockerfile or be capable of generating one.
-
Launch the Deployment Command
Use the following command to build and deploy your agent:
--path ./my-agent: Specifies the path to your agent’s source code.--target railway: Indicates the deployment target. Replacerailwaywith your desired target.--owner 0x...: Replace with the appropriate owner identifier.
- Dockerfile Detection and Image Building The command will detect the presence of a Dockerfile in your source directory. If a Dockerfile is not present, Lucid will generate one for you. It will then build the Docker image locally.
-
Push to Docker Registry
If you are deploying to a remote target, you need to push the Docker image to a configured registry. Set your registry with the following command:
Replace
ghcr.io/myorgwith your registry’s URL. - Deploy the Agent After the image is pushed to the registry, Lucid will proceed to deploy your agent to the specified target environment.
Notes
- For Docker-only targets, the image will not be pushed to a registry, and the deployment will proceed directly from the local build.
- Ensure your Docker registry credentials are correctly configured to allow image pushes.
.png?fit=max&auto=format&n=VsjUqn6fLqEhBiuI&q=85&s=8b4c7e6431e9a6af1ef23b77bb4ff5fd)
.png?fit=max&auto=format&n=VsjUqn6fLqEhBiuI&q=85&s=d5651a45e4bfbabc33f74e146af3f94a)