This starter kit provides a scaffold for building an agentic LLM engine. We have already provided all necessary parsing logics and API connection, and your goal is to optimize the engine for the agentic workflow scenario.
.
├── app/
│ ├── main.py # FastAPI entry point.
│ ├── constants.py # Necessary constants
│ ├── schemas.py # Pydantic models for request/response.
│ └── agent_engine.py # MAIN LOGIC GOES HERE.
├── Dockerfile # Environment definition.
├── pyproject.toml # Python dependencies.
└── README.md
Modify app/agent_engine.py to optimize the LLM inference for the agentic workflow scenario. The benchmark evaluates throughput, latency, perplexity (output quality), and trace length (efficiency).
The docker-compose.yaml in the repository specifies the AMD64 platform to align with the test environment. If you are developing locally on a non-AMD64 machine, please comment out the platform: linux/amd64 line in docker-compose.yaml to avoid architecture errors.
services:
agent-engine:
# ...
# platform: linux/amd64 <-- Comment out for local ARM64 testingWe recommend using Docker Compose for local testing. The service will listen on http://localhost:8000.
# Build the image, and start a container in detach mode
docker compose up --build -dTo shutdown the engine,
docker compose stop- Liveness:
GET http://localhost:8000/health - Readiness:
GET http://localhost:8000/ready
To test your engine on Vast.ai, you need to push your Docker image to a container registry (GHCR) and create a Template.
- Login to GHCR
Create a GitHub Personal Access Token under https://github.com/settings/tokens with
write:packagesandread:packagespermissions.
export CR_PAT=YOUR_TOKEN
export GITHUB_USERNAME=YOUR_GITHUB_USERNAME
echo $CR_PAT | docker login ghcr.io -u $GITHUB_USERNAME --password-stdin- Build & Push
docker compose build
docker tag agent-engine:latest ghcr.io/$GITHUB_USERNAME/agent-engine:latest
docker push ghcr.io/$GITHUB_USERNAME/agent-engine:latestWe suggest remembering the SHA256 digest of the image to ensure reproducibility. You can find it at the end of output of docker push, or use the following command:
docker inspect --format='{{index .RepoDigests 0}}' ghcr.io/$GITHUB_USERNAME/agent-engine:latest- Log in to Vast.ai and go to the Templates page (https://cloud.vast.ai/templates/).
- Click Create New Template, set the relevant fields as following:
- Image Path:
ghcr.io/YOUR_GITHUB_USERNAME/agent-engine@sha256:YOUR_DIGEST - Docker Options: Add
-p 8000:8000to expose the port. - Launch Mode:
Docker ENTRYPOINT. - Docker Repository Authentication: Set Server as
ghcr.ioand input your github username and PAT accordingly. - Disk Space: We suggest 128GB as the image and weights take around 40GB.
- Image Path:
Rent a GPU instance using your template. We suggest using NVIDIA RTX 5080 as this aligns with the test environment. Note that if you want to use Flash attention, please use Vast AI instances with Max CUDA: 13.0.
Once running, you can open the IP & Port Info tab of the instance by clicking on the IP address, which provide the external port $VAST_PORT mapping to the internal 8000 port (which the engine is listening on).
Then you should be able to access the engine at http://$VAST_IP:$VAST_PORT.
Submit the following items to Canvas:
- Full Image Name with Digest: (e.g.,
ghcr.io/username/track1-agent@sha256:abcdef...) - Read-Only PAT and the related Github username: A GitHub Personal Access Token with
read:packagespermission, plus the associated Github username. - Archived Code: A
.zipfile of your project code.
Ensure your image is built for linux/amd64 and get its digest.
# Pull the image (if not local)
docker pull ghcr.io/${GITHUB_USERNAME}/agent-engine:latest
# Inspect to get Digest and Architecture
docker inspect ghcr.io/${GITHUB_USERNAME}/agent-engine:latest --format 'Digest: {{.RepoDigests}} | Arch: {{.Architecture}}'- Verify: Architecture must be
amd64. - Copy: The full string
ghcr.io/YOUR_GITHUB_USERNAME/agent-engine@sha256:YOUR_DIGEST.
To allow TAs to grade your submission without full access to your account:
- Go to GitHub Settings -> Developer Settings -> Personal access tokens (Classic).
- Generate new token (classic).
- Scopes: Select ONLY
read:packages. - Expiration: Set to at least 2 weeks after the submission deadline.
- Generate and copy the token.
Crucial: Verify that the PAT works for pulling the image.
# 1. Logout of your current session
docker logout ghcr.io
# 2. Login with the READ-ONLY PAT
echo "YOUR_READ_ONLY_PAT" | docker login ghcr.io -u YOUR_USERNAME --password-stdin
# 3. Try to pull your image
docker pull ghcr.io/YOUR_USERNAME/track1-agent@sha256:<YOUR_DIGEST>If the pull succeeds, your credentials are correct.
Zip your track1_agent folder (excluding .venv, __pycache__, and large model files).
zip -r track1_agent_submission.zip . -x "*.venv*" -x "*__pycache__*"Submit the Image URI (with digest), the Read-Only PAT, and the Zip file to Canvas.