Langfuse Setup: Connect Your Telemetry
Connect your Langfuse account to Jetty Agent for automated LLM usage analysis and optimization PRs.
Prerequisites
- A Langfuse account (cloud at cloud.langfuse.com or self-hosted)
- A Langfuse project with existing traces
- A Jetty account
1. Get Your Langfuse API Keys
In your Langfuse project settings, create or find your API keys:
- Public Key — Used to identify your project
- Secret Key — Used to authenticate API requests (stored encrypted)
If you're self-hosting Langfuse, you'll also need your instance URL.
2. Connect via the Jetty Dashboard
Navigate to the connect flow at https://launch.jetty.io/connect:
- Sign in — Create an account or sign in with Google
- Enter credentials — Provide your Langfuse public key, secret key, and host URL
- Select project — Choose which Langfuse project to analyze
- (Optional) Connect GitHub — Install the Jetty GitHub App to enable automatic PR creation
3. Security
Your credentials are handled securely:
- Read-only access — Jetty only retrieves traces, never modifies your Langfuse data
- Encrypted at rest — Secret keys stored with AES-256-GCM encryption
- Validated on entry — Credentials verified via
GET /api/public/projectsbefore storage
4. Trigger Analysis
Once connected, Jetty triggers an agentic workflow that:
- Fetches your recent traces from Langfuse
- Analyzes token usage patterns and cost hotspots
- Identifies latency outliers and prompt inefficiencies
- Produces structured recommendations with estimated savings
The analysis runs asynchronously. Results are delivered to your dashboard via webhook callback.
5. Review Recommendations
Analysis results appear in your Jetty dashboard as pending recommendations. Each includes:
- Summary — What was found and estimated impact
- Specific changes — File-level code modifications
- Cost estimates — Projected savings
No code changes happen without your explicit approval.
6. Create PRs
For each approved recommendation:
- Click Create PR in the dashboard
- Jetty generates a pull request via the GitHub App
- Review and merge in GitHub as you normally would
The Feedback Loop
Every merged PR feeds back into future analyses. Jetty tracks which recommendations were accepted, modified, or rejected to improve over time.
API Integration
If you prefer to trigger analysis programmatically:
curl -X POST "https://launch.jetty.io/api/admin/users/$USER_ID/trigger-analysis" \
-H "Authorization: Bearer $JETTY_API_TOKEN" \
-H "Content-Type: application/json"
Next Steps
- Jetty Agent Concepts — How the full feedback loop works
- PR API Reference — Programmatic PR creation
- Webhook Reference — How analysis results are delivered