CRD Reference

Complete specification for all AgentOps Custom Resource Definitions.

All CRDs belong to the API group agents.agentops.io/v1alpha1. The operator installs them automatically via the Helm chart.

kubectl get crds | grep agentops
agents.agents.agentops.io
agentruns.agents.agentops.io
agenttools.agents.agentops.io
agentresources.agents.agentops.io
channels.agents.agentops.io
providers.agents.agentops.io

Agent

Defines an AI agent workload. The mode field determines the lifecycle: daemon creates a Deployment + PVC + Service (always running), task creates a Job template (one prompt, exits).

apiVersion: agents.agentops.io/v1alpha1
kind: Agent
metadata:
  name: my-agent
  namespace: agents

Short name: ag

spec

FieldTypeRequiredDefaultDescription
modedaemon | taskYesAgent lifecycle mode.
modelstringYesPrimary model in provider/model format (e.g. anthropic/claude-sonnet-4-20250514).
providerRefs[]ProviderBindingYes (min 1)References to Provider CRs. See Provider.
providers[]ProviderRefNoDeprecated. Inline LLM providers with API key secret references. Use providerRefs instead.
imagestringNoghcr.io/samyn92/agent-runtime-fantasy:latestContainer image for the Fantasy agent runtime.
imagePullPolicyAlways | IfNotPresent | NeverNoIfNotPresentImage pull policy.
primaryProviderstringNoPreferred provider name when the model string has no provider prefix.
titleModelstringNoFast/cheap model for auto-titling sessions (daemon only).
fallbackModels[]stringNoFallback models tried in order if the primary fails.
systemPromptstringNoSystem prompt injected at the start of every session.
contextFiles[]ContextFileRefNoContext files loaded from ConfigMaps (e.g. AGENTS.md).
builtinTools[]stringNoall defaultsBuilt-in tools to enable: bash, read, edit, write, grep, ls, glob, fetch. Set to [] to disable all.
tools[]AgentToolBindingNoTool bindings referencing AgentTool CRs.
permissionTools[]stringNoTools requiring user approval before execution.
enableQuestionToolboolNofalseEnable the built-in “question” tool for interactive questions.
envmap[string]stringNoPlain-text environment variables.
secrets[]SecretEnvVarNoSecret-backed environment variables.
memoryMemorySpecNoMemory configuration for agentops-memory integration.
storageStorageSpecNoPersistent storage for daemon agents (PVC, RWO). Ignored for task mode.
resourceBindings[]AgentResourceBindingNoExternal resources bound to this agent.
discoveryDiscoverySpecNoControls visibility to other agents and delegation access.
toolHooksToolHooksSpecNoDefense-in-depth runtime constraints on tool calls.
concurrencyConcurrencySpecNoConcurrency control for parallel AgentRun execution.
resourcescorev1.ResourceRequirementsNoCompute resources for the agent container.
serviceAccountNamestringNoServiceAccount for the agent pod.
timeoutstringNo10mTask job timeout or per-prompt timeout for daemons.
maxStepsintNo100Maximum agent loop steps (safety limit).
temperaturefloat64NoTemperature for model calls (0.0 - 2.0).
maxOutputTokensint64NoMaximum output tokens per model call.
schedulestringNoCron schedule for creating periodic AgentRuns.
schedulePromptstringNoPrompt used when schedule triggers an AgentRun.
networkPolicyNetworkPolicySpecNoNetwork policy configuration.

spec.providerRefs[]

FieldTypeRequiredDescription
namestringYesName of a Provider CR in the same namespace.
overridesProviderCallDefaultsNoPer-agent overrides for the provider’s default call options.

spec.memory

FieldTypeRequiredDefaultDescription
serverRefstringYesReference to the memory server (AgentTool CR name or service name).
projectstringNoAgent CR nameProject name for scoping memories.
contextLimitintNo5Number of recent context entries injected per turn (0-50).
autoSummarizeboolNotrueEnable auto-summarization at session end.
autoSaveboolNotrueAllow the agent to save memories via mem_save.
autoSearchboolNotrueAllow the agent to search memories via mem_search.

spec.discovery

