Agent Runtime Configuration and Presets in Practice
This article explains how to take AI agents from demos to production by focusing on a configurable, auditable, reusable runtime—permissions, model access, plugin lifecycle, and task-oriented presets—rather than one-off chat quality. It outlines a vendor-neutral framework covering global configuration, four agent presets, controlled self-evolution, and a debug loop teams can adapt to their own infrastructure.
Moving agents from demos to engineering practice depends less on a single conversation and more on whether the runtime is configurable, auditable, and reusable. Permission boundaries, how models are connected, the lifecycle of tools and plugins, and preset combinations for different tasks together determine stability and security in real development work. This article presents a practical, vendor-neutral framework in four layers: general configuration, agent presets, creative self-evolution, and a debug loop. Teams can trim it to their own infrastructure.
Why the runtime comes before the model
Model capability keeps improving, but what usually blocks teams on the ground is who can change which files, whether commands may run, whether tool calls can be rolled back, and how session context is isolated. Without a unified runtime, three problems appear: overly broad permissions that lead to accidental repo changes or leaked secrets; models and tools bound too tightly, so switching is expensive; and no presets, so every task starts from scratch assembling prompts and tool sets, with large quality swings.
Mature agent platforms therefore split general configuration from agent presets. The former governs global policy and access; the latter governs task profiles and behavior. After they are decoupled, the same permission and plugin foundation can serve coding, review, troubleshooting, and design exploration.
General configuration: permissions, model access, and plugins
1. Permission policy: least privilege and explainable denials
Permissions should at least cover filesystem read/write scope, command-execution allowlists, outbound network, visibility of secrets and environment variables, and isolation of data across sessions. In practice:
- Default deny; explicitly grant directories per repository or workspace. Keep temp files and logs in separate partitions.
- Dangerous operations (bulk delete, force push, changing production config) require a second confirmation or an approval hook.
- On denial, return a structured reason (policy name, matched rule, suggested change) so humans and later agents can correct the request instead of failing silently.
Version permission policies and review them as projects change, so “loose on the laptop, tight in CI” is documented and aligned.
2. Model access: a unified adapter, not a hardcoded API
Abstract the access layer as: auth, rate limits, timeouts and retries, context-window management, streaming, and the tool-calling protocol. Whether the backend is in-house or an external inference service, the product should depend only on a unified message and tool schema. Presets can then declare needs such as “long context” or “strong reasoning,” and a scheduler picks a model tier instead of embedding model names in every business prompt.
Record tokens, latency, and tool-call counts for cost and quality reviews. Billing and quotas are operational policy; technically you only need usage metering and circuit breakers, without binding to a specific cloud product.
3. Plugin system: tool lifecycle and sandboxing
Plugins are controlled tools: reading code, running tests, inspecting logs, retrieving from a knowledge base, operating tickets, and so on. Key design points:
- Declarative manifests: inputs, outputs, side-effect level, whether the call is idempotent.
- Sandboxed execution: timeouts, CPU/memory caps, no arbitrary network unless explicitly authorized.
- Composition: let the agent enable a subset of tools per task so you do not load everything at once, bloating the prompt and causing mistaken calls.
Plugin upgrades should stay compatible with old schemas or provide an adapter so presets do not break suddenly.
Four agent presets: constrain behavior with profiles, not prompt piles
A preset packages default goal + tool subset + interaction style + stop conditions. The four types below cover most engineering scenarios. Rename them to match team habits, but keep the responsibilities orthogonal.
1. Standard mode: balanced daily coding assistant
Aimed at feature work, small refactors, and explaining code. Typical traits: read/write the current workspace, run tests, ask clarifying questions in moderation. Stop conditions are usually tests passing or user confirmation. Use it as the default entry so the agent does not over-explore or over-trim context from the start.
Standard mode should emphasize reproducibility: the same task should yield a reviewable diff and test record, not only verbal advice. Prefer the current file and direct dependencies, then expand as needed to control noise.
2. Minimal mode: low privilege, short path
Aimed at Q&A, reading, and comparing designs. Disk writes and command execution are off by default. Short context and few tools mean lower latency and lower risk of mistakes. Useful when permissions are not fully approved yet, or in shared demo environments.
Minimal is not “weaker.” It separates read-only cognition from write/execute. Many incidents come from running commands during what was meant to be Q&A. Explicit mode switches work better than after-the-fact audits.
3. Process-constrained mode (plan–trace–check)
Think Plan / Trace / Check: first produce an executable plan and acceptance criteria, then change code in steps, checking each step against tests or static analysis; on failure, roll back or shrink the change set. Suited to bug fixes, compliance changes, and multi-contributor repositories.
This mode forces success criteria up front so the agent does not guess while writing. Plans should be editable by people; execution should be small commits; verification should be automated (unit tests, type checks, lint). Keep decision traces in logs for accountability and later prompt improvement.
4. Creative mode: controlled exploration and self-evolution
Aimed at unknown problems, missing tools, and capturing experience. In a sandbox, the agent may try new workflows, summarize failure patterns, and turn effective steps into new presets or plugin descriptions. “Self-evolution” here is not unconstrained weight fine-tuning; it is evolution of runtime assets: prompt templates, tool-selection policy, checklists, and debug playbooks.
Creativity needs strong isolation and a human gate. New policies apply only in an experimental workspace by default, and are promoted to standard presets only after evaluation (success rate, regressions, permission violations). Otherwise “self-evolution” becomes uncontrolled prompt drift.
Recreating a debug loop with a creative preset
Debugging can be a configurable pipeline without depending on a particular editor:
- Reproduce: Use errors, logs, and failing cases to find the entry point; collect stacks and environment with read-only tools if needed.
- Hypothesize: List two or three root causes and how to falsify them (assertions, minimal repro, compare historical commits).
- Probe: Insert temporary logs or breakpoint-style checks in the sandbox (for example, intermediate assertions in unit tests) instead of rewriting business logic broadly.
- Fix: Minimal diff plus regression tests.
- Capture: Turn the effective hypothesize–probe–fix path into a checklist and attach it to process-constrained or creative-mode knowledge.
Creative mode’s value is more automation in step 5: the agent may summarize patterns such as “this class of null pointer usually needs empty-collection and async-callback checks” and update the repo’s debug playbook. Standard mode only consumes those playbooks and does not freely change global policy. Exploration and governance coexist.
Conceptual configuration (not a product API):
agent_preset: debug_looppermissions:fs: workspace_rwexec: test_runner_onlytools: [read_file, search, run_tests, apply_patch]workflow:- plan- reproduce- hypothesize- patch- verifyevolution:promote_playbook: after_human_review
Adoption advice and common mistakes
- Ship permissions and audit first, then open creative mode; otherwise exploration amplifies risk.
- Keep the number of presets small. Combine parameters (repo language, whether network is allowed) instead of cloning nearly identical prompts.
- Do not judge only “fixed it once.” Track regression rate, human-edit rate, and policy violations.
- Stronger models do not replace stop conditions: timeouts, step limits, and test gates are all required.
- Object storage for session artifacts, logging for audit, and containers for sandboxes are generic capabilities; there is no need to bind to proprietary product names.
Summary
Agent engineering is wrapping the model in a governable runtime: permission policy draws the boundary, model access stays replaceable, plugins provide controlled action, and four presets cover daily work, read-only use, strict process, and controlled evolution. Creative mode exists to promote debugging and troubleshooting experience into playbooks, not to let the system improvise without constraints. Implemented in these layers, teams can get a reproducible balance of safety and speed, and switch behavior by task type without designing an agent from scratch every time.
