Emend
Schemas

Configuration Models

Data structures for system configuration — profile extraction, playbook extraction, evaluation, storage, and LLM settings.

Configmodel

Root configuration object for the Emend system. Every nested type below is linked — click through to see the fields each accepts.

PropType
storage_configrequiredStorageConfig
storage_config_testStorageConfigTest
agent_context_promptstring
tool_can_usearray[ToolUseConfig]
profile_extractor_configProfileExtractorConfig
user_playbook_extractor_configUserPlaybookExtractorConfig
agent_success_configAgentSuccessConfig
extraction_presetExtractionPreset
window_sizeinteger
stride_sizeinteger
api_key_configAPIKeyConfig
llm_configLLMConfig
retrieval_experiment_configRetrievalExperimentConfig
retrieval_experiment_historyarray[RetrievalExperimentRecord]
skip_should_run_checkboolean
enable_document_expansionboolean
retrieval_floorRetrievalFloorConfig
playbook_optimizer_configPlaybookOptimizerConfig
lineage_gcLineageGCConfig
expiry_reclamationExpiryReclamationConfig
governance_retentionGovernanceRetentionConfig
pending_tool_call_configPendingToolCallConfig
shadow_mode_enabledboolean
eval_sample_n_per_stratuminteger
eval_concurrency_limitinteger
shadow_comparison_judge_prompt_versionstring

Enterprise Offline Tuner Configuration

Enterprise get_config responses include a separate offline-tuner overlay:

{  "offline_tuner_config": {    "enabled": false  }}
Warning
offline_tuner_config is a response overlay, not a persisted shared Config field. The Python client's set_config method strips response overlays from Config model instances, including objects returned by get_config; a dictionary containing an overlay is rejected by strict shared-Config validation. The current release returns { "enabled": false } as availability status. Attempts to set enabled: true are unavailable: managed deployments return tuner_not_composed or config_reset_incomplete, and self-hosted deployments return deployment_unsupported. There is no launched or reachable offline-tuner generator, optimizer, automatic application, publication, or successor workflow.
StorageConfigmodel

StorageConfig is a union type — pass whichever variant matches your deployment. None is also accepted (no storage configured yet).

StorageConfigSQLitemodel

Local SQLite storage. The default for Local OSS.

PropType
db_pathstring
StorageConfigSupabasemodel

Supabase-backed storage for Hosted Enterprise configurations.

PropType
urlrequiredstring
keyrequiredstring
db_urlrequiredstring
read_urlstring
read_keystring
schemastring
StorageConfigPostgresmodel

Native PostgreSQL-backed storage for RDS or bring-your-own Postgres deployments.

PropType
typeliteral["postgres"]
db_urlrequiredstring
schemastring
pool_sizeinteger
pool_acquire_timeoutnumber
read_db_urlstring
read_pool_sizeinteger
read_pool_acquire_timeoutnumber
StorageConfigManagedSupabasemodel

Read-only representation returned when Hosted Enterprise manages storage credentials.

PropType
managed_byrequiredliteral["platform"]
schema_presentboolean
ToolUseConfigmodel

Defines a tool that the agent can use.

PropType
tool_namerequiredstring
tool_descriptionrequiredstring
ProfileExtractorConfigmodel

Configuration for profile extraction from interactions.

PropType
extractor_namestring
extraction_definition_promptrequiredstring
context_promptstring
tagging_definition_promptstring
should_extract_profile_prompt_overridestring
request_sources_enabledarray[string]
manual_triggerboolean
window_size_overrideinteger
stride_size_overrideinteger
UserPlaybookExtractorConfigmodel

Configuration for user-playbook extraction. Also exposed as PlaybookConfig (deprecated alias).

PropType
extractor_namestring
extraction_definition_promptrequiredstring
context_promptstring
tagging_definition_promptstring
aggregation_configPlaybookAggregatorConfig
deduplication_configDeduplicationConfig
request_sources_enabledarray[string]
window_size_overrideinteger
stride_size_overrideinteger
PlaybookAggregatorConfigmodel

Configuration for playbook aggregation (clustering similar user playbooks into agent playbooks).

PropType
min_cluster_sizeinteger
reaggregation_trigger_countinteger
clustering_similarityfloat | null
direction_overlap_thresholdfloat
DeduplicationConfigmodel

Controls bounded candidate generation when looking for existing playbooks to dedup against. The LLM consolidation stage makes the final duplicate decision.

PropType
search_thresholdfloat
search_top_kinteger
max_unified_content_charsinteger
RetrievalExperimentConfigmodel

The one retrieval experiment currently assigning agent search traffic.

PropType
experiment_idrequiredstring
holdout_percentagerequiredfloat
RetrievalExperimentRecordmodel

Historical lifecycle metadata for a retrieval experiment. It contains all RetrievalExperimentConfig fields plus:

PropType
started_atrequiredinteger
ended_atinteger
RetrievalFloorConfigmodel

Configuration for the read-path relevance floor applied on unified search (/api/search). Retrieved candidates are reranked by a cross-encoder, and any result whose relevance score falls below the per-arm floor is dropped. Because filtering happens after retrieval, a search arm can return fewer than top_k results — including zero — when nothing clears its floor.

Floors are raw, model-specific cross-encoder logits, not probabilities, so they are not bounded to [0, 1] and can be negative. Leave a floor null to use the calibrated default for the reranker discovered from the private inference service; a numeric value, including 0.0, is preserved exactly.

