Demo Agent Quickstart
See Treeship in action by deploying our demo loan processing agent.What You’ll Build
A FastAPI agent that:- Processes loan applications
- Creates Ed25519-signed attestations for each decision
- Provides verification URLs clients can check
Prerequisites
- Python 3.9+
- A Treeship API key (get one free)
Quick Start
Test It
Process a loan application:Verify the Decision
Visit theverification_url in your browser. Anyone can verify:
- The decision was made
- When it happened
- The cryptographic signature is valid
Deploy
Docker
Railway
TREESHIP_API_KEY as an environment variable.
Render / Fly.io / Heroku
- Fork the repo
- Connect your deployment platform
- Set
TREESHIP_API_KEYenvironment variable - Deploy
Customize
Editagent.py to:
| Change | Location |
|---|---|
| Agent name | AGENT_NAME constant |
| Decision logic | analyze_application() function |
| What gets attested | ts.attest() call in /process |
| API endpoints | FastAPI routes |
What’s Being Attested
- agent: Identifies this agent in the verification page
- action: Human-readable description of what happened
- inputs_hash: SHA-256 hash of the input data (data never sent to Treeship)
- metadata: Optional additional context