Quickstart / Python
Deploy an HTTP agent.
Put a Python HTTP entrypoint and a bract.yaml manifest in one project directory. Bract
packages that directory, starts the service, checks its health and gives you an authenticated invoke
endpoint.
The Linux x86-64 CLI, SDK starter and checksums come from this site. Create scoped keys in Bract onboarding: Deploy for the release, then Read + Invoke for checking it. Keep both outside the project archive.
01 / Install
Download and verify the CLI.
For Linux x86-64, download the versioned CLI and SDK starter. Verify both archives against SHA256SUMS before unpacking. The install puts bract in ~/.local/bin; the last commands unpack and enter the starter project.
Install CLI and starter (Bash)
# Linux x86-64 ยท Bract CLI 0.1.0
base="https://bract.aylith.com/downloads/v0.1.0"
curl -fLO "$base/bract_0.1.0_linux_amd64.tar.gz" &&
curl -fLO "$base/bract_python_starter_0.1.0.tar.gz" &&
curl -fLO "$base/SHA256SUMS" &&
sha256sum -c SHA256SUMS &&
tar -xzf bract_0.1.0_linux_amd64.tar.gz &&
mkdir -p "$HOME/.local/bin" &&
install -m 0755 bract "$HOME/.local/bin/bract" &&
export PATH="$HOME/.local/bin:$PATH" &&
bract --version &&
mkdir sample-agent &&
tar -xzf bract_python_starter_0.1.0.tar.gz -C sample-agent &&
cd sample-agent02 / Prepare
One manifest. One Python entrypoint.
The downloaded starter contains these two files at its root. Its agent.py uses the Bract SDK: startup checks a memory write and read before health succeeds; each /ask saves the question under a unique key, reads it back, and records a
trace. The example answer echoes the question without a model provider. Replace the /ask work with your agent after trying the starter.
bract.yaml
name: sample-agent
runtime: python
version: 1.0.0
entrypoint: agent.py
port: 8080
health_path: /healthzInspect the downloaded agent.py (Bash)
cat bract.yaml
sed -n '1,180p' agent.pyListen on 0.0.0.0 and the PORT environment value. The health path
must return a successful HTTP status before the deployment becomes active.
03 / Deploy
Deploy from the project directory.
In Bash, create a Deploy-only key in Bract onboarding. The CLI uploads the project archive and prints the live invoke URL after the health check succeeds.
Deploy command (Bash)
export BRACT_API_URL="https://bract.aylith.com"
read -rsp "Paste your Deploy key: " BRACT_API_TOKEN && printf '\n' &&
export BRACT_API_TOKEN &&
bract --api-url "$BRACT_API_URL" deploy04 / Invoke
Call the agent through Bract.
The invoke path forwards the request to the active agent. Create a separate key with Read and Invoke permissions in onboarding, then use it for the request, status and logs. The Deploy-only key cannot call or read the agent.
Invoke command
read -rsp "Paste your Read + Invoke key: " BRACT_API_TOKEN && printf '\n' &&
export BRACT_API_TOKEN &&
curl -X POST "$BRACT_API_URL/api/v1/agents/sample-agent/invoke/ask" \
-H "Authorization: Bearer $BRACT_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{"question":"hello"}'For this example, the response is {"answer":"Received: hello"}.
Inspect commands
bract --api-url "$BRACT_API_URL" status
bract --api-url "$BRACT_API_URL" logs --follow=false