The First Step After a Successful Agent Deployment: Configuring Three Core Files
A successful deployment message only confirms that the runtime, dependencies, and basic connectivity work; it does not mean the agent is ready for production. This article explains why that gap exists and how to close it by turning implicit expectations into explicit configuration across three files: a soul file for identity and expression, a user profile file for the operator's role and constraints, and an agent rules file for workflow, tool usage, and acceptance criteria. It covers the merge order and conflict-resolution priority, versioning and layered overrides, and a repeatable acceptance check built from a small fixed test set instead of subjective judgment. Common pitfalls and iteration advice are included so the agent moves from "can chat" to "can be trusted."
1. Why “Deployment Succeeded” Does Not Mean “Ready for Production”
A success message in the terminal only confirms that the runtime, dependencies, and basic connectivity are fine. That is a runnable state, not a usable one. At this point, the agent’s knowledge comes from general-purpose corpora and its behavior comes from default policies, which usually shows up as three problems: style drift (two answers to the same question have completely different structures), fuzzy boundaries (it does not refuse what it should refuse, and does not ask when it should ask), and wasted context (the entire long conversation history is stuffed in, producing noise and low hit rates).
Closing this gap means turning implicit expectations into explicit configuration. A common approach is to split configuration into three file types with non-overlapping responsibilities:
- Soul file: defines identity, tone, output structure, and how to refuse. It answers “how to speak.”
- User profile file: defines the user’s role, tech stack, constraints, and preferences. It answers “who is being served.”
- Agent rules file: defines task workflow, tool-calling conventions, safety, and acceptance criteria. It answers “how to get work done.”
The relationship between the three can be expressed as pseudocode showing priority and merge order:
final_prompt = base_system_prompt⊕ soul_file # persona and expression⊕ user_profile # user profile⊕ agents_rules # workflow and tool constraints⊕ session_context # current session and retrieved snippets# On conflict: safety constraints > agent rules > user preferences > persona expression
2. Soul File: Writing Down the Expression Contract
A soul file is not a piece of expressive prose. It is a testable output contract. Five fields are recommended:
- Identity: one sentence stating who it is, who it serves, and what it does not do.
- Tone and level of detail: formal / neutral / casual, default length, whether to lead with the conclusion.
- Structure template: for example “conclusion - evidence - risks - next steps,” with fixed heading levels.
- Refusal and escalation: trigger conditions (out of scope, missing key input, irreversible operations) and the wording to use.
- Language and terminology: default language, glossary, unit and naming conventions.
Example (illustrative, trim as needed):
# RoleYou are a senior backend collaborator serving a business engineering team.# Expression- Lead with the conclusion, then the evidence; stay within 300 words by default, expand when necessary.- Fixed structure: Conclusion / Evidence / Risks / Next steps.# Refusal and escalation- When key information such as the target environment or data scope is missing, ask no more than 3 clarifying questions first.- For irreversible operations such as deleting data or changing permissions, output only the plan and rollback steps; do not execute on the user's behalf.
3. User Profile File: Making Cognitive Boundaries and Preferences Reusable
The value of a profile file is “describe once, reuse long term,” so the background does not have to be restated in every session. Recommended fields:
- Role and team: position, collaborators, review process.
- Tech stack and versions: version constraints for languages, frameworks, runtimes, and dependency management.
- Code and documentation conventions: directory layout, naming, comments, and commit message format.
- Environment and data boundaries: accessible environments, masking requirements, data types that must not be shared externally.
- Output preferences: examples first or principles first, whether diagrams and checklists are needed.
# User- Role: backend engineer responsible for order-domain services.- Tech stack: Java 17, Spring Boot 3.x, Maven, MySQL 8.0.# Constraints- Do not introduce new dependencies that have not been reviewed; if one is needed, provide alternatives and a size/maintenance cost assessment first.- Logs and examples must not contain real phone numbers, ID numbers, or tokens.# Preferences- Give a minimal runnable example first, then explain the principles; changes must include rollback steps.
4. Agent Rules File: Workflow, Tools, and Acceptance
This is the layer most often overlooked, yet it has the largest impact on stability. It constrains how work is done and should cover:
- Standard workflow: understand the goal → clarify key information → search local material → propose a solution → self-check → deliver.
- Tool usage: when to search the knowledge base, when to read code, when to run commands; how to derive parameter values; the retry limit on failure.
- Safety policy: least privilege by default, second confirmation for write operations, minimal logging of sensitive information.
- Acceptance criteria: it compiles, it is testable, style is consistent, the change scope is controlled, plus a self-check list.
# Workflow1. Restate the goal and impact scope; 2. list unknowns and ask at most 3 questions;3. search project documentation and code; 4. output the plan and change list; 5. self-check, then deliver.# Tools- Prefer searching over guessing; retry the same search at most twice, and if there is still no result, state the gap explicitly.- Before a write operation, show the commands to be executed and the impact scope, then wait for confirmation.# Acceptance- Changes come with unit or integration tests; the output includes risk points and rollback steps.
5. Layered Overrides, Version Control, and Conflict Resolution
All three files should be under version control and managed in the same repository as the code. Merge them in layers: team baseline + project override + individual override, where later layers take priority, except that safety constraints cannot be overridden by lower layers. Each change’s commit message should state the motivation, making it easy to trace back “why it started answering this way.”
Conflict resolution follows a fixed order: safety and compliance > agent rules > user preferences > persona expression. This preserves personality without letting style settings bypass workflow and safety requirements.
6. Acceptance: Replace “It Feels Good” With a Repeatable Mini-Evaluation
Once configuration is complete, do not judge by feel. Build a fixed set of 20-30 cases covering four scenario types: regular Q&A, missing information, out-of-scope and irreversible operations, and long-context retrieval. For each case, record the expected structure, length, and refusal behavior, and turn that into a pass-rate metric. For the first acceptance round, aim for all safety cases passing and a structural consistency rate of at least 90% on regular cases before widening the scope of use.
7. Common Pitfalls and How to Evolve
- Writing the soul file as marketing copy: this produces empty statements and low information density. Replace it with verifiable structural constraints.
- Writing the profile too granularly and never updating it: it becomes invalid as soon as the tech stack changes. Review it quarterly or on major upgrades.
- Rules that do not match actual tool capabilities: do not assume interfaces that do not exist; describe only the retrieval, file-reading, and execution capabilities available today.
- Writing everything at once: get a minimal usable version running first, then iterate based on failing cases.
In engineering practice on cloud platforms such as Baidu AI Cloud, this kind of configuration is typically combined with common capabilities like logging services, monitoring and alerting, and object storage, turning structural compliance rate, clarification rate, and refusal accuracy per session into metrics that can be observed continuously. Deployment is only the starting point. Only when persona, profile, and rules are written clearly and iterated on continuously does an agent move from “can hold a conversation” to “can be entrusted.”
