Lessons from 100 Days of Building a Plugin-Based Agent Workspace

    This article shares lessons from 100 days of building plugin-based agent workspaces. It covers the shift from chat to task-oriented runtimes, a four-layer architecture, a neutral setup sequence with least-privilege defaults, thirteen plugin patterns, four engineering principles, and a rollout roadmap for individuals, small teams, and enterprises.

    Over the past hundred days, large language model applications have changed in a clear way. Users are no longer satisfied with single-turn Q&A. They want agents that keep track of a goal, call tools, retain context, and complete reusable tasks within permission boundaries. The agent workspaces that have emerged from this trend place model capabilities inside an operating-system-style plugin environment. Sessions can be migrated, tools can be orchestrated, state can be persisted, interfaces can be reshaped, and costs need fine-grained management.

    This article does not discuss any specific commercial product. Instead, it treats the lessons as general technical questions: once a team introduces an agent runtime, how can it use a plugin-based approach to build stable, controllable, and extensible workflows?

    1. From Chat Tool to Task Runtime

    Traditional chat applications center on turns. Agent workspaces center on tasks. The difference shows up in three areas.

    First, tasks require goal decomposition. The model must not only answer but also plan the next step. Second, tasks depend on external tools, such as retrieval, file reading and writing, command execution, data queries, and ticket workflows. Third, tasks must leave evidence. This includes inputs, outputs, tool call records, failure reasons, and records of human confirmation. The value of plugins lies in decoupling these capabilities from the main program. Developers can then assemble them by scenario instead of packing every requirement into one sprawling prompt.

    From an engineering standpoint, an agent workspace has four layers. The interaction layer handles conversation, canvas, branching, and notifications. The orchestration layer handles task graphs, retries, timeouts, and human takeover. The tool layer connects to local scripts, knowledge bases, terminals, browsers, databases, and cloud services. The governance layer handles authentication, masking, quotas, auditing, and evaluation.

    Plugins usually sit in the tool and interaction layers. Well-designed plugins also influence orchestration strategy. For example, they can split long tasks into subtasks that can be restored from checkpoints, or require a second confirmation before high-risk actions.

    2. A Neutral Path to Installation and Initialization

    Regardless of which client you use, initialization should follow the same sequence.

    Step one is environment isolation. Create a separate directory, separate keys, and a separate log location for the agent runtime. Do not mix it with your personal development environment.

    Step two is least privilege. By default, do not grant shell write access, do not mount sensitive directories, and do not automatically read browser cookies. Grant each permission individually, and only when needed.

    Step three is model and quota configuration. Separate test, production, and fallback models. For each task type, set a maximum token count, a maximum number of tool calls, and a maximum execution time.

    Step four is telemetry and retention. Enable local logging. Connect important tasks to a log service with monitoring and alerts, and apply field-level masking before logs are stored.

    Step five is baseline validation. Run three fixed smoke tests: plain text summarization, one read-only tool call, and one write operation that requires human confirmation.

    A sample configuration looks like this:

    1. runtime:
    2. workspace: ./agent-workspace
    3. audit_log: ./audit/agent.log
    4. limits:
    5. max_steps: 24
    6. max_tool_calls: 12
    7. write_requires_confirm: true
    8. tools:
    9. - name: fs.read
    10. allow: ["docs/**"]
    11. - name: shell.exec
    12. enabled: false
    13. models:
    14. default: general-purpose
    15. fallback: low-cost

    The key point of this configuration is not the field names. It is the stance the configuration encodes: capabilities are off by default, risky actions are explicitly enabled, and every limit is auditable.

    3. Thirteen Plugin Patterns Worth Standardizing

    1. Session migration and context continuity. Users often lose their context when they hit a quota limit or switch entry points or devices. A plugin should package conversation history, user preferences, unfinished tasks, and referenced materials into a migration file that can be validated. On import, it should rebuild a summary rather than simply concatenate the full text. The critical element is the decision chain: why a given approach was chosen, which assumptions remain unverified, and what the next step depends on.

    2. Cost and quota guarding. Before each call, a plugin can estimate input length, tool call count, and expected output. If a threshold is exceeded, it can switch to a lower-cost model, compress the context, or request human approval. For team use, costs should be grouped by project, member, and task type, and reported daily. Do not rely on the idea of unlimited context. Summaries, indexes, and on-demand recall are more reliable.

    3. Branching conversation graphs. Complex tasks are rarely linear Q&A. They often test several hypotheses in parallel. Record each fork as a node that stores its premises, conclusions, tool results, and confidence level. This reduces the risk of forgetting why a decision was made. Interfaces resembling trading dashboards or drag-and-drop maps are, at their core, information visualization. A general implementation should focus on the node schema, merge strategy, and conflict prompts.

    4. Knowledge base retrieval augmentation. The plugin indexes design documents, API specifications, and operations manuals in slices. At query time, it retrieves evidence first, generates the answer, and returns the cited passages with the result. Pay attention to permission inheritance. A document being searchable does not mean it can be shared externally. Sensitive libraries need a separate vector namespace and query auditing.

    5. Code repository awareness. A strong plugin does more than read files. It identifies module boundaries, testing conventions, and commit history, and it produces minimal change suggestions. In practice, the plugin first produces a change plan, then modifies only allowlisted directories, and finally runs unit tests and static checks.

    When combined with general cloud capabilities such as Baidu AI Cloud, build artifacts can go into object storage, asynchronous tasks can go to a message queue, and runtime environments can run on a container platform. Keep the interfaces vendor-neutral so the components can be replaced later.

    6. Sandboxed command execution. Any operation that installs dependencies, modifies or deletes files, or accesses the network should run in an isolated environment. The recommended policy is to mount source code read-only, write only to a temporary directory, deny network access by default, and audit each command.

    An example policy:

    1. {
    2. "network": "deny",
    3. "mounts": [{"src": "./src", "mode": "ro"}],
    4. "timeout_sec": 60,
    5. "require_approval": ["rm", "curl", "git push"]
    6. }

    7. Browser and form automation. This pattern suits collecting public information, running regression tests on back-office pages, and entering low-risk data in bulk. A plugin should provide a closed loop of recording, replay, and assertion, so the model does not click freely in production. Login sessions, CAPTCHAs, and payment actions must be hard-blocked.

    8. Data pipelines and reporting. An agent can chain queries, cleaning, and charting into reusable templates, then generate weekly business or engineering-efficiency reports. The key is not chart generation. The key is consistent metric definitions. A metric such as “active task count” must be defined the same way in the plugin, the dashboards, and the emails.

    9. Prompt and version management. Keep system prompts, tool descriptions, and evaluation samples under version control. This makes changes reversible and releases gradual. For each task type, maintain a set of golden samples. After a plugin upgrade, run the regression set before sending real traffic to it.

    10. Security masking and compliant external sharing. A plugin should detect patterns such as keys, ID numbers, internal domain names, and customer lists on both input and output. Before anything leaves the organization, generate two versions: a complete internal version and an externally masked version. Record who approved each version.

    11. Multi-model routing. Different tasks suit different models. Extraction requires stability, creative writing requires diversity, coding requires tool support, and long-document summarization requires efficient use of context. A routing plugin should not consider price alone. It should also weigh latency, failure rate, sensitivity level, and whether function calling is needed.

    12. Evaluation and replay. Turn failed sessions into replayable samples and label each with its problem type: planning error, tool misuse, factual hallucination, insufficient permissions, or unclear requirements. Using these samples each week to drive plugin fixes works better than tuning prompts by intuition.

    13. Collaboration and handoff. Agent outputs should become team assets, such as task cards, risk lists, interface drafts, review notes, and to-do items. A plugin can sync conclusions to a shared collaboration space, but it should not replace human accountability. Every final release still needs a clearly named owner.

    4. Four Principles for Engineering Plugins

    First, contract first. Each plugin declares its inputs, outputs, side effects, permissions, and timeouts. The runtime uses these declarations for static checks.

    Second, recoverable failure. Long tasks need checkpoints. Tool failures should be retryable or degradable, and state must survive human takeover.

    Third, evidence first. Any output that involves facts or production changes must include citations or command results. A conclusion that merely looks reasonable is not enough.

    Fourth, secure by default. Convenience features can be powerful, but default configurations should be conservative. Usability improvements should not bypass governance.

    5. Rollout Roadmap

    Individual developers can start with three small steps: migrate context, add confirmation for shell commands, and build golden samples for common tasks.

    Small teams should add a cost dashboard, knowledge base permissions, and plugin regression testing.

    Enterprises should bring agent workspaces under unified identity, a log service, monitoring and alerting, and audit processes. Where necessary, run them in isolated container platforms, store artifacts in object storage