Skip to content

Resource Types

The AgentCore adapter manages seven resource types. Each resource has a constant name used in state serialization, a mapping to the PromptPack concept it represents, and defined create/update/delete/health-check behavior.

ConstantString ValuePack ConceptCreateUpdateDeleteHealth Check
ResTypeMemorymemoryMemory store configYesNoYesStatus ACTIVE
ResTypeToolGatewaytool_gatewayPack toolsYesNoYesStatus READY
ResTypeCedarPolicycedar_policyPrompt validators / tool_policyYesNoYesEngine ACTIVE
ResTypeAgentRuntimeagent_runtimeAgent members (or pack ID)YesYesYesStatus READY
ResTypeA2AEndpointa2a_endpointMulti-agent wiringYesNoNo-opAlways healthy
ResTypeEvaluatorevaluatorPack evals (llm_as_judge only)YesNoYesStatus ACTIVE
ResTypeOnlineEvalConfigonline_eval_configWires evaluators to agent tracesYesNoYesStatus ACTIVE

Resources pass through these status values during their lifecycle:

StatusConstantMeaning
createdResStatusCreatedResource was successfully created during Apply.
updatedResStatusUpdatedResource was successfully updated during Apply (redeployment).
failedResStatusFailedResource creation or update failed. The error is reported via callback.
plannedResStatusPlannedResource would be created (dry-run mode only).

Health check status values returned by Status:

StatusConstantMeaning
healthyStatusHealthyResource exists and is in its expected ready/active state.
unhealthyStatusUnhealthyResource exists but is not in the expected state, or the check returned an error.
missingStatusMissingResource was not found (404/NotFound from AWS).

Constant: ResTypeMemory String value: "memory"

Created when memory_store is set in the deploy config. The resource name is {pack_id}_memory. One memory resource is created per pack.

OperationAPI CallDetails
CreateCreateMemoryProvisions a Bedrock AgentCore memory with the configured strategy (episodic for "session", semantic for "persistent"). Sets event expiry to 30 days.
DeleteDeleteMemoryDeletes the memory resource by ID. Tolerates NotFound (already deleted).

Calls GetMemory and checks that Memory.Status equals ACTIVE.

ResultCondition
healthyStatus is ACTIVE
unhealthyStatus is any other value, or API error
missingNotFound error

On successful creation, the memory ARN is injected into PROMPTPACK_MEMORY_ID on the runtime config so that agent runtimes can discover the memory resource.


Constant: ResTypeToolGateway String value: "tool_gateway"

One tool_gateway resource is created per entry in pack.Tools. Resources are created in sorted key order.

OperationAPI CallDetails
Create (parent)CreateGatewayLazily creates a shared parent gateway on the first tool. The gateway uses MCP protocol type and no authorizer. Polls until READY.
Create (target)CreateGatewayTargetCreates a gateway target for each tool within the shared gateway.
DeleteDeleteGatewayDeletes the parent gateway by ID. Tolerates NotFound.

The parent gateway is created lazily on the first CreateGatewayTool call and reused for all subsequent targets within the same Apply invocation. The gateway name is {first_tool_name}_gw.

Calls GetGateway and checks that Status equals READY.

ResultCondition
healthyStatus is READY
unhealthyStatus is any other value, or API error
missingNotFound error

Not supported. Redeployment creates new gateway targets.


Constant: ResTypeCedarPolicy String value: "cedar_policy"

One cedar_policy resource is created per prompt that has validators or tool_policy defined. The adapter generates Cedar policy statements from these definitions.

OperationAPI CallDetails
Create (engine)CreatePolicyEngineCreates a policy engine per prompt. Polls until engine status is ACTIVE.
Create (policy)CreatePolicyCreates a Cedar policy within the engine using the generated statement.
Delete (policy)DeletePolicyDeletes the Cedar policy by engine ID and policy ID. Tolerates NotFound.
Delete (engine)DeletePolicyEngineDeletes the policy engine by ID. Tolerates NotFound.

Calls GetPolicyEngine and checks that Status equals ACTIVE.

ResultCondition
healthyEngine status is ACTIVE
unhealthyEngine status is any other value, or API error
missingNotFound error, or no policy_engine_id in metadata

The resource state stores additional metadata used for deletion and health checks:

KeyDescription
policy_engine_idThe policy engine identifier.
policy_engine_arnThe policy engine ARN. Used to populate PROMPTPACK_POLICY_ENGINE_ARN.
policy_idThe Cedar policy identifier within the engine.

After all policy resources are created, the adapter injects PROMPTPACK_POLICY_ENGINE_ARN into the runtime config as a comma-separated list of engine ARNs.

Not supported.


Constant: ResTypeAgentRuntime String value: "agent_runtime"

For multi-agent packs, one runtime is created per agent member (using the agent name). For single-agent packs, one runtime is created using the pack ID.