FieldTypeRequiredDefaultDescription
descriptionstringNoShort description shown to other agents (max 500 chars).
tags[]stringNoTags for categorization and filtering (max 20).
scopenamespace | explicit | hiddenNonamespaceVisibility in list_task_agents.
allowedCallers[]stringNoAgent names allowed to delegate (only when scope is explicit).

spec.concurrency

FieldTypeRequiredDefaultDescription
maxRunsintNo1Maximum concurrent runs.
policyqueue | reject | replaceNoqueuePolicy when at max concurrency.

spec.toolHooks

FieldTypeDescription
blockedCommands[]stringPatterns blocked in bash commands (substring match).
allowedPaths[]stringRestrict file tool paths to these prefixes.
auditTools[]stringTools to audit-log via afterToolCall hook.
memorySaveRules[]MemorySaveRuleSpecDeclarative rules for auto-saving tool results as observations.
contextInjectTools[]ContextInjectRuleSpecPre-execution memory queries before matched tools run.

status

FieldTypeDescription
phasePending | Running | Ready | FailedCurrent phase (Running = daemon, Ready = task).
serviceURLstringService URL for daemon agents (e.g. http://agent.ns.svc:4096).
readyReplicasint32Number of ready replicas (daemon only).
storagePVCstringName of the PVC created for daemon agents.
activeModelstringCurrently active model (may differ if fallback triggered).
conditions[]ConditionStandard conditions: Ready, ToolsReady, ProvidersReady, ResourcesReady.

AgentRun

Tracks one execution of an Agent. Created by Channels, the run_agent delegation tool, schedules, or the console.

apiVersion: agents.agentops.io/v1alpha1
kind: AgentRun
metadata:
  name: my-run-abc123
  namespace: agents

Short name: ar

spec

FieldTypeRequiredDefaultDescription
agentRefstringYesName of the Agent CR to run.
promptstringYesPrompt to send to the agent.
sourcechannel | agent | schedule | consoleYesWhat created this run.
sourceRefstringNoName of the source (Channel name, agent name, or “schedule”).
gitAgentRunGitSpecNoGit workspace configuration for task agents.

spec.git

FieldTypeRequiredDefaultDescription
resourceRefstringYesAgentResource CR name providing the repository URL and credentials.
branchstringYesFeature branch to work on. Created from baseBranch if it doesn’t exist.
baseBranchstringNorepo defaultBase branch for the PR/MR target.

status

FieldTypeDescription
phasePending | Queued | Running | Succeeded | FailedCurrent phase.
modedaemon | taskMode inherited from the target agent.
outputstringTextual output from the agent run.
startTimeTimeWhen execution started.
completionTimeTimeWhen execution completed.
jobNamestringJob name (task mode only).
toolCallsintNumber of tool calls made.
tokensUsedintTotal tokens consumed.
coststringEstimated cost in USD.
modelstringActual model used.
traceIDstringOpenTelemetry trace ID (hex-encoded 128-bit).
pullRequestURLstringPR/MR URL (when spec.git is set).
commitsintNumber of commits pushed.
branchstringGit branch the agent worked on.
conditions[]ConditionStandard conditions: Complete.

AgentTool

Unified tool catalog entry. Defines a tool by what it does, not how it’s delivered. Exactly one source block must be set.

apiVersion: agents.agentops.io/v1alpha1
kind: AgentTool
metadata:
  name: kubectl
  namespace: agents

Short name: agtool

spec

FieldTypeRequiredDescription
descriptionstringNoHuman-friendly description shown in the console UI.
categorystringNoCategory for console UI grouping (e.g. infrastructure, coding, data).
uiHintstringNoBranded card renderer hint. Known values: kubernetes-resources, helm-release, terminal, code, diff, file-tree, search-results, file-created, web-fetch, agent-run.
defaultPermissionsToolPermissionsNoDefault permission configuration for this tool.

Source blocks (exactly one required)

spec.oci

OCI artifact containing an MCP tool server binary. Pulled via crane init container, launched as stdio MCP server.

FieldTypeRequiredDescription
refstringYesFull OCI reference (e.g. ghcr.io/samyn92/agent-tools/kubectl:0.3.3).
digeststringNoOptional digest for pinning.
pullPolicyAlways | IfNotPresent | NeverNoPull policy.
pullSecretSecretKeyRefNoPull secret for private registries.

spec.configMap

Tool script mounted from a ConfigMap at /tools/<name>.

FieldTypeRequiredDescription
namestringYesConfigMap name.
keystringYesKey within the ConfigMap.

spec.inline

Inline tool content (< 4KB, prototyping only). Operator creates a ConfigMap, mounted at /tools/<name>.

FieldTypeRequiredDescription
contentstringYesTool script content.

spec.mcpServer

MCP server deployed by the operator as a Deployment + Service. Agents connect via the gateway sidecar.

FieldTypeRequiredDefaultDescription
imagestringYesContainer image for the MCP server.
portint32No8080Port the MCP server listens on.
command[]stringNoOverride command for the container.
envmap[string]stringNoPlain-text environment variables.
secrets[]SecretEnvVarNoSecret-backed environment variables.
serviceAccountNamestringNoServiceAccount for the MCP server pod.
resourcesResourceRequirementsNoCompute resources.
healthCheckMCPHealthCheckNoHealth check configuration.

spec.mcpEndpoint

External MCP endpoint. Operator health-checks, agents connect via the gateway sidecar.

FieldTypeRequiredDefaultDescription
urlstringYesURL of the external MCP server.
transportsse | streamable-httpNosseTransport type.
headersmap[string]stringNoStatic headers.
oauthMCPOAuthConfigNoOAuth configuration.
healthCheckMCPHealthCheckNoHealth check configuration.

spec.skill

OCI artifact containing skill markdown (system prompt extensions). Pulled via crane init container, mounted as context files.

FieldTypeRequiredDescription
refstringYesFull OCI reference for the skill package.
digeststringNoOptional digest for pinning.
pullPolicyAlways | IfNotPresent | NeverNoPull policy.
pullSecretSecretKeyRefNoPull secret for private registries.

status

FieldTypeDescription
phasePending | Deploying | Ready | FailedCurrent phase. Deploying applies to mcpServer source only.
sourceTypestringDetected source type: oci, configMap, inline, mcpServer, mcpEndpoint, skill.
serviceURLstringService URL for mcpServer/mcpEndpoint sources.
tools[]DiscoveredToolMCP tools discovered via ListTools introspection.
conditions[]ConditionStandard conditions: Ready.

AgentResource

Declarative catalog entry for an external resource (Git repo, GitLab group, S3 bucket, documentation) that agents can work with. Agents bind to resources via spec.resourceBindings, and users can select them in the console UI to scope prompts.

apiVersion: agents.agentops.io/v1alpha1
kind: AgentResource
metadata:
  name: my-repo
  namespace: agents

Short name: ares

spec

FieldTypeRequiredDescription
kindgithub-repo | github-org | gitlab-project | gitlab-group | git-repo | s3-bucket | documentationYesKind of resource.
displayNamestringYesHuman-friendly display name shown in the console UI.
descriptionstringNoOptional description for UI tooltips.
credentialsSecretKeyRefNoCredentials for accessing the resource.

Kind-specific configuration

Exactly one of the following blocks must be set, matching the kind field.

spec.github (kind: github-repo)

FieldTypeRequiredDescription
ownerstringYesRepository owner (user or org).
repostringYesRepository name.
defaultBranchstringNoDefault branch (uses repo default if unset).
apiURLstringNoGitHub API base URL (for GitHub Enterprise).

spec.githubOrg (kind: github-org)

FieldTypeRequiredDescription
orgstringYesOrganization name.
repoFilter[]stringNoGlob patterns to include specific repos.
apiURLstringNoGitHub API base URL.

spec.gitlab (kind: gitlab-project)

FieldTypeRequiredDescription
baseURLstringYesGitLab base URL (e.g. https://gitlab.com).
projectstringYesProject path (e.g. group/subgroup/project).
defaultBranchstringNoDefault branch.

spec.gitlabGroup (kind: gitlab-group)

FieldTypeRequiredDescription
baseURLstringYesGitLab base URL.
groupstringYesGroup path (e.g. myorg or myorg/subgroup).
projects[]stringNoFilter to specific projects.

spec.git (kind: git-repo)

FieldTypeRequiredDescription
urlstringYesGit clone URL (HTTPS or SSH).
branchstringNoDefault branch.
sshKeySecretSecretKeyRefNoSSH private key secret.

spec.s3 (kind: s3-bucket)

FieldTypeRequiredDescription
bucketstringYesBucket name.
regionstringNoAWS region.
endpointstringNoEndpoint URL for S3-compatible storage (e.g. MinIO).
prefixstringNoPrefix to scope access within the bucket.

spec.documentation (kind: documentation)

FieldTypeRequiredDescription
urls[]stringNoURLs to documentation pages.
configMapRefSecretKeyRefNoConfigMap containing documentation content.

status

FieldTypeDescription
phasePending | Ready | FailedCurrent phase.
conditions[]ConditionStandard conditions: Ready.

Channel

Universal external ingress. Bridges external platforms to Agents. Supports chat platforms (Telegram, Slack, Discord) and event-driven webhooks (GitHub, GitLab, generic webhook).

apiVersion: agents.agentops.io/v1alpha1
kind: Channel
metadata:
  name: my-webhook
  namespace: agents

Short name: ch

spec

FieldTypeRequiredDefaultDescription
typetelegram | slack | discord | gitlab | github | webhookYesChannel type.
agentRefstringYesName of the Agent CR to target.
imagestringYesContainer image for the channel bridge.
imagePullPolicyAlways | IfNotPresent | NeverNoIfNotPresentImage pull policy.
replicasint32No1Number of replicas for the channel bridge.
resourcesResourceRequirementsNoCompute resources for the channel container.
promptstringNoGo text/template rendered with event data. Required for event-driven types.
webhookWebhookIngressConfigNoWebhook ingress configuration (host, TLS).

Platform configuration (exactly one, matching type)

spec.telegram

FieldTypeRequiredDescription
botTokenSecretSecretKeyRefYesSecret containing the bot token.
allowedUsers[]stringNoAllowed Telegram user IDs.
allowedChats[]stringNoAllowed Telegram chat IDs.

spec.slack

FieldTypeRequiredDescription
botTokenSecretSecretKeyRefYesSecret containing the bot token.
allowedChannels[]stringNoAllowed Slack channel IDs.

spec.discord

FieldTypeRequiredDescription
botTokenSecretSecretKeyRefYesSecret containing the bot token.
allowedChannels[]stringNoAllowed Discord channel IDs.

spec.gitlab

FieldTypeRequiredDescription
events[]stringYesGitLab webhook events (e.g. Issue Hook).
actions[]stringNoFilter by action (e.g. open).
labels[]stringNoFilter by labels on the object.
secretSecretKeyRefYesWebhook secret for signature verification.

spec.github

FieldTypeRequiredDescription
events[]stringYesGitHub webhook events (e.g. pull_request).
actions[]stringNoFilter by action (e.g. opened, synchronize).
labels[]stringNoFilter by labels on the object.
secretSecretKeyRefYesWebhook secret for signature verification.

spec.webhookConfig

FieldTypeRequiredDescription
secretSecretKeyRefNoOptional HMAC secret for signature verification.

spec.webhook (ingress)

FieldTypeRequiredDescription
hoststringYesHostname for the ingress.
pathstringNoPath (defaults to /).
ingressClassNamestringNoIngress class name.
tls.clusterIssuerstringNocert-manager cluster issuer name.

status

FieldTypeDescription
phasePending | Ready | FailedCurrent phase.
serviceURLstringInternal service URL.
webhookURLstringExternal webhook URL (if ingress configured).
conditions[]ConditionStandard conditions: Ready.

Provider

Shared LLM provider configuration. Extracts provider type, credentials, endpoint, and per-call defaults into a reusable resource that multiple agents can reference via spec.providerRefs. The operator validates the referenced Secret on reconcile and reports readiness via status conditions.

apiVersion: agents.agentops.io/v1alpha1
kind: Provider
metadata:
  name: my-provider
  namespace: agents

Short name: prov

spec

FieldTypeRequiredDefaultDescription
typeanthropic | openai | google | azure | bedrock | openrouter | openaicompatYesFantasy SDK backend.
apiKeySecretSecretKeyRefYesSecret containing the API key.
endpointProviderEndpointNoAPI endpoint overrides.
configProviderConfigNoType-specific configuration.
defaultsProviderCallDefaultsNoDefault per-call options for all agents using this provider.

spec.endpoint

FieldTypeRequiredDefaultDescription
baseURLstringNoSDK defaultBase URL override. Required for openaicompat.
headersmap[string]stringNoCustom HTTP headers injected into every API request.

spec.config

Only fields relevant to spec.type are used; others are ignored.

FieldTypeApplies toDescription
organizationstringopenaiOpenAI organization ID (sets OpenAI-Organization header).
projectstringopenaiOpenAI project ID (sets OpenAI-Project header).
useResponsesAPIboolopenai, azure, openaicompatUse the OpenAI Responses API.
azureAPIVersionstringazureAzure OpenAI API version (default: 2025-01-01-preview).
vertexVertexConfiganthropic, googleVertex AI configuration.
bedrockboolanthropic, bedrockEnable AWS Bedrock mode.

spec.config.vertex

FieldTypeRequiredDescription
projectstringYesGCP project ID.
locationstringYesGCP region (e.g. us-central1).

spec.defaults

Per-call options applied to every agent using this provider. Agents can override these via providerRefs[].overrides. Only the block matching spec.type is used.

FieldTypeApplies toDescription
anthropicAnthropicCallDefaultsanthropic, bedrockAnthropic-specific call defaults.
openaiOpenAICallDefaultsopenai, azure, openaicompatOpenAI-specific call defaults.
googleGoogleCallDefaultsgoogleGoogle-specific call defaults.

spec.defaults.anthropic

FieldTypeDescription
effortlow | medium | high | maxExtended thinking effort level.
thinkingBudgetTokensint64Maximum tokens for extended thinking.
disableParallelToolUseboolDisable parallel tool calls.

spec.defaults.openai

FieldTypeDescription
reasoningEffortlow | medium | highReasoning effort for o-series models.
serviceTierstringOpenAI service tier (e.g. auto, flex).

spec.defaults.google

FieldTypeDescription
thinkingLevelLOW | MEDIUM | HIGH | MINIMALGemini thinking level.
thinkingBudgetTokensint64Maximum tokens for thinking. Mutually exclusive with thinkingLevel.
safetySettings[]GoogleSafetySettingContent safety thresholds.

spec.defaults.google.safetySettings[]

FieldTypeDescription
categorystringHarm category (e.g. HARM_CATEGORY_HATE_SPEECH, HARM_CATEGORY_DANGEROUS_CONTENT).
thresholdstringBlock threshold (e.g. BLOCK_NONE, BLOCK_ONLY_HIGH, BLOCK_MEDIUM_AND_ABOVE).

status

FieldTypeDescription
phasePending | Ready | FailedCurrent phase. Ready when the referenced Secret exists and contains the expected key.
messagestringHuman-readable status message.
boundAgentsintNumber of Agent CRs referencing this provider via providerRefs.
conditions[]ConditionStandard conditions: Ready.

Shared types

SecretKeyRef

FieldTypeDescription
namestringName of the Secret.
keystringKey within the Secret.

SecretEnvVar

FieldTypeDescription
namestringEnvironment variable name.
secretRefSecretKeyRefReference to the secret key.

AgentToolBinding

FieldTypeDescription
namestringName of the AgentTool CR.
permissionsMCPPermissionsOverride permissions from AgentTool defaults.
directTools[]stringMCP tools to promote to first-class (mcpServer/mcpEndpoint only).
autoContextboolAuto-inject skill content into every prompt (skill sources only).

AgentResourceBinding

FieldTypeDescription
namestringName of the AgentResource CR to bind.
readOnlyboolMark the resource as read-only (advisory, enforced by runtime).
autoContextboolAuto-inject resource context into every prompt.

ProviderBinding

FieldTypeDescription
namestringName of the Provider CR in the same namespace.
overridesProviderCallDefaultsPer-agent overrides for the provider’s call defaults.