Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
57 changes: 55 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,11 @@ agentcore # interactive TUI
│ │ ├── runtime # use the existing Runtime invoke experience
│ │ └── harness # use the existing Harness invoke experience
│ ├── status # inspect deployed project resources (TUI when run bare)
│ └── build # synthesize the project's CloudFormation templates
│ ├── build # synthesize the project's CloudFormation templates
│ ├── log
│ │ └── runtime # resolve a project Runtime and inspect its logs
│ └── traces
│ └── runtime
└── config # read/write global config values
```

Expand Down Expand Up @@ -186,6 +190,48 @@ agentcore project invoke harness \
Use `--target` to select a deployment target. When a project declares exactly
one resource of the requested type, `--name` may be omitted.

### Inspect project logs

Project logging resolves a logical resource name through the selected
deployment target, so physical IDs and deployment regions do not need to be
supplied:

```bash
agentcore project log runtime
agentcore project log runtime --name checkout --target production
agentcore project log runtime --name checkout --since 1h --level error
agentcore project log harness
agentcore project log harness --name support --target production
agentcore project log harness --name support --since 1h --level error
```

When the project declares exactly one resource of the requested type, `--name`
may be omitted. For Harnesses, the CLI also resolves the managed Harness to its
underlying Runtime before reading CloudWatch. Use the imperative
`agentcore runtime logs` or `agentcore harness logs` commands when addressing a
physical resource directly or working outside a project.

### Inspect project traces

Project tracing uses the same logical resource and deployment target
resolution, then lists or downloads traces from the resolved Runtime's
deployment region:

```bash
agentcore project traces runtime list
agentcore project traces runtime list --name checkout --target production --since 30m
agentcore project traces runtime get <traceId> --name checkout --output trace.json
agentcore project traces harness list
agentcore project traces harness list --name support --target production --since 30m
agentcore project traces harness get <traceId> --name support --output trace.json
```

When the project declares exactly one resource of the requested type, `--name`
may be omitted. For Harnesses, the CLI resolves the underlying Runtime before
querying its traces. Use the imperative `agentcore runtime traces` or
`agentcore harness traces` commands when addressing a physical resource
directly or working outside a project.

### Examples

```bash
Expand Down Expand Up @@ -251,7 +297,7 @@ agentcore runtime version list --id <runtimeId> --max-results 20
agentcore runtime endpoint get --id <runtimeId> --qualifier DEFAULT
agentcore runtime endpoint list --id <runtimeId> --max-results 20

# Follow a Runtime's logs live (Ctrl+C to stop); inside a project --id is optional
# Follow a Runtime's logs live by physical ID (Ctrl+C to stop)
agentcore runtime logs --id <runtimeId>
agentcore runtime logs --id <runtimeId> --level error --query "database"

Expand All @@ -263,6 +309,13 @@ agentcore runtime logs --id <runtimeId> --since 2026-08-30T12:00:00Z --until now
agentcore runtime traces list --id <runtimeId> --since 30m
agentcore runtime traces get <traceId> --id <runtimeId> --output trace.json

# Resolve project resources by logical name and deployment target
agentcore project log harness --name support --target production --since 1h
agentcore project traces runtime list --name checkout --target production --since 30m
agentcore project traces runtime get <traceId> --name checkout --output trace.json
agentcore project traces harness list --name support --target production --since 30m
agentcore project traces harness get <traceId> --name support --output trace.json

# Inspect AgentCore Memories without project configuration or deployment
agentcore memory get --id <memoryId>
agentcore memory get --id <memoryId> --view without_decryption
Expand Down
4 changes: 2 additions & 2 deletions src/core/eval.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -115,8 +115,8 @@ import {
runtimeLogGroup,
sanitizeQueryValue,
type InsightsRowLimit,
} from "./observability";
import { CloudWatchClient } from "./observability/index";
CloudWatchClient,
} from "./observability/index";
import type {
BatchEvaluationDetail,
CodeBasedUpdate,
Expand Down
13 changes: 2 additions & 11 deletions src/core/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,9 @@ import { HarnessClient } from "./harness";
import { IdentityClient } from "./identity";
import { MemoryClient } from "./memory";
import { PolicyClient } from "./policy";
import { ObservabilityClient } from "./observability";
import { CloudWatchClient } from "./observability/index";
import { CloudWatchClient, ObservabilityClient } from "./observability/index";
import { RuntimeClient } from "./runtime";
import type { OpenRuntimeShell } from "./runtime";
import { FsReadWriteJson } from "../io";
import type {
AwsClients,
AwsCredentials,
Expand Down Expand Up @@ -113,14 +111,7 @@ export class CoreClient implements AwsClients {
cloudWatch,
);

// Observability resolves a project's deployed runtime from its stack
// outputs, so it reads aws-targets.json through the same JSON layer the
// project manager uses.
this.observability = new ObservabilityClient(cloudWatch, {
readJson: new FsReadWriteJson({
logger: this.logger.child({ module: "observability" }),
}),
});
this.observability = new ObservabilityClient(cloudWatch);

this.projectManager = new FsProjectManager({
logger: this.logger.child({ module: "projectManager" }),
Expand Down
Loading
Loading