Expand description
Typed, in-process intelligence operations for Kennedy.
This crate has no HTTP router, health endpoint, provider catalog, or JSON request dispatch. Callers choose exact models and bind every provider call to a user before invoking it.
Structs§
- Accounted
- A successful provider result together with its canonical durable receipt.
- Agent
Turn - Annotation
Request - Annotation
Response - Audio
Analysis Request - One Gemini audio-analysis call with exact model and accounting attribution.
- Audio
Analysis Response - Config
- Construction inputs for the intelligence library.
- Cost
Estimate - A non-negative estimated cost represented exactly in billionths of one US dollar.
- Daily
Usage - Totals calculated by opening every receipt for the requested UTC day.
- Daily
Usage Key - One grouping key in a linearly calculated daily report.
- Document
- Document
Extraction - Error
- A bounded, transport-independent intelligence failure.
- Fetch
Request - Fetch
Response - Image
Request - One direct image creation or reference-image modification request.
- Image
Response - One generated image normalized across providers.
- Intelligence
- Media
- Resolved
Agent Model - Exact provider model and capacity selected for an agent request.
- Runtime
Model - The configured Kennedy model, returned directly instead of through a catalog endpoint.
- Search
Request - Search
Response - Structured
Audio Request - Compatibility request for callers that always require structured Gemini audio output.
- Structured
Audio Response - Text
Generation Request - One tool-free Codex text generation call.
- Text
Generation Response - Token
Usage - The four token categories Kennedy accounts independently.
- Transcription
Request - Transcription
Response - Usage
Receipt - Durable evidence for one completed provider call.
- User
Intelligence - An intelligence handle that cannot make a provider call without user attribution.
- WebSource
Enums§
- Agent
Provider - Provider selected for one resolved agent model.
- Cost
Accuracy - Confidence in a locally calculated provider cost.
- Error
Kind - Broad failure category for callers that need to choose retry or user feedback.
- Media
Kind - Metering
- Provider metering returned by one call.
- Reasoning
Effort - Maximum model reasoning effort.
Constants§
- PRICING_
VERSION - Published provider prices compiled into this Kennedy build.
Functions§
- estimate_
cost - Estimates one normalized call using Kennedy’s compiled standard-tier price catalog.
- estimate_
token_ cost - Estimates normalized token usage for a known model.
- open