ai library
Public entrypoint for Flint's AI runtime, providers, tools, workflows, memory, and persistence APIs.
Classes
- AiAgent
- Contract implemented by runnable agents.
- AiArtifactStore
- Store for persisted AI artifacts.
- AiEvent
- Timestamped event emitted during a run.
- AiExecutor
- Contract for executing an AI plan.
- AiGoal
- High-level task submitted to an agent.
- AiHttpClient
- Contract for HTTP clients used by AI providers.
- AiHttpRequest
- Immutable outbound AI HTTP request.
- AiHttpResponse
- Immutable AI HTTP response wrapper.
- AiMemoryStore
- Contract for AI run-event and thread-message memory storage.
- AiPlan
- Ordered collection of steps produced by a planner.
- AiPlanner
- Contract for turning a goal into a plan.
- AiPlanStep
- A single executable step in an AI plan.
- AiProviderRegistry
- Registry for chat, image, and embedding providers.
- AiRepository
- Bundle of stores used by the AI runtime for persistence.
- AiRetryPolicy
- Retry configuration for provider HTTP requests.
- AiRun
- Mutable state container for an individual agent execution.
- AiRunContext
- Shared execution context available to planners, executors, and agents.
- AiRunResult
- Final output of an agent run.
- AiRunStore
- Store for persisted AI run snapshots.
- AiThreadStore
- Store for persisted AI thread snapshots.
- AiTool
- Contract implemented by executable AI tools.
- AiToolContext
- Context passed into tool execution.
- AiToolInvocation
- Authorization request describing a planned tool call.
- AiToolPolicy
- Contract for authorizing tool execution.
- AiToolRegistry
- Registry for executable AI tools.
- AiTraceStore
- Store for persisted AI trace events.
- AiWorkflow
- Contract for named reusable AI workflows.
- AiWorkflowContext
- Execution context passed into a workflow.
- AiWorkflowRegistry
- Registry for named workflows.
- AiWorkflowRunResult
- Result wrapper returned by FlintAi.runWorkflow.
- AllowAllAiToolPolicy
- Permissive tool policy intended only for explicit opt-in use.
- AnthropicChatProvider
- Chat provider adapter for Anthropic's messages API.
- AutoAiMemoryStore
- Memory store that prefers the database and falls back to memory with warnings.
- AutoAiRepository
- Repository that prefers database stores and falls back to in-memory stores.
- BasicTaskAgent
- Minimal example agent that copies the incoming goal into run state.
- ChatEvent
- Streaming event emitted by a chat provider.
- ChatMessage
- Single chat message in a provider request.
- ChatProvider
- Contract for chat-capable AI providers.
- ChatRequest
- Input payload for a chat completion request.
- ChatResult
- Non-streaming chat completion result.
- ChatUsage
- Token usage metadata returned by a provider.
- DartIoAiHttpClient
-
Default
dart:iobased HTTP client for provider adapters. - DbAiArtifactStore
- Database-backed artifact store.
- DbAiMemoryStore
- Database-backed implementation of AiMemoryStore.
- DbAiRunStore
- Database-backed run store.
- DbAiThreadStore
- Database-backed thread store.
- DbAiTraceStore
- Database-backed trace store.
- DefaultAiExecutor
- Default executor that runs plan steps sequentially.
- DefaultAiPlanner
- Default planner that delegates planning to the agent itself.
- DenyAllAiToolPolicy
- Tool policy that rejects every tool invocation.
- EmbeddingProvider
- Contract for embedding-capable AI providers.
- EmbeddingRequest
- Input payload for an embedding request.
- EmbeddingResult
- Result payload for an embedding request.
- FlintAi
- Main facade for Flint's AI runtime.
- GeminiChatProvider
- Chat provider adapter for Google Gemini.
- ImageGenerationRequest
- Input payload for an image generation request.
- ImageGenerationResult
- Result payload for an image generation request.
- ImageProvider
- Contract for image-capable AI providers.
- InMemoryAiArtifactStore
- In-memory artifact store for development and tests.
- InMemoryAiMemoryStore
- In-memory implementation of AiMemoryStore for development and tests.
- InMemoryAiRunStore
- In-memory run store for development and tests.
- InMemoryAiThreadStore
- In-memory thread store for development and tests.
- InMemoryAiTraceStore
- In-memory trace store for development and tests.
- OpenAiChatProvider
- Chat provider adapter for OpenAI-compatible chat completions.
- RetryingAiHttpClient
- HTTP client wrapper that retries transient provider failures.
- SafeDefaultAiToolPolicy
- Safe default policy that only allows explicitly approved tools.
Enums
- AiRunStatus
- Lifecycle states for an AI run.
Functions
-
generateAiRunId(
) → String - Generates a random run id for AI executions.
Exceptions / Errors
- AiHttpException
- Normalized HTTP transport error used by AI providers.
- AiProviderException
- Normalized provider exception used across AI adapters.