Building a General-Purpose AI Agent: Free Model Tiers and Persona Configuration

    This article explains how everyday professionals can build a general-purpose AI agent that behaves predictably, produces reusable output, and stays under control. It breaks an agent system into four layers—interaction, persona and rules, capabilities, and resources—and focuses on the two that matter most in practice: keeping model costs near zero with free-tier quotas, scriptable model switching, and budget guardrails; and shaping default behavior through an external persona definition file. It includes reusable configuration templates, a guarded tool-calling loop, four capability practices, common pitfalls, and a pre-launch checklist.

    1. Why Everyday Professionals Need a Configurable Agent

    Most people’s first impression of an agent is a “chatbot”: you ask one question, it answers at length, the stance is vague, and you get bored after a few tries. An agent that actually fits into daily work needs three traits: predictable behavior, reusable output, and controlled risk. None of these come automatically from “switching to a stronger model”—they come from engineering constraints around the model.

    From an engineering perspective, a usable agent system can be abstracted into four layers:

    1. ┌─────────────────────────────────────┐
    2. │ Interaction: CLI / web / IDE plugin │
    3. ├─────────────────────────────────────┤
    4. │ Persona & rules: identity + output │
    5. │ specification │
    6. ├─────────────────────────────────────┤
    7. │ Capabilities: inference + tool use │
    8. │ + retrieval │
    9. ├─────────────────────────────────────┤
    10. │ Resources: model quota / storage / │
    11. │ logs │
    12. └─────────────────────────────────────┘

    The two pain points discussed here fall exactly on the “resources” and “persona & rules” layers: model usage cost, and a default persona that doesn’t match personal habits. The general approaches for each are given below.

    2. Resources: Pushing Model Usage Cost Close to Zero

    Different platforms offer time-limited free quotas or trial resources. The general strategy (which does not touch any specific vendor’s billing rules—always defer to what your chosen platform publishes for the current period):

    1. Use the platform’s built-in free quota first: select the free tier on the console’s product/subscription page. You usually need to bind a payment method for identity verification, but no charges occur within the free quota.
    2. Keep a quota ledger: record “quota type, validity period, rate-limit threshold” in a table so you don’t get silently switched to paid after the free quota expires.
    3. Make model switching scriptable: wrap “list available models / switch the default model” into a command or config item, so you can switch in one step when quotas change.
    4. Cost guardrails: set a maximum number of turns, maximum tool calls, and a timeout per session to prevent one runaway loop from draining the quota.

    An illustrative policy configuration (pseudocode, expressing only the constraint logic):

    1. model_policy:
    2. prefer: free_tier # prefer the free tier
    3. fallback: paid_tier # fallback after the quota is exhausted
    4. max_turns: 30 # max turns per session
    5. max_tool_calls: 20 # max tool calls per session
    6. timeout_seconds: 120
    7. budget_guard:
    8. daily_token_limit: 200000 # self-imposed daily cap; stop when exceeded
    9. alert_on: 80 # alert at 80% usage

    Note that free quotas usually come with stricter rate limits and shorter data-retention windows, so do not use the free tier for sensitive data. When internal material is involved, switch to compliant enterprise-grade resources and follow your organization’s data-classification requirements.

    3. Persona & Rules: Tuning the Agent to Behave Like You with a Persona Definition File

    The common flaws of a default persona are: opening pleasantries, excessive length, no clear stance, and forcing an answer even when uncertain. The fix is to externalize the rules into a persona definition file loaded at the start of every session (a common industry practice is a Markdown file in the user-level config directory). Editing it is equivalent to changing the agent’s default behavior.

    A directly reusable template:

    1. # Identity
    2. You are my engineering assistant. You serve an everyday professional, and your goal is to get things done, not to chat with me.
    3. # How to think
    4. 1. Verify before answering: if unsure, call tools/retrieval; guessing is forbidden.
    5. 2. For tasks longer than 3 steps, output the plan and impact surface first, and wait for my confirmation before acting.
    6. 3. When information conflicts, point out the conflict first, then give the basis for your judgment.
    7. # Output specification
    8. - Lead with the conclusion; the body should be mainly commands, code, and tables.
    9. - Do not use opening phrases like "Sure", "Of course", or "Happy to help".
    10. - If unsure, say "unsure" directly and state what information is needed to be sure.
    11. - Default to no more than 200 lines per answer; output the excess as separate files.
    12. # Safety red lines (must be stated in advance; never execute on your own)
    13. - Deleting data, bulk-overwriting files, restarting services, changing permissions, running irreversible migration scripts.
    14. - For any write operation on production, provide a rollback plan first.
    15. # Context management
    16. - Before a long task, list the to-do items and acceptance criteria first.
    17. - After each step, log one line: "what was done / result / next step".

    What if you don’t know what to write? Just use it normally for a few days, accumulate session history, then have the agent read the history, summarize your preferences, and generate a first draft for you to add to or trim. This is far more accurate than writing from scratch—it is essentially “preference distillation based on behavior logs.”

    4. Capabilities: Four Practices to Upgrade from “Chatting” to “Getting Work Done”

    1. Structured writing: weekly reports, meeting minutes, requirement review material. The approach is to give a template first (background/conclusion/risks/to-dos), then let the agent fill it in, avoiding structural drift from free-form generation.
    2. Data processing: table cleaning, log summarization, metric-definition alignment. Require it to output field descriptions and assumptions first, then the script, and the script must include a dry-run switch.
    3. Code and operations assistance: reading a codebase, generating test cases, writing troubleshooting scripts. The constraint is “read before write”; asserting implementation details without reading the files is forbidden.
    4. Knowledge retrieval Q&A: chunk internal documents into a store and use a “retrieve—cite—answer” pipeline, requiring every conclusion to carry a source; if there is no source, explicitly answer “no basis found.”

    Illustration: a tool-calling loop with guardrails

    1. def run(task, policy):
    2. plan = agent.plan(task) # output a plan first if over the threshold
    3. if plan.steps > 3 and not user.confirmed(plan):
    4. return plan # wait for confirmation; do not act on your own
    5. for step in plan.steps[:policy.max_tool_calls]:
    6. if step.risky: # hit a safety red line
    7. return require_approval(step) # state in advance + rollback plan
    8. result = tools.call(step, timeout=policy.timeout_seconds)
    9. log.write(step, result) # log everything for later review
    10. return summarize(result)

    5. Common Pitfalls and an Acceptance Checklist

    • Pitfall 1: Solving everything with a stronger model. Scattered output is usually a lack of rules, not a lack of model capability.
    • Pitfall 2: Longer rules are better. Rules must be executable and decidable; avoid unverifiable adjectives like “be professional” or “be rigorous.”
    • Pitfall 3: Ignoring logging. Without logs you cannot review or pinpoint which rule failed.

    Pre-launch self-check:

    • The persona file is loaded, and the opening phrases, length, and uncertainty statements match expectations;
    • Free quota, fallback strategy, and daily limit are configured with alerts;
    • The high-risk operation list is in effect, and all write operations have rollback plans;
    • Long tasks have a plan-confirmation step and acceptance criteria;
    • Sensitive data has not entered the free-tier pipeline.

    6. Conclusion

    Low cost and high reliability are not in conflict: the former relies on resource-layer quota policies and guardrails, the latter on externalized constraints in the persona & rules layer. Once both are done, an everyday professional can have an agent with stable behavior and reusable output—handing off repetitive labor while keeping judgment in their own hands. For enterprise-grade hosting, these capabilities can be deployed on a compliant cloud platform such as Baidu AI Cloud, using general capabilities like object storage, log services, and monitoring/alerting to close the loop on logging and operations.