#![allow(clippy::result_large_err)]
#![deny(missing_docs)]
pub mod acting;
pub mod action_ledger;
pub mod agent;
pub mod agent_invoker;
pub mod agent_loader;
pub mod approval;
pub mod audit_log;
pub mod budget;
pub mod callbacks;
pub mod clock;
pub mod computer;
#[cfg(feature = "conformance")]
pub mod conformance;
pub mod context;
pub mod credential;
pub mod decision;
pub mod egress;
pub mod error;
pub mod event;
mod event_stream;
pub mod event_summarizer;
pub mod evidence;
pub mod governance;
pub mod governance_state;
pub mod grounding;
pub mod history;
pub mod identity;
pub mod instruction_template;
pub mod intra_compaction;
pub mod lease;
pub mod metering;
pub mod model;
#[cfg(feature = "ort")]
pub mod onnx;
pub mod policy;
pub mod principal;
pub mod queue_source;
pub mod request_context;
pub mod review;
pub mod run_store;
pub mod schedule;
pub mod schema_adapter;
pub mod schema_cache;
pub mod schema_utils;
pub mod shared_state;
pub mod spend;
pub mod steering;
pub mod subagent;
pub mod subject;
pub mod tool;
pub mod tool_concurrency;
pub mod tool_response;
pub mod types;
pub mod usage;
#[cfg(feature = "webhooks")]
pub mod webhook;
#[cfg(feature = "webhook-delivery")]
pub mod webhook_delivery;
pub use acting::{
ActingConfig, PRINCIPAL_NOT_ALLOWED_CODE, SUBJECT_MISMATCH_CODE, StaticSubjectDelegation,
SubjectDelegationPolicy, SubjectDelegationRequest, subject_mismatch_error,
};
pub use action_ledger::{
ActionLedger, ActionOutcome, ActionRecord, InMemoryActionLedger, LedgerAnswer, LedgeredCall,
NOT_RUN_PREFIX, OUTCOME_UNKNOWN_STATUS, begin_ledgered_call, held_call_ledger_key,
interrupted_call_response, is_not_run, is_outcome_unknown, json_digest, not_run_text,
outcome_unknown_response, record_outcome_unknown,
};
pub use agent::{
Agent, AgentCapabilities, AgentInteractionMode, AgentKind, AgentProfile, AgentRelationshipKind,
AgentTopology, AgentTopologyMember, AgentTopologyRelationship, AgentTransferDecision,
AgentTransferRequest, EventStream, ResolvedContext, ToolProfile, screen_user_input_with,
};
pub use agent_invoker::AgentInvoker;
pub use agent_loader::{AgentLoader, MultiAgentLoader, SingleAgentLoader};
pub use approval::{
APPROVAL_REAPPLY_GRACE, ApprovalAction, ApprovalCall, ApprovalCursor, ApprovalDecision,
ApprovalDelegation, ApprovalEventKind, ApprovalNotification, ApprovalNotifier, ApprovalPolicy,
ApprovalRequest, ApprovalRequestQuery, ApprovalResolution, ApprovalRisk, ApprovalRoute,
ApprovalRouter, ApprovalService, ApprovalState, ApprovalTick, ApproverDirectory,
ApproverSelector, DEFAULT_APPROVAL_PAGE, DelegationScope, DelegationWindow, EscalationStep,
ExpiryAction, InboxPage, InboxQuery, StoreApprovalService,
};
pub use budget::{
BUDGET_LIMIT_KEY, BUDGET_RECORDED_KEY, BudgetExceeded, BudgetLimit, BudgetTracker, BudgetUsage,
ModelCallMeter, RunBudget, budget_exceeded_event, generate_with_budget, meter_stream,
};
pub use callbacks::{
AfterAgentCallback, AfterModelCallback, AfterToolCallback, AfterToolCallbackFull,
BaseEventsSummarizer, BeforeAgentCallback, BeforeModelCallback, BeforeModelResult,
BeforeToolCallback, CALLBACK_PANICKED_CODE, EventsCompactionConfig, GlobalInstructionProvider,
HistoryProcessor, InstructionProvider, InvocationHooks, OnToolErrorCallback, guard_callback,
};
pub use clock::{Clock, ManualClock, SystemClock};
pub use computer::{
ActuationOutput, ComputerAction, ComputerActionKind, ComputerActuator, MouseButton,
ScreenPoint, Screenshot, ScrollDirection,
};
pub use context::{
Artifacts, BUILTIN_TOOL_ORIGIN, BackpressurePolicy, BatchCall, CallbackContext,
IncludeContents, InvocationContext, MAX_STATE_KEY_LEN, Memory, MemoryEntry, ReadonlyContext,
ReadonlyState, RunConfig, RunConfigBuilder, RuntimeToolset, STATIC_TOOL_ORIGIN, SecretRequest,
SecretService, Session, State, StreamingMode, ToolCallbackContext, ToolConcurrencyConfig,
ToolConfirmationDecision, ToolConfirmationHandler, ToolConfirmationPolicy,
ToolConfirmationRequest, ToolOrigin, ToolOutcome, tool_call_fingerprint, validate_state_key,
};
pub use credential::{
AgentCredential, CredentialBroker, CredentialKind, CredentialSecret, IdentitySource,
RevocationScope, ScopedToken, StaticIdentitySource, resource_indicator,
};
pub use decision::{Choice, ChoiceOption, Decider, Decision, decide};
pub use error::{
AdkError, ErrorCategory, ErrorComponent, ErrorDetails, ErrorDiagnostics, Result, RetryHint,
UPSTREAM_EXCERPT_BYTES, json_error_summary, upstream_excerpt,
};
pub use event::{
Event, EventActions, EventCompaction, KEY_PREFIX_APP, KEY_PREFIX_TEMP, KEY_PREFIX_USER,
TOOL_PROGRESS_CALL_ID_KEY, TOOL_PROGRESS_STREAM_KEY, ToolCallView, ToolResultView,
WorkflowPosition, event_belongs_to_branch,
};
pub use event_stream::EventTextDeltas;
pub use event_summarizer::LlmEventSummarizer;
pub use evidence::{ArtifactLocator, Evidence, ImageEvidence};
pub use governance::{
ApprovalScope, ApprovalStore, BUILTIN_TOOLS_WITHHELD_KEY, BuiltinToolGovernor,
BuiltinToolWithholding, CONFIRMATION_PENDING_STATUS, DEFAULT_TOOL_CONFIRMATION_TIMEOUT,
DRAW_TOOL_NAMES, GOVERNANCE_FROZEN_CODE, GOVERNANCE_STALE_CODE, GovernanceControl,
GovernanceMirrorConfig, GovernanceWatch, GovernedCall, HeldToolCall, InMemoryApprovalStore,
PendingApproval, REQUESTED_CALL_ID_PREFIX, REQUESTED_CALL_METADATA_KEY, RequestedCall,
RequestedCallSeal, RequestedVia, RequestedViaKind, SealedCall, ToolApproval, ToolAuthorization,
ToolCallScreen, ToolGate, WithheldBuiltinTool, authorize_tool_call, builtin_tool_configuration,
confirm_tool_call, confirmation_decision_available, confirmation_pending_response,
held_call_compaction_limit, held_tool_calls, is_confirmation_pending,
supersede_pending_responses, untrusted_block, withdraw_held_call, workflow_resume_positions,
};
pub use governance_state::{
GovernanceScope, GovernanceState, GovernanceStateStore, InMemoryGovernanceStateStore,
};
pub use grounding::{GroundingSource, bind_markdown_citations, record_grounding_sources};
pub use identity::{
AdkIdentity, AppName, ExecutionIdentity, IdentityError, InvocationId, SessionId, UserId,
};
pub use instruction_template::inject_session_state;
pub use intra_compaction::{
CompactedHistory, CompactionTrigger, HistoryCompactionRequest, HistoryCompactor,
IntraCompactionConfig, NativeCompactionRequest,
};
pub use lease::{InMemoryLeaseStore, Lease, LeaseStore};
pub use metering::{
LlmSpendEstimate, MeteredLlm, MeteredUsage, ModelCallScope, ModelSpendHold,
UNBOUNDED_HOLD_MICRO_USD, UsageCall, UsageHold, generate_metered, meter_usage,
vendor_for_model,
};
pub use model::{
BuiltinToolUse, CacheCapable, CitationMetadata, CitationSource, ContextCacheConfig, Effort,
FinishReason, GenerateContentConfig, Llm, LlmRequest, LlmResponse, LlmResponseStream,
ToolDeclarations, ToolDeclarationsIter, ToolDeclarationsKeys, ToolDeclarationsValues,
UsageMetadata, nullable_count,
};
pub use model::{
DataDestination, DataLocality, NativeCompaction, NativeWebSearch, NativeWebSearchTool,
};
pub use policy::{
ArgPredicate, DeclarativePolicy, DeclarativePolicyBuilder, PolicyCall, PolicyDecision,
PolicyRule, StrictestPolicy, ToolPolicy, ToolPolicyRequest,
};
pub use principal::{
ActingContext, AgentId, AgentPrincipal, PrincipalError, SubjectKind, SubjectRef,
};
pub use queue_source::{
InMemoryQueueSource, IngressReport, QueueIngress, QueueMessage, QueueSource,
};
pub use request_context::RequestContext;
pub use review::{
DEFAULT_REVIEW_TIMEOUT, MODEL_REVIEWER_PREFIX, ModelApprover, REVIEW_SOURCE, ReviewScope,
ReviewVerdict, ToolReview, ToolReviewer,
};
pub use run_store::{
ClaimedRun, DurableRunStore, Enqueued, InMemoryRunStore, NewRun, OnConflict, RetryBackoff,
RunCheckpointRef, RunFilter, RunOutcome, RunRecord, RunState,
};
pub use schedule::{
FirePlan, InMemoryScheduleStore, Jitter, MissedFirePolicy, Schedule, ScheduleSpec,
ScheduleStore, firing_idempotency_key, manual_idempotency_key, plan_fires,
};
pub use schema_adapter::{GenericSchemaAdapter, SchemaAdapter};
pub use schema_cache::SchemaCache;
pub use shared_state::{SharedState, SharedStateError};
pub use spend::{
DEFAULT_RESERVATION_TTL, InMemorySpendLedger, ReservationId, SPEND_LIMIT_EXCEEDED_CODE,
SpendError, SpendKey, SpendLedger, SpendLimit, SpendLimits, SpendPeriod, usd_to_micro_usd,
};
pub use steering::{
STEER_INVALID_MESSAGE_CODE, STEER_NO_ACTIVE_RUN_CODE, SteerOutcome, SteerReceipt,
SteeringInbox, SteeringMarker, SteeringMessage, validate_steering_message,
};
pub use subagent::{
FollowUp, RunLimits, SubagentHost, SubagentLaunch, SubagentMode, SubagentParent,
SubagentRecord, SubagentRequest, SubagentScope, SubagentStart, SubagentStatus, SubagentTarget,
ToolCeiling,
};
pub use tool::{
BatchGroup, DUPLICATE_TOOL_NAME_CODE, RetryBudget, Tool, ToolContext, ToolEffect,
ToolExecutionStrategy, ToolPredicate, ToolRegistry, Toolset, ValidationMode,
ensure_unique_tool_names,
};
pub use tool_concurrency::{ConcurrencyPermit, ToolConcurrencyManager};
pub use tool_response::{
INVALID_TOOL_ARGUMENTS_KEY, RESULT_WITHHELD_STATUS, TOOL_ERROR_MESSAGE_LIMIT,
TOOL_INVALID_ARGUMENTS_CODE, TOOL_PERMISSION_DENIED_CODE, TOOL_RESULT_ERROR_CATEGORY_KEY,
TOOL_RESULT_ERROR_CODE_KEY, TOOL_RESULT_STATUS_KEY, ToolResultScreen, ToolResultStatus,
invalid_tool_arguments, invalid_tool_arguments_reason, result_blocked_response,
result_withheld_response, screen_tool_result, tool_error_response,
};
pub use types::{
BlobResourceContents, Content, EmbeddedResource, FileDataPart, FunctionResponseData,
GENERATED_CALL_ID_PREFIX, InlineDataPart, MAX_INLINE_DATA_SIZE, Part, TextResourceContents,
};
pub use url::Url;
pub use usage::{UnitRate, UsageUnit, UsageVector};
pub use async_trait::async_trait;
pub fn ensure_crypto_provider() {
#[cfg(feature = "rustls")]
{
static CRYPTO_INIT: std::sync::Once = std::sync::Once::new();
CRYPTO_INIT.call_once(|| {
let _ = rustls::crypto::aws_lc_rs::default_provider().install_default();
});
}
}