PropType
enabledboolean
pool_sizeinteger
profile_floorfloat | null
user_playbook_floorfloat | null
agent_playbook_floorfloat | null
PlaybookOptimizerConfigmodel

Opt-in (disabled by default) GEPA-backed optimizer for playbook content. Requires exactly one assistant backend — webhook_url or assistant_script_path, not both.

PropType
enabledboolean
optimize_agent_playbooksboolean
optimize_user_playbooksboolean
auto_update_pending_agent_playbooksboolean
auto_update_user_playbooksboolean
max_metric_callsinteger
max_turnsinteger
early_stop_scorefloat
reflection_minibatch_sizeinteger
max_validation_windowsinteger
min_commit_windowsinteger
min_commit_scorefloat
min_commit_likertinteger
use_mergeboolean
max_merge_invocationsinteger
reflection_modelstring
webhook_urlstring
webhook_auth_headerstring
webhook_timeout_secondsinteger
webhook_max_retriesinteger
webhook_backoff_base_secondsfloat
assistant_script_pathstring
assistant_script_argsarray[string]
scheduler_jitter_secondsfloat
cooldown_after_aborts_secondsinteger
abort_cooldown_thresholdinteger
PendingToolCallConfigmodel

Configuration for non-blocking pending tool calls (async information tools) during classic extraction.

PropType
enabledboolean
max_pending_followups_per_scopeinteger
pending_ttl_secondsinteger
dedup_cache_secondsinteger
prior_answer_valid_secondsinteger
similarity_thresholdfloat
resume_poll_interval_secondsfloat
resume_claim_ttl_secondsinteger
max_resume_attemptsinteger
max_finalization_attemptsinteger
hmac_secretsarray[string]
tool_overridesdict[str, PendingToolCallToolOverrideConfig]
LineageGCConfigmodel

Controls reclamation of retired profile and playbook tombstones after the audit and rollback window.

PropType
enabledboolean
tombstone_grace_window_daysinteger
poll_interval_secondsinteger
ExpiryReclamationConfigmodel
PropType
enabledboolean
GovernanceRetentionConfigmodel

Hosted Enterprise retention policy for audit events. These fields are accepted but do not perform audit-event reclamation in Local OSS.

PropType
audit_events_retention_enabledboolean
audit_events_retention_daysinteger
audit_events_delete_batch_limitinteger
AgentSuccessConfigmodel

Configuration for agent success evaluation.

PropType
evaluation_namestring
success_definition_promptrequiredstring
tagging_definition_promptstring
request_sources_enabledlist[string]
sampling_ratefloat
evaluation_only_sampling_ratefloat | null
retrieved_learning_sampling_ratefloat | null
window_size_overrideinteger
stride_size_overrideinteger
ExtractionPresetenum

Named presets that bundle window_size and stride_size. Accepts a string.

  • quick_chat — short conversations (support bots, quick Q&A). window_size=5, stride_size=3.
  • standard — general-purpose conversational agents. window_size=10, stride_size=5. (default)
  • long_form — long conversations (coding assistants, research). window_size=25, stride_size=10.
  • high_volume — high-traffic agents (1000+ daily interactions). window_size=15, stride_size=8.
APIKeyConfigmodel

API key configuration for LLM providers. When custom_endpoint is configured, it takes priority over all other providers for LLM completion calls (but not embeddings).

PropType
custom_endpointCustomEndpointConfig
openaiOpenAIConfig
anthropicAnthropicConfig
openrouterOpenRouterConfig
geminiGeminiConfig
minimaxMiniMaxConfig
deepseekDeepSeekConfig
dashscopeDashScopeConfig
zaiZAIConfig
moonshotMoonshotConfig
xaiXAIConfig
CustomEndpointConfigmodel

OpenAI-compatible custom endpoint. Validated against SSRF: cloud metadata endpoints are always blocked, and when EMEND_BLOCK_PRIVATE_URLS=true, literal private IPs plus hostnames resolving to private, loopback, link-local, reserved, multicast, or unspecified IPs are blocked.

PropType
modelrequiredstring
api_keyrequiredstring
api_baserequiredstring
OpenAIConfigmodel

OpenAI API configuration. At least one of api_key or azure_config must be provided.

PropType
api_keystring
azure_configAzureOpenAIConfig
AzureOpenAIConfigmodel
PropType
api_keyrequiredstring
endpointrequiredstring
api_versionstring
deployment_namestring
AnthropicConfigmodel
PropType
api_keyrequiredstring
OpenRouterConfigmodel
PropType
api_keyrequiredstring
GeminiConfigmodel
PropType
api_keyrequiredstring
MiniMaxConfigmodel
PropType
api_keyrequiredstring
DeepSeekConfigmodel
PropType
api_keyrequiredstring
DashScopeConfigmodel
PropType
api_keyrequiredstring
api_basestring
ZAIConfigmodel
PropType
api_keyrequiredstring
MoonshotConfigmodel
PropType
api_keyrequiredstring
XAIConfigmodel
PropType
api_keyrequiredstring
LLMConfigmodel

LLM model configuration overrides. If a field is None, the system default is used.

PropType
should_run_model_namestring
generation_model_namestring
embedding_model_namestring
pre_retrieval_model_namestring