OperationAPI CallDetails
CreateCreateAgentRuntimeProvisions an AgentCore runtime with the configured role, environment variables, authorizer, and tags. Polls until status is READY.
UpdateUpdateAgentRuntimeUpdates an existing runtime with new environment variables and authorizer config. Polls until status is READY. Triggered on redeployment when the resource exists in prior state.
DeleteDeleteAgentRuntimeDeletes the runtime by ID. Tolerates NotFound.

This is the only resource type that supports update. On redeployment, if a runtime with the same type and name exists in the prior state, the adapter calls UpdateAgentRuntime instead of CreateAgentRuntime.

Calls GetAgentRuntime and checks that Status equals READY.

ResultCondition
healthyStatus is READY
unhealthyStatus is CREATE_FAILED, UPDATE_FAILED, or any non-READY value
missingNotFound error

After creation or update, the adapter polls GetAgentRuntime every 5 seconds for up to 60 attempts (5 minutes). Terminal failure states (CREATE_FAILED, UPDATE_FAILED) abort polling immediately. The runtime ARN is returned even if polling fails, allowing the state to record a partial result.

For multi-agent packs, after all runtimes are created, the adapter builds a JSON map of {agentName: runtimeARN} and injects it as PROMPTPACK_AGENTS on the entry agent via an UpdateAgentRuntime call.


Constant: ResTypeA2AEndpoint String value: "a2a_endpoint"

One a2a_endpoint resource is created per agent member in multi-agent packs. The resource name is {agent_name}_a2a. Not created for single-agent packs.

This is a logical resource. No separate AWS API call is made. The AgentCore runtime exposes A2A endpoints when configured with the appropriate environment variables.

OperationAPI CallDetails
CreateNoneReturns a placeholder ARN: arn:aws:bedrock:{region}:a2a-endpoint/{name}
DeleteNo-opLogged and skipped.

Always returns healthy. No AWS API call is made.

Not supported.


Constant: ResTypeEvaluator String value: "evaluator"

One evaluator resource is created per llm_as_judge eval in pack.Evals. Other eval types (regex, contains, etc.) are local-only and do not create AWS resources. The resource name is the eval’s ID field, or eval_{index} if the ID is empty.

OperationAPI CallDetails
CreateCreateEvaluatorProvisions an LLM-as-a-Judge evaluator with instructions, model config, and a numerical rating scale. Polls until status is ACTIVE.
DeleteDeleteEvaluatorDeletes the evaluator by ID. Tolerates NotFound (already deleted).

The eval definition’s trigger field maps to the SDK evaluator level: every_turn and sample_turns map to TRACE, while on_session_complete and sample_sessions map to SESSION.

The params map supports the following keys:

KeyDefaultDescription
instructions"Evaluate the agent response quality."Evaluation instructions for the LLM judge.
modelanthropic.claude-sonnet-4-20250514-v1:0Bedrock model ID for evaluation.
rating_scale_size5Number of levels in the numerical 1–N rating scale.

Calls GetEvaluator and checks that Status equals ACTIVE.

ResultCondition
healthyStatus is ACTIVE
unhealthyStatus is any other value, or API error
missingNotFound error

After creation, the adapter polls GetEvaluator every 5 seconds for up to 60 attempts (5 minutes). Terminal failure states (CREATE_FAILED, UPDATE_FAILED) abort polling immediately.

Not supported.


Constant: ResTypeOnlineEvalConfig String value: "online_eval_config"

One online_eval_config resource is created per pack when the pack has any llm_as_judge evals. The resource name is {pack_id}_online_eval. It wires the evaluators created in the previous phase to agent runtime traces via CloudWatch logs.

OperationAPI CallDetails
CreateCreateOnlineEvaluationConfigCreates an online evaluation config referencing all evaluator IDs, a CloudWatch data source, and a sampling rule. Polls until status is ACTIVE.
DeleteDeleteOnlineEvaluationConfigDeletes the config by ID. Tolerates NotFound (already deleted).

The CloudWatch log group is resolved from observability.cloudwatch_log_group if configured, otherwise defaults to /aws/bedrock/agentcore/{pack_id}. The sampling percentage defaults to 100% but can be overridden via the sample_percentage eval param.

Calls GetOnlineEvaluationConfig and checks that Status equals ACTIVE.

ResultCondition
healthyStatus is ACTIVE
unhealthyStatus is any other value, or API error
missingNotFound error

After creation, the adapter polls GetOnlineEvaluationConfig every 5 seconds for up to 60 attempts (5 minutes). Terminal failure states (CREATE_FAILED, UPDATE_FAILED) abort polling immediately.

Not supported.


Resources are created during Apply in dependency order across six phases:

PhaseStep IndexResource TypeProgress Range
Pre-stepmemory0%
10tool_gateway0—17%
21cedar_policy17—33%
32agent_runtime33—50%
43a2a_endpoint50—67%
54evaluator67—83%
65online_eval_config83—100%

Resources are destroyed in reverse dependency order:

  1. online_eval_config
  2. cedar_policy
  3. evaluator
  4. a2a_endpoint
  5. agent_runtime
  6. tool_gateway
  7. memory

Any resource types not in this list are destroyed last, after the ordered groups.