Open Agent Runtime Selection and Log Auditing: A Practical Guide
This guide explains how to choose an open agent runtime and the right entry point for a given task, how to use session logs and execution traces for auditing, and how to perform log redaction and permission audits. It covers four entry types, key log fields, sequence-gap troubleshooting, redaction steps, and a weighted selection scorecard.
1. Positioning: Open Runtimes and Coding Assistants Serve Different Users
Bottom line: before selecting, confirm whether you need an end product or infrastructure you can assemble yourself.
The community had high expectations for an agent runtime framework released by a cloud provider alongside its flagship model, initially hoping for an out-of-the-box coding assistant. After the source code was published, most observers considered it closer to an open runtime. The two have different delivery targets. A coding assistant targets end users and includes a UI, default configuration, and interaction flow. A runtime targets platform developers and provides session management, tool invocation, logs, and an integration layer; developers assemble the agent themselves.
The table below lists the needs and trade-offs for the two user groups.
| User group | Core need | Main trade-off |
|---|---|---|
| End users | Out-of-the-box coding assistance | Depends on the default experience; limited customization |
| Platform developers | Extensible agent infrastructure | Must design permissions, logs, and UI themselves |
The source material considers openness at the runtime layer relatively mature, while the default end-user experience still has room for improvement. Platform developers judge whether a runtime is suitable mainly by three points: whether logs are complete, whether permissions are controllable, and whether the integration method matches the task.
Evidence boundary: the source did not provide the framework name or version. This article does not identify a specific product or evaluate performance data that was not disclosed; all judgments are based only on the source description. For verification, return to official materials using the following checklist:
- Version tags and change records in the source repository
- Official documentation sections on the integration layer, session management, and tool invocation
- The formal log format specification, especially the event type enumeration
- Permission and authentication configuration instructions
- Descriptions of default behavior in release notes
2. Entry Point Comparison: Four Types and Their Use Cases
Bottom line: when selecting an entry point, look at the task shape first, then authentication and log integration.
The source did not describe the implementation details of each entry point. The table below is an assessment framework based on common engineering practice; each item must be confirmed against official documentation.
| Entry | Suitable tasks | Authentication (to verify) | Log integration (to verify) | Main limitations |
|---|---|---|---|---|
| Web | Interactive debugging, demos, temporary use by non-technical users | Usually account login; confirm whether enterprise SSO is supported | Confirm whether UI actions are written to the same session log | Weak batch and automation capabilities |
| Command line | Local development, scripted tasks, integration with code repositories | Mostly local credentials or environment variables; credentials should not be written into scripts | Confirm the local log path and restrict read permissions | Permission scope depends on the executing user |
| Headless mode | CI pipelines, scheduled jobs, unattended batch processing | Use service accounts or tokens; configure least privilege | Output must be collected centrally; failed tasks must retain a full trace | No human confirmation step; high-risk tool calls must be blocked by policy |
| SDK | Embedding in your own platform, custom tools and UI | Managed centrally by the host application | The developer decides projection and storage location; integrity must be guaranteed by the developer | Highest development and maintenance cost |
When choosing an entry point, answer three questions in order. First, does the task require step-by-step human confirmation? If yes, prioritize Web or command line. Second, is the task unattended? If so, consider headless mode and configure the tool allowlist first. Third, does it need to be embedded in an existing system? If yes, use the SDK and include log projection and permission checks in your own platform governance process.
3. Session Logs and Execution Traces
Bottom line: execution traces are generated from logs; before auditing, first confirm that the logs themselves are complete.
The source mentions a key constraint: content visible to the model must first be persisted to the log. Every state change of the agent is written to a structured log, and upper-layer observability tools only read this log without adding separate instrumentation. Execution traces are generated by log projection, recording the sequence of decisions from the initial instruction to the final artifact.
The source provides the following log example. This is a sample record; the field values do not represent any actual run result.
{"session_id": "sess_01","sequence": 42,"event_type": "agent_step","payload": {"input_tokens": 1523,"output_tokens": 287,"cache_hit_tokens": 980,"tool_call": {"name": "file_editor","args": {"path": "./src/main.py", "action": "modify"}}}}
The meaning of each field and points to note are as follows.
| Field | Meaning | Notes |
|---|---|---|
| session_id | Identifies a session and links all events for the same task | Use a randomly generated ID; do not encode phone numbers, email addresses, employee IDs, or other personally linkable information |
| sequence | Event sequence number, which determines replay order | Check for continuity; missing numbers may indicate lost events |
| event_type | Event type | The source example is agent_step; other enumeration values are subject to official documentation; audit scripts should alert on unknown types rather than ignore them |
| payload | Event content | May contain paths, parameters, and text; redact before sharing |
| input_tokens | Number of input tokens | Used to estimate cost and context size; the counting method (whether system prompts are included) must be verified |
| output_tokens | Number of output tokens | Used to estimate output cost; same counting caveat as above |
| cache_hit_tokens | Number of input tokens that hit the cache | Indicates how much of the input reused the cache. Divide by input_tokens to get the hit ratio; the example is about 64%; the definition must follow official documentation |
| tool_call.name | Tool name | Compare item by item against the tool allowlist |
| tool_call.args | Tool arguments | Paths, commands, and URLs may contain sensitive information and require focused redaction |
To troubleshoot sequence gaps, proceed in the following order:
- Retrieve all records for the same session_id and sort them by sequence.
- Find the missing sequence numbers and check the time interval between the records before and after the gap.
- Check the runtime write logs or error logs to confirm whether a write failure occurred.
- If loss is confirmed, mark the session as incomplete; do not use it as a complete trace for audit conclusions.
4. Log Redaction Steps
Bottom line: the redaction order is to define scope first, then handle identifiers, arguments, and content, and finally review and validate by replay.
- Define scope and retention. Specify which sessions need to be shared, for how long, and who can access them.
- Handle session_id. Replace the original ID with a new random value; store the mapping table separately and restrict access.
- Handle tool_call.args. Replace usernames and project names in paths with placeholders; replace tokens, passwords, and keys in commands or arguments as whole segments with [REDACTED].
- Handle text fields in payload. Remove personal information from raw prompts and model outputs; keep numeric fields such as token statistics because auditing needs this data.
- Run automated scanning. Use rules to check phone number, email address, and ID number formats, as well as common key prefixes. Record scan results; add rules for missed items.
- Perform manual sampling review. Sample records at a certain ratio to confirm that automatic rules did not mistakenly delete key information.
- Validate by replay after redaction. Check whether sequence is still continuous, whether the tool_call structure is intact, and whether statistical fields were mistakenly deleted. If validation fails, return to step 3 to fix the rules.
- Keep redaction records. Record the operator, execution time, rule version used, and sampling results.
Common replacement rules are as follows.
| Field | Rule | Example |
|---|---|---|
| session_id | Hash or random mapping | sess_01 replaced with s_7f3a |
| Username in file path | Placeholder | /home/alice/proj replaced with /home/ |
| Token in command | Whole-segment replacement | token=abc123 replaced with token=[REDACTED] |
| Text content | Delete or summarize | Delete the original conversation, keeping only length and type |
There are three disciplines in the redaction process. Do not copy raw logs to personal devices or chat tools. Keep records of changes to redaction rules. Store redacted files separately from original files and set separate access permissions.
5. Permission Audit Checklist and Selection Scorecard
Bottom line: permission auditing covers least privilege, tool allowlists, log read permissions, credential management, and audit frequency; selection uses weighted scoring.
Permission audit checklist:
- Least privilege: the service account for each entry point should only open the tools and directories required for the task.
- Tool allowlist: list the allowed tool names; calls not on the list should be rejected directly and written to the log.
- Log read permissions: distinguish write, read, and export permissions. Export requires approval.
- Credential management: keep keys in environment variables or a secret management service; do not put them in code, configuration files, or logs.
- Audit frequency: review high-privilege accounts weekly, normal accounts quarterly, and immediately after permission changes.
- Change records: record the requester, approver, time, and values before and after each permission change.
The selection scorecard uses weighted scoring, with each item scored from 1 to 5 and then converted to a percentage scale:
| Dimension | Weight | Scoring notes |
|---|---|---|
| Task fit | 25% | Whether the entry point covers the target task shape |
| Log completeness | 20% | Whether sequence is continuous, fields are complete, and replay is possible |
| Permission controllability | 20% | Whether least privilege and allowlists can be implemented |
| Integration fit | 15% | Cost of connecting with existing CI, platforms, or terminals |
| Operational cost | 10% | Personnel effort for deployment, upgrades, and troubleshooting |
| Evidence sufficiency | 10% | Whether official documentation supports the above judgments |
The calculation method is: percentage score = sum of each dimension score × weight ÷ 5 × 100.
Example: if the scores for a scenario are 4, 3, 5, 4, 2, and 3 in order, the score is (4×25% + 3×20% + 5×20% + 4×15% + 2×10% + 3×10%) ÷ 5 × 100 = 74. This number is only for demonstrating the calculation and does not represent an evaluation of any product.
There is one hard rule when scoring: if evidence sufficiency is below 3, do not proceed directly to production selection; first complete verification of official materials.
