Observability and cost controls
This page covers monitoring your harness, controlling execution costs, and managing resource tags.
Observability
Every harness invocation automatically generates traces, logs, and metrics through AgentCore Observability in CloudWatch. Model calls, tool invocations, memory operations, shell commands: each step appears with timing and payload details. No extra configuration. Traces are available from the first invocation.
Example
Learn more: Observability overview · metrics · telemetry
CloudTrail
Harness operations are logged to AWS CloudTrail as management events (control plane) and data events (data plane). In CloudTrail, harness resources appear under the AWS::BedrockAgentCore::Runtime resource type rather than a harness-specific type. Harness is a managed abstraction over AgentCore Runtime, and CloudTrail events reflect the underlying runtime resource for consistency.
All harness CloudTrail events use resources.type = AWS::BedrockAgentCore::Runtime. The event names are:
-
CreateHarness,UpdateHarness,DeleteHarness,GetHarness,ListHarnesses(management events) -
InvokeAgentRuntime,InvokeAgentRuntimeCommand(data events)
Note
Data plane operations appear as InvokeAgentRuntime and InvokeAgentRuntimeCommand in CloudTrail, matching the underlying Runtime API. The resources.ARN field contains the harness ARN for control plane events and the runtime ARN for data plane events.
Control cost with limits
Set hard caps so a runaway agent can’t burn through resources:
-
maxIterations- reasoning/action cycles per invocation. Default 75. -
timeoutSeconds- wall-clock timeout for a single invocation. Default 3600. -
maxTokens- token budget per invocation. Default N/A. -
idleRuntimeSessionTimeout- how long an idle microVM stays warm. Default 900. -
maxLifetime- maximum lifetime of a microVM session. Default 28800.
All limits are optional; omit them to use service defaults.
Example
Tags
Apply tags to your harness for cost allocation and access control.
Example
Tags flow through to deployed CloudFormation resources.
Related topics
-
Persist memory and filesystem - memory persists conversation context across sessions
-
Environment and Skills - environment variables and custom containers
-
Security and access controls - execution role policy and IAM permissions