AI Agent in Practice: From Model Configuration to Deep System Prompt Customization

    This article walks through two practical levers for turning a general-purpose AI agent into a reliable productivity tool: controlling model cost through flexible model routing and free-tier access, and reshaping agent behavior with a carefully written core system prompt. It covers verification-first tool use, staged task decomposition, output formatting rules, and guardrails for high-risk operations, and closes with a reusable system prompt template for development-assistant scenarios.

    In everyday development work and enterprise office workflows, large language models and AI agents are becoming indispensable assistants. Yet many people run into two recurring problems when they first start using agents: the ongoing cost of calling a model adds up, and the default agent behaves like a generalist — verbose answers, no clear professional stance, and loose execution logic. To make an agent a genuinely productive tool, the work has to happen in two places: model cost control and deep customization of the core system prompt.

    1. Model Access and Cost Control: Flexible Switching and Free-Tier Usage

    Modern agent architectures typically rely on model routing and a decoupled design, which lets users switch the underlying LLM from a unified configuration layer. For an individual employee, or a developer still validating an idea, running a high-end commercial model continuously can be expensive. A sensible cost strategy matters here.

    1. Use free tiers and cost-effective options. Many mainstream model providers and cloud platforms offer a certain amount of free calls or time-limited free promotions. After binding a basic account in the platform console, you can access the currently available base models at zero or near-zero cost. This gives you a low-cost sandbox for early feature testing and prompt debugging.
    2. Keep model switching flexible. A mature agent platform should support hot-swapping models through configuration. A simple parameter change — for example, selecting the target model identifier in the config — moves the agent’s underlying engine from one model to another smoothly. This makes it easy to compare models side by side on a specific business scenario, and it lets a team route models dynamically according to task complexity, balancing performance against cost.

    2. Core System Prompt Customization: Giving the Agent a Professional “Soul”

    Default agents are usually trained to be polite, capable, and unfocused. They often open with “Sure, I’d be happy to help,” and while the answer covers everything, it drifts away from what you actually asked. The most effective fix is to customize the core system prompt file that loads at the start of every session. With precise rules, you can reshape how the agent works along four dimensions.

    1. Reasoning mode: verification first, tools before answers
    Default models tend to hallucinate when they hit a gap in their knowledge, inventing information out of nothing. The system prompt must require a “verify first, then answer” principle. When facing an uncertain question, the agent should be authorized to call external tools first — search engines, internal knowledge base retrieval, a code execution environment — to obtain factual grounding instead of guessing based on probability. State it explicitly: when unsure, consult tools; do not rely on speculation.

    2. Task decomposition: staged handling of complex work
    For multi-step, high-complexity tasks — refactoring a module, or producing an analysis report with several dimensions — asking the agent for a single all-at-once output often produces logical gaps or omissions. The better practice is to require the agent to output an execution plan or task list before starting any task that exceeds a given number of steps (three, for instance). Once the direction is clear and the user has confirmed it, real work begins. This ReAct-style (Reasoning and Acting) structure substantially reduces rework.

    3. Output conventions: conclusion first, code first
    Constraints on output format are critical for information efficiency. The system prompt should require:

    • Conclusion first: the first sentence gives the final conclusion or answer, with necessary explanation afterward.
    • Code and commands first: in development or operations contexts, output executable code blocks or CLI commands first, with concise comments, and skip long background preamble.
    • No filler pleasantries: forbid meaningless prefixes such as “Sure,” “Of course,” or “Happy to help,” and get straight to the point.

    4. Safety mechanisms: blocking and confirming high-risk operations
    When you grant the agent execution permissions — file system read/write, database operations, service restarts — safety comes first. The system prompt must contain built-in risk controls: when the agent recognizes that a pending action falls into a high-risk category (dropping a core data table, restarting a production service, overwriting a critical configuration file), it must stop immediately, issue a clear high-risk warning to the user, and wait for explicit second confirmation before continuing.

    3. Best Practice Example: A Development-Assistant System Prompt

    The following is a core system prompt configuration based on the principles above, suitable for guiding agent behavior in development-assistant scenarios:

    1. # Agent Persona and Behavior Definition
    2. ## Core Principles
    3. 1. Never open with pleasantries such as "Sure," "Of course," or "Happy to help." Output the conclusion directly.
    4. 2. Any uncertain information must be verified with search or knowledge base tools. Never guess or fabricate.
    5. 3. For high-risk operations (e.g., rm -rf, drop table, restarting core services, overwriting system files), print a warning first and pause. Continue only after the user types "confirm execution".
    6. ## Task Execution Logic
    7. 1. Decompose the task: if it takes more than 3 steps, output a TODO list or execution plan first.
    8. 2. Wait for confirmation: do not generate final code or perform concrete actions before the user confirms the plan.
    9. 3. Execute step by step: briefly state the intent of the current step while executing.
    10. ## Output Format
    11. 1. Conclusion first: the first paragraph gives the final answer or the core code.
    12. 2. Code blocks: all commands and code must be wrapped in standard Markdown code blocks with the language type specified.
    13. 3. Concise comments: keep only core logic explanations in code comments, no filler.

    4. Summary

    For everyday employees and developers alike, the key to using agents well is not constantly chasing the newest model. It is mastering model routing strategy and the ability to deeply customize the system prompt. By using free or open-source model allowances to lower the cost of trial and error, and by applying disciplined prompt engineering to the agent’s reasoning path, task decomposition, output format, and safety mechanisms, you can turn a “general-purpose chatbot” into an efficient, safe, and professional productivity assistant.