<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>Forem: Guyoung Studio</title>
    <description>The latest articles on Forem by Guyoung Studio (@guyoung).</description>
    <link>https://forem.com/guyoung</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3947043%2F19d3a869-df50-4eec-94a6-cf6fbf011ae6.png</url>
      <title>Forem: Guyoung Studio</title>
      <link>https://forem.com/guyoung</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/guyoung"/>
    <language>en</language>
    <item>
      <title>BoxAgnts Introduction (2) — AI Agent Toolbox</title>
      <dc:creator>Guyoung Studio</dc:creator>
      <pubDate>Tue, 26 May 2026 02:55:24 +0000</pubDate>
      <link>https://forem.com/guyoung/boxagnts-introduction-2-ai-agent-toolbox-in0</link>
      <guid>https://forem.com/guyoung/boxagnts-introduction-2-ai-agent-toolbox-in0</guid>
      <description>&lt;p&gt;BoxAgnts' middle layer — the Agent Toolbox — is the brain and hands of the system. It consists of six core modules responsible for three things: &lt;strong&gt;understanding your intent, dispatching the right tools, and feeding back execution results&lt;/strong&gt;. This article takes a deep dive into the architectural design and key implementations of each module.&lt;/p&gt;




&lt;h2&gt;
  
  
  Architecture Overview: A Seven-Module Collaboration Network
&lt;/h2&gt;

&lt;p&gt;What happens when you type "Help me analyze the code structure of this Rust project" in the Dashboard and hit send?&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;User Message
  │
  ▼
┌─────────────────────────────────────────────────────────────┐
│  boxagnts-api            Unified API Abstraction Layer      │
│  LlmProvider trait → 20+ Providers → Message Normalization  │
├─────────────────────────────────────────────────────────────┤
│  boxagnts-query          Agent Query Loop                   │
│  run_query_loop() → Multi-turn Conversation → Tool Dispatch → Auto Recovery │
├─────────────────────────────────────────────────────────────┤
│  boxagnts-tools + tools-manager + wasm-tools                │
│  Tool trait → Built-in Tools + WASM Tools → Execution       │
├─────────────────────────────────────────────────────────────┤
│  boxagnts-gateway        Gateway &amp;amp; Scheduling               │
│  Cron Scheduler + Site Hosting                              │
├─────────────────────────────────────────────────────────────┤
│  boxagnts-workspace      Memory &amp;amp; Configuration             │
│  SQLite + JSON Config + Conversation History                │
└─────────────────────────────────────────────────────────────┘
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Let's break down each one.&lt;/p&gt;




&lt;h2&gt;
  
  
  boxagnts-api: Unified Multi-Model Abstraction Layer
&lt;/h2&gt;

&lt;p&gt;This is the interface layer between the middle layer and the external AI world. It solves the most painful problem in AI tool development: &lt;strong&gt;every model provider's API is different, but your code should not pay the price for that&lt;/strong&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;code&gt;LlmProvider&lt;/code&gt; Trait: The Foundation of Polymorphism
&lt;/h3&gt;

&lt;p&gt;The core interface that all provider adapters must implement:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight rust"&gt;&lt;code&gt;&lt;span class="nd"&gt;#[async_trait]&lt;/span&gt;
&lt;span class="k"&gt;pub&lt;/span&gt; &lt;span class="k"&gt;trait&lt;/span&gt; &lt;span class="n"&gt;LlmProvider&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;Send&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="nb"&gt;Sync&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;fn&lt;/span&gt; &lt;span class="nf"&gt;id&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;&amp;amp;&lt;/span&gt;&lt;span class="k"&gt;self&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;-&amp;gt;&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&lt;/span&gt;&lt;span class="n"&gt;ProviderId&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;       &lt;span class="c1"&gt;// Unique identifier "anthropic", "openai"&lt;/span&gt;
    &lt;span class="k"&gt;fn&lt;/span&gt; &lt;span class="nf"&gt;name&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;&amp;amp;&lt;/span&gt;&lt;span class="k"&gt;self&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;-&amp;gt;&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&lt;/span&gt;&lt;span class="nb"&gt;str&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;            &lt;span class="c1"&gt;// Human-readable name&lt;/span&gt;

    &lt;span class="c1"&gt;// Non-streaming request&lt;/span&gt;
    &lt;span class="k"&gt;async&lt;/span&gt; &lt;span class="k"&gt;fn&lt;/span&gt; &lt;span class="nf"&gt;create_message&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;&amp;amp;&lt;/span&gt;&lt;span class="k"&gt;self&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;request&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;ProviderRequest&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
        &lt;span class="k"&gt;-&amp;gt;&lt;/span&gt; &lt;span class="nb"&gt;Result&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="n"&gt;ProviderResponse&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;ProviderError&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

    &lt;span class="c1"&gt;// Streaming request (returns Pin&amp;lt;Box&amp;lt;dyn Stream&amp;gt;&amp;gt;)&lt;/span&gt;
    &lt;span class="k"&gt;async&lt;/span&gt; &lt;span class="k"&gt;fn&lt;/span&gt; &lt;span class="nf"&gt;create_message_stream&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;&amp;amp;&lt;/span&gt;&lt;span class="k"&gt;self&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;request&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;ProviderRequest&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
        &lt;span class="k"&gt;-&amp;gt;&lt;/span&gt; &lt;span class="nb"&gt;Result&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nb"&gt;Pin&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nb"&gt;Box&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="k"&gt;dyn&lt;/span&gt; &lt;span class="n"&gt;Stream&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="n"&gt;Item&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;Result&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="n"&gt;StreamEvent&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;ProviderError&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&amp;gt;&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="nb"&gt;Send&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&amp;gt;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;ProviderError&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

    &lt;span class="c1"&gt;// List available models&lt;/span&gt;
    &lt;span class="k"&gt;async&lt;/span&gt; &lt;span class="k"&gt;fn&lt;/span&gt; &lt;span class="nf"&gt;list_models&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;&amp;amp;&lt;/span&gt;&lt;span class="k"&gt;self&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;-&amp;gt;&lt;/span&gt; &lt;span class="nb"&gt;Result&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nb"&gt;Vec&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="n"&gt;ModelInfo&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;ProviderError&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This trait design has three elegant aspects:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Async trait&lt;/strong&gt;: Uses the &lt;code&gt;async_trait&lt;/code&gt; macro, compatible with the Tokio async runtime&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Returns Pin&amp;gt;&lt;/strong&gt;: Uses dynamic dispatch to abstract away different providers' stream type differences&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Unified error typing&lt;/strong&gt;: All provider errors are normalized to &lt;code&gt;ProviderError&lt;/code&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  Unified Access for 20+ Providers
&lt;/h3&gt;

&lt;p&gt;BoxAgnts supports an extremely wide range of model providers:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Category&lt;/th&gt;
&lt;th&gt;Providers&lt;/th&gt;
&lt;th&gt;Independent Implementation File&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;International Mainstream&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;OpenAI, Anthropic, Google, Azure, Bedrock&lt;/td&gt;
&lt;td&gt;Individual files&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Open-Source Compatible&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Deepseek, Mistral, Groq, TogetherAI, Fireworks&lt;/td&gt;
&lt;td&gt;openai_compat.rs&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Enterprise Services&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Copilot, CodeX, Cohere, Perplexity&lt;/td&gt;
&lt;td&gt;Individual files&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Domestic Platforms&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;MiniMax, Alibaba Cloud (Qwen), Zhipu, Moonshot, SiliconFlow&lt;/td&gt;
&lt;td&gt;Individual files&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Others&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Venus, Nebius, Novita, OVHCloud&lt;/td&gt;
&lt;td&gt;Individual files&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Key design pattern — &lt;strong&gt;Provider + Transformer dual-layer architecture&lt;/strong&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Raw User Message
    │
    ▼
┌────────────────┐
│  Transformer   │  ← Converts internal message format to provider-specific format
│  (per-provider)│
└───────┬────────┘
        ▼
┌────────────────┐
│   Provider     │  ← Handles authentication, HTTP requests, stream parsing
│  (per-provider)│
└───────┬────────┘
        ▼
    AI Response
        │
        ▼
┌────────────────┐
│  Transformer   │  ← Converts provider response back to internal unified format
└────────────────┘
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  ProviderRegistry: Runtime Model Switching
&lt;/h3&gt;

&lt;p&gt;&lt;code&gt;QueryConfig&lt;/code&gt; contains a &lt;code&gt;provider_registry&lt;/code&gt; field that allows dynamic provider selection at runtime. This means you can:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Configure different models for different tasks in Agent config (cheap model for summarization, strong model for reasoning)&lt;/li&gt;
&lt;li&gt;Use &lt;code&gt;fallback_model&lt;/code&gt; to automatically switch to a backup model when the primary model is overloaded&lt;/li&gt;
&lt;li&gt;Manage API keys and endpoints for multiple models via &lt;code&gt;ModelRegistry&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  API Key Management: Balancing Security and Convenience
&lt;/h3&gt;

&lt;p&gt;BoxAgnts predefines environment variable mappings for each provider:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight rust"&gt;&lt;code&gt;&lt;span class="k"&gt;pub&lt;/span&gt; &lt;span class="k"&gt;fn&lt;/span&gt; &lt;span class="nf"&gt;api_key_env_vars_for_provider&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;provider_id&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&lt;/span&gt;&lt;span class="nb"&gt;str&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;-&amp;gt;&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&lt;/span&gt;&lt;span class="k"&gt;'static&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="o"&gt;&amp;amp;&lt;/span&gt;&lt;span class="k"&gt;'static&lt;/span&gt; &lt;span class="nb"&gt;str&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;match&lt;/span&gt; &lt;span class="n"&gt;provider_id&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="s"&gt;"anthropic"&lt;/span&gt; &lt;span class="k"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s"&gt;"ANTHROPIC_API_KEY"&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt;
        &lt;span class="s"&gt;"openai"&lt;/span&gt;    &lt;span class="k"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s"&gt;"OPENAI_API_KEY"&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt;
        &lt;span class="s"&gt;"deepseek"&lt;/span&gt;  &lt;span class="k"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s"&gt;"DEEPSEEK_API_KEY"&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt;
        &lt;span class="s"&gt;"zhipu"&lt;/span&gt;     &lt;span class="k"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s"&gt;"ZHIPU_API_KEY"&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt;
        &lt;span class="s"&gt;"minimax"&lt;/span&gt;   &lt;span class="k"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s"&gt;"MINIMAX_API_KEY"&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt;
        &lt;span class="c1"&gt;// ... 30+ providers&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This means you can inject API keys through three methods — environment variables, configuration files, or the Dashboard UI — maximizing flexibility while maintaining security boundaries.&lt;/p&gt;




&lt;h2&gt;
  
  
  boxagnts-query: The Core Engine of the Agent
&lt;/h2&gt;

&lt;p&gt;This layer is the absolute soul of BoxAgnts. The &lt;code&gt;run_query_loop()&lt;/code&gt; function implements the complete Agent reasoning loop, about 300 lines of code, yet handles an amazing number of edge cases.&lt;/p&gt;

&lt;h3&gt;
  
  
  Main Loop Skeleton
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight rust"&gt;&lt;code&gt;&lt;span class="k"&gt;loop&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="n"&gt;turn&lt;/span&gt; &lt;span class="o"&gt;+=&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

    &lt;span class="c1"&gt;// 0. Check cancellation signal&lt;/span&gt;
    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;cancel_token&lt;/span&gt;&lt;span class="nf"&gt;.is_cancelled&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;Cancelled&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;

    &lt;span class="c1"&gt;// 1. Check max turns limit&lt;/span&gt;
    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;turn&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;effective_max_turns&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;EndTurn&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;

    &lt;span class="c1"&gt;// 2. Inject pending user messages (multimodal interaction)&lt;/span&gt;
    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="k"&gt;let&lt;/span&gt; &lt;span class="nf"&gt;Some&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;queue&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;pending_messages&lt;/span&gt;&lt;span class="nf"&gt;.as_deref_mut&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;text&lt;/span&gt; &lt;span class="k"&gt;in&lt;/span&gt; &lt;span class="n"&gt;queue&lt;/span&gt;&lt;span class="nf"&gt;.drain&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;..&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="cm"&gt;/* append as user message */&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;

    &lt;span class="c1"&gt;// 3. Auto context compaction&lt;/span&gt;
    &lt;span class="n"&gt;compact_state&lt;/span&gt;&lt;span class="nf"&gt;.maybe_compact&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;messages&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;config&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

    &lt;span class="c1"&gt;// 4. Build API request&lt;/span&gt;
    &lt;span class="k"&gt;let&lt;/span&gt; &lt;span class="n"&gt;request&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;build_request&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;messages&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;tools&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;config&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

    &lt;span class="c1"&gt;// 5. Send to AI model (supports streaming)&lt;/span&gt;
    &lt;span class="k"&gt;let&lt;/span&gt; &lt;span class="n"&gt;response&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;client&lt;/span&gt;&lt;span class="nf"&gt;.create_message_stream&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;request&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="k"&gt;.await&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

    &lt;span class="c1"&gt;// 6. Parse ContentBlocks from response&lt;/span&gt;
    &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;block&lt;/span&gt; &lt;span class="k"&gt;in&lt;/span&gt; &lt;span class="n"&gt;response&lt;/span&gt;&lt;span class="py"&gt;.content&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="k"&gt;match&lt;/span&gt; &lt;span class="n"&gt;block&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
            &lt;span class="nn"&gt;ContentBlock&lt;/span&gt;&lt;span class="p"&gt;::&lt;/span&gt;&lt;span class="n"&gt;Text&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="n"&gt;text&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="cm"&gt;/* accumulate text response */&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;
            &lt;span class="nn"&gt;ContentBlock&lt;/span&gt;&lt;span class="p"&gt;::&lt;/span&gt;&lt;span class="n"&gt;ToolUse&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="n"&gt;name&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;input&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="o"&gt;..&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
                &lt;span class="c1"&gt;// Match and execute tool&lt;/span&gt;
                &lt;span class="k"&gt;let&lt;/span&gt; &lt;span class="n"&gt;tool&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;find_tool&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;name&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
                &lt;span class="k"&gt;let&lt;/span&gt; &lt;span class="n"&gt;result&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;tool&lt;/span&gt;&lt;span class="nf"&gt;.execute&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;input&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;tool_ctx&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="k"&gt;.await&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
                &lt;span class="n"&gt;messages&lt;/span&gt;&lt;span class="nf"&gt;.push&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;tool_result&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;  &lt;span class="c1"&gt;// Inject result into conversation&lt;/span&gt;
            &lt;span class="p"&gt;}&lt;/span&gt;
            &lt;span class="nn"&gt;ContentBlock&lt;/span&gt;&lt;span class="p"&gt;::&lt;/span&gt;&lt;span class="n"&gt;Thinking&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="n"&gt;thinking&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="o"&gt;..&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
                &lt;span class="c1"&gt;// Handle deep thinking content (not shown to user)&lt;/span&gt;
            &lt;span class="p"&gt;}&lt;/span&gt;
        &lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;

    &lt;span class="c1"&gt;// 7. If model ends → return final message&lt;/span&gt;
    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;stop_reason&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="s"&gt;"end_turn"&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;EndTurn&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Key Mechanism Analysis
&lt;/h3&gt;

&lt;h4&gt;
  
  
  Token Exhaustion Recovery
&lt;/h4&gt;

&lt;p&gt;When the model runs out of token quota in a single response, the query loop does not simply return a truncated result. Instead, it automatically sends a carefully designed recovery message:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;"Output token limit hit. Resume directly — no apology, no recap of what
 you were doing. Pick up mid-thought if that is where the cut happened.
 Break remaining work into smaller pieces."
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This message is remarkably restrained in design: "no apology, no recap, pick up from the cut, break down tasks" — conveying maximum instruction with minimum tokens. Retries up to 3 times (&lt;code&gt;MAX_TOKENS_RECOVERY_LIMIT = 3&lt;/code&gt;) to avoid infinite loops.&lt;/p&gt;

&lt;h4&gt;
  
  
  Auto Context Compaction
&lt;/h4&gt;

&lt;p&gt;&lt;code&gt;compact.rs&lt;/code&gt; implements an intelligent compression strategy. When conversation history approaches the model's context window limit, it summarizes early messages — preserving key information (file paths, error messages, important decisions) while discarding redundant intermediate steps. This strategy ensures that even extremely complex multi-turn tasks (such as refactoring an entire codebase) won't cause the Agent to "lose its memory" due to context overflow.&lt;/p&gt;

&lt;h4&gt;
  
  
  Fallback Model Mechanism
&lt;/h4&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight rust"&gt;&lt;code&gt;&lt;span class="c1"&gt;// query.rs — Auto switch to backup model on overload errors&lt;/span&gt;
&lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="nf"&gt;is_overloaded_error&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;&amp;amp;&lt;/span&gt;&lt;span class="n"&gt;err&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class="n"&gt;fallback_model&lt;/span&gt;&lt;span class="nf"&gt;.is_some&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class="o"&gt;!&lt;/span&gt;&lt;span class="n"&gt;used_fallback&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="n"&gt;effective_model&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;fallback_model&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="n"&gt;used_fallback&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;true&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="k"&gt;continue&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="c1"&gt;// Retry with backup model&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;When the primary model (e.g., Claude Sonnet) returns an overload error during high-load periods, the system automatically switches to a backup model (e.g., Deepseek), ensuring tasks are not interrupted. This mechanism is completely transparent to the user.&lt;/p&gt;

&lt;h4&gt;
  
  
  Budget Control
&lt;/h4&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight rust"&gt;&lt;code&gt;&lt;span class="k"&gt;pub&lt;/span&gt; &lt;span class="k"&gt;enum&lt;/span&gt; &lt;span class="n"&gt;QueryOutcome&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="n"&gt;BudgetExceeded&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="n"&gt;cost_usd&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;f64&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;limit_usd&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;f64&lt;/span&gt; &lt;span class="p"&gt;},&lt;/span&gt;
    &lt;span class="c1"&gt;// ...&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;After each turn, the query loop checks whether the accumulated cost exceeds the budget cap. Every API call is tracked via &lt;code&gt;CostTracker&lt;/code&gt; recording model and token consumption, ensuring costs are controllable. Budget overruns return clear error messages rather than silently overspending.&lt;/p&gt;

&lt;h4&gt;
  
  
  Multimodal Content Blocks
&lt;/h4&gt;

&lt;p&gt;The &lt;code&gt;ContentBlock&lt;/code&gt; enum defines 14 content types, covering the full spectrum of interactions from plain text to deep thinking:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight rust"&gt;&lt;code&gt;&lt;span class="k"&gt;pub&lt;/span&gt; &lt;span class="k"&gt;enum&lt;/span&gt; &lt;span class="n"&gt;ContentBlock&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="n"&gt;Text&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="n"&gt;text&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;String&lt;/span&gt; &lt;span class="p"&gt;},&lt;/span&gt;                          &lt;span class="c1"&gt;// Plain text&lt;/span&gt;
    &lt;span class="n"&gt;Image&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="n"&gt;source&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;ImageSource&lt;/span&gt; &lt;span class="p"&gt;},&lt;/span&gt;                  &lt;span class="c1"&gt;// Image&lt;/span&gt;
    &lt;span class="n"&gt;ToolUse&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="n"&gt;id&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;name&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;input&lt;/span&gt; &lt;span class="p"&gt;},&lt;/span&gt;                    &lt;span class="c1"&gt;// Tool call&lt;/span&gt;
    &lt;span class="n"&gt;ToolResult&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="n"&gt;tool_use_id&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;content&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;is_error&lt;/span&gt; &lt;span class="p"&gt;},&lt;/span&gt;  &lt;span class="c1"&gt;// Tool result&lt;/span&gt;
    &lt;span class="n"&gt;Thinking&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="n"&gt;thinking&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;signature&lt;/span&gt; &lt;span class="p"&gt;},&lt;/span&gt;               &lt;span class="c1"&gt;// Deep thinking&lt;/span&gt;
    &lt;span class="n"&gt;Document&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="n"&gt;source&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;title&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;context&lt;/span&gt; &lt;span class="p"&gt;},&lt;/span&gt;            &lt;span class="c1"&gt;// Document reference&lt;/span&gt;
    &lt;span class="n"&gt;UserLocalCommandOutput&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="n"&gt;command&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;output&lt;/span&gt; &lt;span class="p"&gt;},&lt;/span&gt;     &lt;span class="c1"&gt;// Shell command output&lt;/span&gt;
    &lt;span class="n"&gt;UserCommand&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="n"&gt;name&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;args&lt;/span&gt; &lt;span class="p"&gt;},&lt;/span&gt;                     &lt;span class="c1"&gt;// User command&lt;/span&gt;
    &lt;span class="n"&gt;UserMemoryInput&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="n"&gt;key&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;value&lt;/span&gt; &lt;span class="p"&gt;},&lt;/span&gt;                 &lt;span class="c1"&gt;// User memory&lt;/span&gt;
    &lt;span class="n"&gt;SystemAPIError&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="n"&gt;message&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;retry_secs&lt;/span&gt; &lt;span class="p"&gt;},&lt;/span&gt;         &lt;span class="c1"&gt;// API error&lt;/span&gt;
    &lt;span class="n"&gt;CollapsedReadSearch&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="n"&gt;tool_name&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;paths&lt;/span&gt; &lt;span class="p"&gt;},&lt;/span&gt;       &lt;span class="c1"&gt;// Collapsed search results&lt;/span&gt;
    &lt;span class="n"&gt;TaskAssignment&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="n"&gt;id&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;subject&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;description&lt;/span&gt; &lt;span class="p"&gt;},&lt;/span&gt;    &lt;span class="c1"&gt;// Sub-task assignment&lt;/span&gt;
    &lt;span class="c1"&gt;// ...&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This fine-grained content typing allows the frontend to render each type with specialized treatment — error blocks show red borders, task assignment blocks show cyan borders, collapsed search results displayed as single-line summaries.&lt;/p&gt;




&lt;h2&gt;
  
  
  Managed Agent Mode (Manager-Executor)
&lt;/h2&gt;

&lt;p&gt;This is one of the most stunning middle-layer designs in BoxAgnts. &lt;code&gt;managed_orchestrator.rs&lt;/code&gt; implements a hierarchical Agent architecture:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;                    User
                      │
                      ▼
         ┌───────────────────────┐
         │  Manager Agent        │  ← Uses strong model (e.g., Claude Opus)
         │  Analyze tasks → Break down → Assign │
         └───────┬───────────────┘
                 │
        ┌────────┼────────┐
        ▼        ▼        ▼
   ┌────────┐┌────────┐┌────────┐
   │Executor││Executor││Executor│  ← Uses economical model (e.g., Claude Sonnet/Deepseek)
   │Subtask1││Subtask2││Subtask3│
   └────┬───┘└────┬───┘└────┬───┘
        │         │         │
        └────────┼─────────┘
                 ▼
          Manager aggregates results
                 │
                 ▼
              Final Output
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Key Configuration
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight rust"&gt;&lt;code&gt;&lt;span class="k"&gt;pub&lt;/span&gt; &lt;span class="k"&gt;struct&lt;/span&gt; &lt;span class="n"&gt;ManagedAgentConfig&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;pub&lt;/span&gt; &lt;span class="n"&gt;enabled&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;bool&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="k"&gt;pub&lt;/span&gt; &lt;span class="n"&gt;manager_model&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;String&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;           &lt;span class="c1"&gt;// Manager model (e.g., "claude-opus-4-6")&lt;/span&gt;
    &lt;span class="k"&gt;pub&lt;/span&gt; &lt;span class="n"&gt;executor_model&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;String&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;          &lt;span class="c1"&gt;// Executor model (e.g., "claude-sonnet-4-6")&lt;/span&gt;
    &lt;span class="k"&gt;pub&lt;/span&gt; &lt;span class="n"&gt;executor_max_turns&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;u32&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;         &lt;span class="c1"&gt;// Max turns per executor&lt;/span&gt;
    &lt;span class="k"&gt;pub&lt;/span&gt; &lt;span class="n"&gt;max_concurrent_executors&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;u32&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;   &lt;span class="c1"&gt;// Max parallel executors&lt;/span&gt;
    &lt;span class="k"&gt;pub&lt;/span&gt; &lt;span class="n"&gt;total_budget_usd&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;Option&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nb"&gt;f64&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;   &lt;span class="c1"&gt;// Total budget cap&lt;/span&gt;
    &lt;span class="k"&gt;pub&lt;/span&gt; &lt;span class="n"&gt;executor_isolation&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;bool&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;        &lt;span class="c1"&gt;// Whether to isolate Git worktrees&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  System Prompt Injection
&lt;/h3&gt;

&lt;p&gt;The Manager Agent's system prompt precisely defines its role:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;You are the MANAGER, the planning and reasoning layer.
You coordinate work but do NOT execute tasks using file/bash tools directly.
All implementation work is delegated to executor agents (via the Agent tool).
Each executor uses {executor_model}, with a maximum of {max_turns} turns.
You may run up to {max_concurrent} executors in parallel.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The Executor's prompt requires "complete self-containment" — executors cannot see the Manager's conversation history and must include all context in their prompt. This avoids context leakage and reduces token consumption.&lt;/p&gt;




&lt;h2&gt;
  
  
  boxagnts-tools + tools-manager: Unified Tool Abstraction
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Tool Trait: The Cornerstone of the Architecture
&lt;/h3&gt;

&lt;p&gt;This is the most critical interface definition in all of BoxAgnts. Every new tool only needs to implement this trait:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight rust"&gt;&lt;code&gt;&lt;span class="nd"&gt;#[async_trait]&lt;/span&gt;
&lt;span class="k"&gt;pub&lt;/span&gt; &lt;span class="k"&gt;trait&lt;/span&gt; &lt;span class="n"&gt;Tool&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;Send&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="nb"&gt;Sync&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;fn&lt;/span&gt; &lt;span class="nf"&gt;name&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;&amp;amp;&lt;/span&gt;&lt;span class="k"&gt;self&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;-&amp;gt;&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&lt;/span&gt;&lt;span class="k"&gt;'static&lt;/span&gt; &lt;span class="nb"&gt;str&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="k"&gt;fn&lt;/span&gt; &lt;span class="nf"&gt;description&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;&amp;amp;&lt;/span&gt;&lt;span class="k"&gt;self&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;-&amp;gt;&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&lt;/span&gt;&lt;span class="k"&gt;'static&lt;/span&gt; &lt;span class="nb"&gt;str&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="k"&gt;fn&lt;/span&gt; &lt;span class="nf"&gt;input_schema&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;&amp;amp;&lt;/span&gt;&lt;span class="k"&gt;self&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;-&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;Value&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;    &lt;span class="c1"&gt;// JSON Schema defining parameters&lt;/span&gt;
    &lt;span class="k"&gt;async&lt;/span&gt; &lt;span class="k"&gt;fn&lt;/span&gt; &lt;span class="nf"&gt;execute&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;&amp;amp;&lt;/span&gt;&lt;span class="k"&gt;self&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;input&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;Value&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;ctx&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&lt;/span&gt;&lt;span class="n"&gt;ToolContext&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;-&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;ToolResult&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  ToolContext: The Tool's Execution Environment
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight rust"&gt;&lt;code&gt;&lt;span class="k"&gt;pub&lt;/span&gt; &lt;span class="k"&gt;struct&lt;/span&gt; &lt;span class="n"&gt;ToolContext&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;pub&lt;/span&gt; &lt;span class="n"&gt;cost_tracker&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;Arc&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="n"&gt;CostTracker&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;         &lt;span class="c1"&gt;// Cost tracker&lt;/span&gt;
    &lt;span class="k"&gt;pub&lt;/span&gt; &lt;span class="n"&gt;session_id&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;Option&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nb"&gt;String&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;             &lt;span class="c1"&gt;// Session ID&lt;/span&gt;
    &lt;span class="k"&gt;pub&lt;/span&gt; &lt;span class="n"&gt;current_turn&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;Arc&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="n"&gt;AtomicUsize&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;         &lt;span class="c1"&gt;// Current turn&lt;/span&gt;
    &lt;span class="k"&gt;pub&lt;/span&gt; &lt;span class="n"&gt;non_interactive&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;bool&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;                  &lt;span class="c1"&gt;// Non-interactive mode&lt;/span&gt;
    &lt;span class="k"&gt;pub&lt;/span&gt; &lt;span class="n"&gt;config&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;Config&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;                         &lt;span class="c1"&gt;// Global configuration&lt;/span&gt;
    &lt;span class="k"&gt;pub&lt;/span&gt; &lt;span class="n"&gt;managed_agent_config&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;Option&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="n"&gt;ManagedAgentConfig&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="k"&gt;pub&lt;/span&gt; &lt;span class="n"&gt;allowed_outbound_hosts&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;Vec&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nb"&gt;String&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;    &lt;span class="c1"&gt;// Outbound network whitelist&lt;/span&gt;
    &lt;span class="k"&gt;pub&lt;/span&gt; &lt;span class="n"&gt;block_url&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;Option&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nb"&gt;String&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;              &lt;span class="c1"&gt;// Blocked URLs&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;ToolContext&lt;/code&gt; is the tool's "passport" — carrying various contextual information such as permissions, sessions, costs, and networking. Every tool can access the required system state through it during execution.&lt;/p&gt;

&lt;h3&gt;
  
  
  Central Tool Registry
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight rust"&gt;&lt;code&gt;&lt;span class="c1"&gt;// tools-manager/src/lib.rs&lt;/span&gt;
&lt;span class="k"&gt;pub&lt;/span&gt; &lt;span class="k"&gt;fn&lt;/span&gt; &lt;span class="nf"&gt;all_tools&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="k"&gt;-&amp;gt;&lt;/span&gt; &lt;span class="nb"&gt;Vec&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nb"&gt;Box&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="k"&gt;dyn&lt;/span&gt; &lt;span class="n"&gt;Tool&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nd"&gt;vec!&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;
        &lt;span class="c1"&gt;// Rust native tools&lt;/span&gt;
        &lt;span class="nn"&gt;Box&lt;/span&gt;&lt;span class="p"&gt;::&lt;/span&gt;&lt;span class="nf"&gt;new&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;AskUserQuestionTool&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
        &lt;span class="nn"&gt;Box&lt;/span&gt;&lt;span class="p"&gt;::&lt;/span&gt;&lt;span class="nf"&gt;new&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;BriefTool&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
        &lt;span class="nn"&gt;Box&lt;/span&gt;&lt;span class="p"&gt;::&lt;/span&gt;&lt;span class="nf"&gt;new&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;EnterPlanModeTool&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
        &lt;span class="nn"&gt;Box&lt;/span&gt;&lt;span class="p"&gt;::&lt;/span&gt;&lt;span class="nf"&gt;new&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;ExitPlanModeTool&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
        &lt;span class="nn"&gt;Box&lt;/span&gt;&lt;span class="p"&gt;::&lt;/span&gt;&lt;span class="nf"&gt;new&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;SleepTool&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
        &lt;span class="nn"&gt;Box&lt;/span&gt;&lt;span class="p"&gt;::&lt;/span&gt;&lt;span class="nf"&gt;new&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;SkillTool&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
        &lt;span class="nn"&gt;Box&lt;/span&gt;&lt;span class="p"&gt;::&lt;/span&gt;&lt;span class="nf"&gt;new&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;ToolSearchTool&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;

        &lt;span class="c1"&gt;// WASM sandbox tools — same interface, different implementation&lt;/span&gt;
        &lt;span class="nn"&gt;Box&lt;/span&gt;&lt;span class="p"&gt;::&lt;/span&gt;&lt;span class="nf"&gt;new&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nn"&gt;WasmTool&lt;/span&gt;&lt;span class="p"&gt;::&lt;/span&gt;&lt;span class="nf"&gt;new&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"read"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;  &lt;span class="s"&gt;"file-read-component.wasm"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;  &lt;span class="o"&gt;...&lt;/span&gt;&lt;span class="p"&gt;)),&lt;/span&gt;
        &lt;span class="nn"&gt;Box&lt;/span&gt;&lt;span class="p"&gt;::&lt;/span&gt;&lt;span class="nf"&gt;new&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nn"&gt;WasmTool&lt;/span&gt;&lt;span class="p"&gt;::&lt;/span&gt;&lt;span class="nf"&gt;new&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"write"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s"&gt;"file-write-component.wasm"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="o"&gt;...&lt;/span&gt;&lt;span class="p"&gt;)),&lt;/span&gt;
        &lt;span class="nn"&gt;Box&lt;/span&gt;&lt;span class="p"&gt;::&lt;/span&gt;&lt;span class="nf"&gt;new&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nn"&gt;WasmTool&lt;/span&gt;&lt;span class="p"&gt;::&lt;/span&gt;&lt;span class="nf"&gt;new&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"edit"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;  &lt;span class="s"&gt;"file-edit-component.wasm"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;  &lt;span class="o"&gt;...&lt;/span&gt;&lt;span class="p"&gt;)),&lt;/span&gt;
        &lt;span class="nn"&gt;Box&lt;/span&gt;&lt;span class="p"&gt;::&lt;/span&gt;&lt;span class="nf"&gt;new&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nn"&gt;WasmTool&lt;/span&gt;&lt;span class="p"&gt;::&lt;/span&gt;&lt;span class="nf"&gt;new&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"glob"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;  &lt;span class="s"&gt;"file-glob-component.wasm"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;  &lt;span class="o"&gt;...&lt;/span&gt;&lt;span class="p"&gt;)),&lt;/span&gt;
        &lt;span class="nn"&gt;Box&lt;/span&gt;&lt;span class="p"&gt;::&lt;/span&gt;&lt;span class="nf"&gt;new&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nn"&gt;WasmTool&lt;/span&gt;&lt;span class="p"&gt;::&lt;/span&gt;&lt;span class="nf"&gt;new&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"bash"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;  &lt;span class="s"&gt;"bash-component.wasm"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;       &lt;span class="o"&gt;...&lt;/span&gt;&lt;span class="p"&gt;)),&lt;/span&gt;
        &lt;span class="nn"&gt;Box&lt;/span&gt;&lt;span class="p"&gt;::&lt;/span&gt;&lt;span class="nf"&gt;new&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nn"&gt;WasmTool&lt;/span&gt;&lt;span class="p"&gt;::&lt;/span&gt;&lt;span class="nf"&gt;new&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"web_fetch"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s"&gt;"web-fetch-component.wasm"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="o"&gt;...&lt;/span&gt;&lt;span class="p"&gt;)),&lt;/span&gt;
        &lt;span class="nn"&gt;Box&lt;/span&gt;&lt;span class="p"&gt;::&lt;/span&gt;&lt;span class="nf"&gt;new&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nn"&gt;WasmTool&lt;/span&gt;&lt;span class="p"&gt;::&lt;/span&gt;&lt;span class="nf"&gt;new&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"js_exec"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s"&gt;"boxedjs-execute-component.wasm"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="o"&gt;...&lt;/span&gt;&lt;span class="p"&gt;)),&lt;/span&gt;
    &lt;span class="p"&gt;]&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Notice that Rust native tools and WASM tools are placed in the same &lt;code&gt;Vec&amp;lt;Box&amp;lt;dyn Tool&amp;gt;&amp;gt;&lt;/code&gt; — to the AI model, they are completely equivalent. This is the power of interface-oriented programming.&lt;/p&gt;




&lt;h2&gt;
  
  
  boxagnts-gateway: Extending Time and Space Dimensions
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Cron Scheduled Task Engine
&lt;/h3&gt;

&lt;p&gt;&lt;code&gt;cron/scheduler.rs&lt;/code&gt; builds a complete scheduled task system based on &lt;code&gt;tokio_cron_scheduler&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight rust"&gt;&lt;code&gt;&lt;span class="c1"&gt;// Core scheduling logic&lt;/span&gt;
&lt;span class="k"&gt;let&lt;/span&gt; &lt;span class="n"&gt;cron_job&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nn"&gt;Job&lt;/span&gt;&lt;span class="p"&gt;::&lt;/span&gt;&lt;span class="nf"&gt;new_async&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;cron_expr&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="k"&gt;move&lt;/span&gt; &lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="n"&gt;_uuid&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;_lock&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nn"&gt;Box&lt;/span&gt;&lt;span class="p"&gt;::&lt;/span&gt;&lt;span class="nf"&gt;pin&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;async&lt;/span&gt; &lt;span class="k"&gt;move&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="k"&gt;let&lt;/span&gt; &lt;span class="n"&gt;handle&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nn"&gt;job&lt;/span&gt;&lt;span class="p"&gt;::&lt;/span&gt;&lt;span class="nf"&gt;execute&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;prompt&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;model&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="k"&gt;.await&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
        &lt;span class="c1"&gt;// Execution with timeout + result logging&lt;/span&gt;
        &lt;span class="k"&gt;let&lt;/span&gt; &lt;span class="n"&gt;result&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;timeout&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nn"&gt;Duration&lt;/span&gt;&lt;span class="p"&gt;::&lt;/span&gt;&lt;span class="nf"&gt;from_secs&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;timeout&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt; &lt;span class="n"&gt;fut&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="k"&gt;.await&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
        &lt;span class="nf"&gt;append_execution_log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;job_id&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;job_name&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;success&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;message&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="k"&gt;.await&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="p"&gt;})&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Key features:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Timeout protection&lt;/strong&gt;: Each task has an independent timeout setting (default 180 seconds), wrapped by &lt;code&gt;tokio::time::timeout&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Cancel propagation&lt;/strong&gt;: On timeout, cancels the executing Agent query via &lt;code&gt;CancellationToken&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Execution logs&lt;/strong&gt;: Each execution records time, success/failure status, and result summary&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Dynamic management&lt;/strong&gt;: Tasks can be added, removed, enabled/disabled at any time&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Site Hosting System
&lt;/h3&gt;

&lt;p&gt;Site data managed by &lt;code&gt;site/store.rs&lt;/code&gt; is persisted via SQLite, supporting CRUD operations. Combined with the frontend SitesPage, users can:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Create sites in the Dashboard (enter name and path)&lt;/li&gt;
&lt;li&gt;Let the AI Agent generate web content&lt;/li&gt;
&lt;li&gt;Access via the &lt;code&gt;/sites/{name}/&lt;/code&gt; path&lt;/li&gt;
&lt;/ol&gt;




&lt;h2&gt;
  
  
  boxagnts-workspace: The Agent's Memory System
&lt;/h2&gt;

&lt;p&gt;The workspace module handles all persistence and configuration management:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Function&lt;/th&gt;
&lt;th&gt;Storage&lt;/th&gt;
&lt;th&gt;Key Implementation&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Conversation History&lt;/td&gt;
&lt;td&gt;SQLite (rusqlite)&lt;/td&gt;
&lt;td&gt;Organized by session, supports CRUD&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;User Authentication&lt;/td&gt;
&lt;td&gt;Password hash storage&lt;/td&gt;
&lt;td&gt;Verified for remote access&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Global Configuration&lt;/td&gt;
&lt;td&gt;JSON file&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;Settings::load()&lt;/code&gt; to load&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;API Keys&lt;/td&gt;
&lt;td&gt;Environment variables / JSON&lt;/td&gt;
&lt;td&gt;Three-tier priority: ENV &amp;gt; Config &amp;gt; Default&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;AGENTS.md&lt;/td&gt;
&lt;td&gt;Filesystem&lt;/td&gt;
&lt;td&gt;Injected into system prompt each conversation&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Cron Tasks&lt;/td&gt;
&lt;td&gt;SQLite&lt;/td&gt;
&lt;td&gt;Persisted storage + loaded at startup&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Site Config&lt;/td&gt;
&lt;td&gt;SQLite&lt;/td&gt;
&lt;td&gt;Persisted storage + loaded at startup&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Design highlight: configuration and state are separated. Configuration is JSON files (human-readable and editable), state is SQLite (efficient queries and transactions). This distinction avoids the common pitfall of "configuration file bloat."&lt;/p&gt;




&lt;h2&gt;
  
  
  QueryConfig: Full-Dimensional Query Control
&lt;/h2&gt;

&lt;p&gt;&lt;code&gt;QueryConfig&lt;/code&gt; is a massive configuration struct with 20 fields, covering every dimension of an Agent query:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight rust"&gt;&lt;code&gt;&lt;span class="k"&gt;pub&lt;/span&gt; &lt;span class="k"&gt;struct&lt;/span&gt; &lt;span class="n"&gt;QueryConfig&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;pub&lt;/span&gt; &lt;span class="n"&gt;model&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;String&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;                           &lt;span class="c1"&gt;// Model name&lt;/span&gt;
    &lt;span class="k"&gt;pub&lt;/span&gt; &lt;span class="n"&gt;max_tokens&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;u32&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;                         &lt;span class="c1"&gt;// Max output tokens&lt;/span&gt;
    &lt;span class="k"&gt;pub&lt;/span&gt; &lt;span class="n"&gt;max_turns&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;u32&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;                          &lt;span class="c1"&gt;// Max reasoning turns&lt;/span&gt;
    &lt;span class="k"&gt;pub&lt;/span&gt; &lt;span class="n"&gt;system_prompt&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;Option&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nb"&gt;String&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;           &lt;span class="c1"&gt;// System prompt&lt;/span&gt;
    &lt;span class="k"&gt;pub&lt;/span&gt; &lt;span class="n"&gt;thinking_budget&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;Option&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nb"&gt;u32&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;            &lt;span class="c1"&gt;// Thinking budget (deep reasoning)&lt;/span&gt;
    &lt;span class="k"&gt;pub&lt;/span&gt; &lt;span class="n"&gt;temperature&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;Option&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nb"&gt;f32&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;                &lt;span class="c1"&gt;// Temperature parameter&lt;/span&gt;
    &lt;span class="k"&gt;pub&lt;/span&gt; &lt;span class="n"&gt;tool_result_budget&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;usize&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;               &lt;span class="c1"&gt;// Total char cap for tool results (50000)&lt;/span&gt;
    &lt;span class="k"&gt;pub&lt;/span&gt; &lt;span class="n"&gt;effort_level&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;Option&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="n"&gt;EffortLevel&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;       &lt;span class="c1"&gt;// Effort level (affects thinking_budget)&lt;/span&gt;
    &lt;span class="k"&gt;pub&lt;/span&gt; &lt;span class="n"&gt;max_budget_usd&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;Option&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nb"&gt;f64&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;             &lt;span class="c1"&gt;// USD budget cap&lt;/span&gt;
    &lt;span class="k"&gt;pub&lt;/span&gt; &lt;span class="n"&gt;fallback_model&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;Option&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nb"&gt;String&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;          &lt;span class="c1"&gt;// Backup model&lt;/span&gt;
    &lt;span class="k"&gt;pub&lt;/span&gt; &lt;span class="n"&gt;agent_definition&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;Option&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="n"&gt;AgentDefinition&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="c1"&gt;// Agent definition&lt;/span&gt;
    &lt;span class="k"&gt;pub&lt;/span&gt; &lt;span class="n"&gt;managed_agents&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;Option&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="n"&gt;ManagedAgentConfig&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="c1"&gt;// Managed mode&lt;/span&gt;
    &lt;span class="k"&gt;pub&lt;/span&gt; &lt;span class="n"&gt;output_style&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;OutputStyle&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;               &lt;span class="c1"&gt;// Output style&lt;/span&gt;
    &lt;span class="c1"&gt;// ... and more&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This struct demonstrates a core design philosophy of BoxAgnts: &lt;strong&gt;give control to the user, but provide reasonable defaults&lt;/strong&gt;. Every field can be overridden, but none are required — defaults cover 90% of use cases.&lt;/p&gt;




&lt;h2&gt;
  
  
  Summary
&lt;/h2&gt;

&lt;p&gt;The middle-layer Agent Toolbox is the capability core of BoxAgnts:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Module&lt;/th&gt;
&lt;th&gt;Responsibility&lt;/th&gt;
&lt;th&gt;Key Highlight&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;boxagnts-api&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Multi-model unified access&lt;/td&gt;
&lt;td&gt;LlmProvider trait, 20+ Providers, Transformer conversion&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;boxagnts-query&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Agent reasoning loop&lt;/td&gt;
&lt;td&gt;Token recovery, context compaction, Fallback switching, budget control&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;managed_orchestrator&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Managed Agent architecture&lt;/td&gt;
&lt;td&gt;Manager-Executor layering, parallel execution, budget management&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;boxagnts-tools&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Unified tool abstraction&lt;/td&gt;
&lt;td&gt;Tool trait, ToolContext&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;tools-manager&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Central tool registry&lt;/td&gt;
&lt;td&gt;Rust native + WASM unified as Vec&amp;gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;boxagnts-gateway&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Time and space extension&lt;/td&gt;
&lt;td&gt;Cron scheduler, Site hosting&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;boxagnts-workspace&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Memory system&lt;/td&gt;
&lt;td&gt;SQLite + JSON dual-layer storage&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h2&gt;
  
  
  Related Resources
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Boxagnts: &lt;a href="https://github.com/guyoung/boxagnts" rel="noopener noreferrer"&gt;https://github.com/guyoung/boxagnts&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>ai</category>
      <category>agents</category>
    </item>
    <item>
      <title>BoxAgnts Introduction (1) — Out of the Box</title>
      <dc:creator>Guyoung Studio</dc:creator>
      <pubDate>Mon, 25 May 2026 04:42:32 +0000</pubDate>
      <link>https://forem.com/guyoung/boxagnts-introduction-1-out-of-the-box-51lo</link>
      <guid>https://forem.com/guyoung/boxagnts-introduction-1-out-of-the-box-51lo</guid>
      <description>&lt;p&gt;In an era where AI tools are everywhere, a harsh reality persists: &lt;strong&gt;most developer tools die at the installation step&lt;/strong&gt;. Complex dependencies, tedious configurations, incomprehensible error messages — every barrier drives away potential users.&lt;/p&gt;

&lt;p&gt;BoxAgnts' design philosophy was clear from day one: &lt;strong&gt;make the path from download to usage as short as possible&lt;/strong&gt;. This is the core problem that the outermost layer of the three-tier architecture — the "out-of-the-box experience" — aims to solve.&lt;/p&gt;




&lt;h2&gt;
  
  
  What Does True "Out of the Box" Mean?
&lt;/h2&gt;

&lt;p&gt;AI tools on the market today can be broadly categorized into two types:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Type&lt;/th&gt;
&lt;th&gt;Representative Products&lt;/th&gt;
&lt;th&gt;Experience&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Cloud Services&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;ChatGPT, Claude.ai&lt;/td&gt;
&lt;td&gt;Sign up and go, but data is not local&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Local Tools&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;LangChain, AutoGPT&lt;/td&gt;
&lt;td&gt;Data is secure, but configuration hell&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;BoxAgnts attempts to take a third path: &lt;strong&gt;the security of local execution + the convenience of a cloud service&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Its "out-of-the-box" experience is reflected in four dimensions:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Zero-config startup&lt;/strong&gt;: Download the executable, type &lt;code&gt;boxagnts&lt;/code&gt; in the terminal, and the service starts&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Web-based visual interface&lt;/strong&gt;: Built-in Dashboard, all functionality managed through the browser&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Pre-installed tools and skills&lt;/strong&gt;: File operations, Shell execution, Web scraping, Code review — available right out of the box&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Smart defaults&lt;/strong&gt;: Every parameter has a reasonable default; it works well even without configuration&lt;/li&gt;
&lt;/ol&gt;




&lt;h2&gt;
  
  
  CLI Entry: Simple yet Powerful
&lt;/h2&gt;

&lt;p&gt;BoxAgnts' entry point is a single executable compiled in Rust. It provides a clean and intuitive command-line interface built on the &lt;code&gt;clap&lt;/code&gt; framework:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# Simplest startup — no parameters needed&lt;/span&gt;
boxagnts

&lt;span class="c"&gt;# Custom workspace (recommended: isolate different projects)&lt;/span&gt;
boxagnts &lt;span class="nt"&gt;--workspace-dir&lt;/span&gt; ~/my-ai-workspace

&lt;span class="c"&gt;# Custom port + remote access&lt;/span&gt;
boxagnts &lt;span class="nt"&gt;--host&lt;/span&gt; 0.0.0.0 &lt;span class="nt"&gt;--port&lt;/span&gt; 30002 &lt;span class="nt"&gt;--admin-user&lt;/span&gt; admin &lt;span class="nt"&gt;--admin-pass&lt;/span&gt; mypass
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Only 6 command-line parameters, all with reasonable defaults:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Parameter&lt;/th&gt;
&lt;th&gt;Purpose&lt;/th&gt;
&lt;th&gt;Default&lt;/th&gt;
&lt;th&gt;Design Intent&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;--port&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Web service port&lt;/td&gt;
&lt;td&gt;30001&lt;/td&gt;
&lt;td&gt;Avoids common ports, reduces conflicts&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;--host&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Bind address&lt;/td&gt;
&lt;td&gt;127.0.0.1&lt;/td&gt;
&lt;td&gt;Default local-only access, security first&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;--workspace-dir&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Workspace directory&lt;/td&gt;
&lt;td&gt;Current directory&lt;/td&gt;
&lt;td&gt;Supports multi-project isolation&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;--app-dir&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Application resource directory&lt;/td&gt;
&lt;td&gt;Same directory as executable&lt;/td&gt;
&lt;td&gt;Portable deployment&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;--admin-user&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Admin username&lt;/td&gt;
&lt;td&gt;None&lt;/td&gt;
&lt;td&gt;Required for remote access&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;--admin-pass&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Admin password&lt;/td&gt;
&lt;td&gt;None&lt;/td&gt;
&lt;td&gt;Required for remote access&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;No nightmare of YAML configuration files, no maze of environment variables. This design embodies an important product philosophy: &lt;strong&gt;users should not have to learn a configuration syntax just to get started&lt;/strong&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  Workspace Design Philosophy
&lt;/h3&gt;

&lt;p&gt;BoxAgnts supports multiple workspaces — each workspace has its own configuration files, conversation history, and data directories. The official documentation explicitly recommends "do not run in the default directory; instead, specify a workspace directory." This means you can create independent workspaces for different projects without interference. Each workspace's data is persisted via SQLite and will not be lost after a restart.&lt;/p&gt;




&lt;h2&gt;
  
  
  Dashboard: Your AI Control Center
&lt;/h2&gt;

&lt;p&gt;After starting the service, visit &lt;code&gt;http://127.0.0.1:30001/dashboard&lt;/code&gt; in your browser, and a complete AI management platform appears before you.&lt;/p&gt;

&lt;h3&gt;
  
  
  Full Page Matrix
&lt;/h3&gt;

&lt;p&gt;The Dashboard includes &lt;strong&gt;10 functional pages&lt;/strong&gt;, covering the core management needs of an AI Agent platform:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Page&lt;/th&gt;
&lt;th&gt;Function&lt;/th&gt;
&lt;th&gt;Technical Highlight&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;ChatPage&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;AI chat interface&lt;/td&gt;
&lt;td&gt;Streaming responses, Markdown rendering, code highlighting, session management&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;AgentsPage&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Custom AI Agent management&lt;/td&gt;
&lt;td&gt;Model selection, system prompt, temperature parameter&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;ToolsPage&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Tool list and management&lt;/td&gt;
&lt;td&gt;16+ tool overview, parameter descriptions&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;SkillsPage&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Skill management&lt;/td&gt;
&lt;td&gt;5 pre-installed skills, supports custom extensions&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;CronsPage&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Scheduled task management&lt;/td&gt;
&lt;td&gt;Standard Cron expressions, status tracking, execution logs&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;SitesPage&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Website hosting&lt;/td&gt;
&lt;td&gt;Static site deployment, file serving&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;FilePage&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;File browser&lt;/td&gt;
&lt;td&gt;Workspace directory browsing, file content viewing&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;SettingsPage&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Global settings&lt;/td&gt;
&lt;td&gt;Permission mode, theme, workspace path&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;SettingsModelPage&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Models and API Keys&lt;/td&gt;
&lt;td&gt;20+ providers, multi-model configuration&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;SettingsAgentsMdPage&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;AGENTS.md editing&lt;/td&gt;
&lt;td&gt;Customize Agent behavior descriptions&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h3&gt;
  
  
  Frontend Tech Stack Analysis
&lt;/h3&gt;

&lt;p&gt;The BoxAgnts Dashboard is built with &lt;strong&gt;Vue 3 + TypeScript + Vuetify 3&lt;/strong&gt;, one of the most mature Vue enterprise-level tech stacks currently available:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Vue 3 (Composition API)     → Reactive UI framework
Pinia                        → State management
Vue Router                   → Route management
Vuetify 3                    → Material Design component library
CodeMirror 6                 → Code editor (Markdown/JSON syntax highlighting)
marked + DOMPurify           → Markdown rendering + XSS protection
@vueuse/core                 → Composable utility functions
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Elegant Design of Composables
&lt;/h3&gt;

&lt;p&gt;The frontend encapsulates core interaction logic through 4 composables:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Composable&lt;/th&gt;
&lt;th&gt;Responsibility&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;useChatSession&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Session lifecycle management: load history, switch sessions, model selection, cancel execution&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;useChatMessages&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Message state management: message list, streaming append, history display&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;useChatScroll&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Smart scrolling: auto-follow new messages, detect manual scroll-back by user&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;useMarkdownRender&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Markdown rendering pipeline: marked parsing + DOMPurify sanitization + syntax highlighting&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Take &lt;code&gt;useChatSession&lt;/code&gt; as an example — it cleverly handles race conditions during session switching:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="nf"&gt;watch&lt;/span&gt;&lt;span class="p"&gt;(()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nx"&gt;sessionStore&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;currentSessionId&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;newId&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;newId&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="nx"&gt;sessionId&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;value&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;return&lt;/span&gt;      &lt;span class="c1"&gt;// Prevent duplicate loading&lt;/span&gt;
  &lt;span class="nf"&gt;cleanupActiveStream&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;                       &lt;span class="c1"&gt;// Clean up old WebSocket connection&lt;/span&gt;
  &lt;span class="nx"&gt;uiState&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;isRunning&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="kc"&gt;false&lt;/span&gt;                   &lt;span class="c1"&gt;// Reset running state&lt;/span&gt;
  &lt;span class="nx"&gt;messages&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;value&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[]&lt;/span&gt;                         &lt;span class="c1"&gt;// Clear message list&lt;/span&gt;
  &lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;newId&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nx"&gt;sessionId&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;value&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;newId&lt;/span&gt;
    &lt;span class="nf"&gt;loadAndSetHistory&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;newId&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;                  &lt;span class="c1"&gt;// Load history asynchronously&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;},&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;immediate&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt; &lt;span class="p"&gt;})&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Two Key Interaction Details
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;1. End-to-End Streaming Response Pipeline&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;When a user sends a message, the frontend establishes a long connection with the server via WebSocket. Every token produced by the server-side Agent query loop is pushed to the WebSocket layer through an &lt;code&gt;mpsc&lt;/code&gt; channel and then rendered in real-time in the chat interface. This pipeline design ensures a "what you see is what you get" real-time experience.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. Deep Integration of the Code Editor&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The SettingsAgentsMdPage integrates CodeMirror 6, supporting syntax highlighting for both Markdown and JSON. AGENTS.md is one of BoxAgnts' core configuration files — you can define the Agent's behavior guidelines, project conventions, and interaction style here. This editor uses the &lt;code&gt;@codemirror/theme-one-dark&lt;/code&gt; dark theme, consistent with Vuetify's overall visual style.&lt;/p&gt;




&lt;h2&gt;
  
  
  REST API Gateway: The Hidden Backbone
&lt;/h2&gt;

&lt;p&gt;Behind the Dashboard is a complete REST API system. All endpoints are defined in &lt;code&gt;gateway/src/api/&lt;/code&gt;, built with the Axum framework:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight http"&gt;&lt;code&gt;&lt;span class="err"&gt;POST   /api/chat/execute       → Send message, get streaming response via WebSocket
GET    /api/chat/sessions      → Get all session list
GET    /api/chat/session/:id   → Load specified session's message history
DELETE /api/chat/session/:id   → Delete session and its messages
PUT    /api/chat/session/:id   → Update session title
DELETE /api/chat/messages/:id  → Delete specified message in a session
POST   /api/file/read          → Read file content
POST   /api/file/write         → Write file
POST   /api/file/edit          → Edit file (precise string replacement)
POST   /api/tool/list          → List all available tools
POST   /api/skill/list         → List all available skills
POST   /api/cron/*             → Scheduled task CRUD
POST   /api/site/*             → Site management CRUD
POST   /api/config/*           → Configuration management
POST   /api/provider/*         → AI provider management
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This API uses a unified JSON response format:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"success"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"data"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;...&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"error"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kc"&gt;null&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This means that beyond the built-in Dashboard, you can fully use the API to build your own client — desktop apps (Tauri), mobile apps (Flutter/React Native), CLI tools, or even another AI Agent.&lt;/p&gt;

&lt;h3&gt;
  
  
  Site Hosting: More Than Just a Management Backend
&lt;/h3&gt;

&lt;p&gt;BoxAgnts also includes a built-in site hosting feature. Under the &lt;code&gt;/sites/{site}/{*path}&lt;/code&gt; route, you can deploy static websites. Even more interestingly, the AI Agent can generate web content for you and then deploy and access it with one click through the Site module — the Dashboard itself and the site system share the same HTTP server, but you can also deploy completely independent sites.&lt;/p&gt;

&lt;p&gt;Site navigation is dynamically fetched via the &lt;code&gt;get_site_nav_items&lt;/code&gt; API, meaning you can add or remove sites at any time, and the navigation bar will automatically update.&lt;/p&gt;




&lt;h2&gt;
  
  
  Security Defense: Layered Protection
&lt;/h2&gt;

&lt;p&gt;BoxAgnts embeds security considerations right at the entry point:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight rust"&gt;&lt;code&gt;&lt;span class="c1"&gt;// server/src/main.rs&lt;/span&gt;
&lt;span class="k"&gt;fn&lt;/span&gt; &lt;span class="nf"&gt;is_local_host&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;host&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&lt;/span&gt;&lt;span class="nb"&gt;str&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;-&amp;gt;&lt;/span&gt; &lt;span class="nb"&gt;bool&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nd"&gt;matches!&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;host&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s"&gt;"127.0.0.1"&lt;/span&gt; &lt;span class="p"&gt;|&lt;/span&gt; &lt;span class="s"&gt;"localhost"&lt;/span&gt; &lt;span class="p"&gt;|&lt;/span&gt; &lt;span class="s"&gt;"::1"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="o"&gt;!&lt;/span&gt;&lt;span class="nf"&gt;is_local_host&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;&amp;amp;&lt;/span&gt;&lt;span class="n"&gt;args&lt;/span&gt;&lt;span class="py"&gt;.host&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;args&lt;/span&gt;&lt;span class="py"&gt;.admin_user&lt;/span&gt;&lt;span class="nf"&gt;.is_none&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;||&lt;/span&gt; &lt;span class="n"&gt;args&lt;/span&gt;&lt;span class="py"&gt;.admin_pass&lt;/span&gt;&lt;span class="nf"&gt;.is_none&lt;/span&gt;&lt;span class="p"&gt;())&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nd"&gt;eprintln!&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"❌ When host is not local, --admin-user and --admin-pass are required."&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="nn"&gt;std&lt;/span&gt;&lt;span class="p"&gt;::&lt;/span&gt;&lt;span class="nn"&gt;process&lt;/span&gt;&lt;span class="p"&gt;::&lt;/span&gt;&lt;span class="nf"&gt;exit&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The logic is crystal clear: &lt;strong&gt;if accessing locally (127.0.0.1 / localhost / ::1), no authentication is required; once exposed to the network, username and password are mandatory&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;This reflects a pragmatic engineering judgment:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;For local access, the user has already passed the OS identity verification; an additional password layer is redundant&lt;/li&gt;
&lt;li&gt;For remote access, the network is untrusted and authentication must be enforced — denying service is better than risking exposure&lt;/li&gt;
&lt;li&gt;This "scenario-based layered protection" approach runs through every layer of BoxAgnts' design&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The outer layer's CORS policy is also noteworthy — using &lt;code&gt;CorsLayer::permissive()&lt;/code&gt;, allowing cross-origin requests from any source. The reason for such leniency:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Default binding to 127.0.0.1, immune to external network attacks&lt;/li&gt;
&lt;li&gt;Dashboard and API are same-origin deployed, no complex CORS strategy needed&lt;/li&gt;
&lt;li&gt;Mandatory authentication serves as a backstop for remote access&lt;/li&gt;
&lt;/ol&gt;




&lt;h2&gt;
  
  
  Pre-installed Resources: Capabilities Right Out of the Box
&lt;/h2&gt;

&lt;p&gt;BoxAgnts' pre-installed extension resources fall into three categories, all located under the &lt;code&gt;app/extensions/&lt;/code&gt; directory:&lt;/p&gt;

&lt;h3&gt;
  
  
  WASM Tool Components (7)
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;tools/
├── file-read-component.wasm      # File reading
├── file-write-component.wasm     # File writing
├── file-edit-component.wasm      # File editing (precise string replacement)
├── file-glob-component.wasm      # File glob matching
├── web-fetch-component.wasm      # Web content fetching
├── bash-component.wasm           # Shell command execution
└── boxedjs-execute-component.wasm # JavaScript code execution
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Pre-installed Skills (5)
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;skills/
├── code-review/SKILL.md                # Code review expert
├── css-refactor-advisor/SKILL.md       # CSS refactoring advisor
├── current-weather/SKILL.md            # Weather query
├── weather-forecast/SKILL.md           # Weather forecast
└── front-component-generator/SKILL.md  # Frontend component generator
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Service Components
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;services/
└── boxed_static_server_component.wasm  # Static file server
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This means after downloading and extracting, without installing anything extra, the user already has the full suite of capabilities: file operations, Shell execution, Web scraping, code review, weather queries, and more.&lt;/p&gt;




&lt;h2&gt;
  
  
  AGENTS.md: Define Your AI Assistant
&lt;/h2&gt;

&lt;p&gt;BoxAgnts introduces the &lt;code&gt;AGENTS.md&lt;/code&gt; file — the "AI constitution" of the project. Similar to &lt;code&gt;.gitignore&lt;/code&gt; for Git, &lt;code&gt;AGENTS.md&lt;/code&gt; defines the Agent's behavioral guidelines for the current project.&lt;/p&gt;

&lt;p&gt;You can edit this file in SettingsAgentsMdPage, using Markdown format to describe:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Project background and tech stack&lt;/li&gt;
&lt;li&gt;Coding standards the Agent should follow&lt;/li&gt;
&lt;li&gt;Disallowed operations and restrictions&lt;/li&gt;
&lt;li&gt;Preferred tools and skill combinations&lt;/li&gt;
&lt;li&gt;Interaction style (concise or detailed)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The content of this file is injected into the system prompt, ensuring the Agent follows your defined rules in every conversation. This is a "configuration as constraint" design — no code changes needed, just write a paragraph of Markdown.&lt;/p&gt;




&lt;h2&gt;
  
  
  Summary
&lt;/h2&gt;

&lt;p&gt;The outer layer design answers BoxAgnts' first core question: &lt;strong&gt;how to let users get started effortlessly?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The answer is the synergy of six dimensions:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Minimal startup&lt;/strong&gt;: 6 parameters, defaults covering most scenarios, single executable&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Full-featured Web UI&lt;/strong&gt;: 10 pages, Vue 3 + Vuetify 3 modern tech stack&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Real-time streaming experience&lt;/strong&gt;: WebSocket + mpsc channel, end-to-end millisecond-level push&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Complete REST API&lt;/strong&gt;: Supports secondary development and custom clients&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Scenario-based security&lt;/strong&gt;: Local authentication-free, remote strong authentication, flexible CORS&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Pre-installed resources&lt;/strong&gt;: 7 tool components + 5 skills + AGENTS.md configuration&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Related Resources
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Boxagnts: &lt;a href="https://github.com/guyoung/boxagnts" rel="noopener noreferrer"&gt;https://github.com/guyoung/boxagnts&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>ai</category>
      <category>agents</category>
      <category>rust</category>
    </item>
    <item>
      <title>Rebuilding the Security Model of AI Agents with WASM Sandbox</title>
      <dc:creator>Guyoung Studio</dc:creator>
      <pubDate>Sun, 24 May 2026 08:41:38 +0000</pubDate>
      <link>https://forem.com/guyoung/rebuilding-the-security-model-of-ai-agents-with-wasm-sandbox-2l30</link>
      <guid>https://forem.com/guyoung/rebuilding-the-security-model-of-ai-agents-with-wasm-sandbox-2l30</guid>
      <description>&lt;p&gt;The AI Agent ecosystem is moving fast.&lt;/p&gt;

&lt;p&gt;Every week we see new frameworks for:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;autonomous coding&lt;/li&gt;
&lt;li&gt;browser automation&lt;/li&gt;
&lt;li&gt;workflow orchestration&lt;/li&gt;
&lt;li&gt;multi-agent collaboration&lt;/li&gt;
&lt;li&gt;tool calling&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;But there’s one uncomfortable truth most people are ignoring:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Most AI Agents today are fundamentally unsafe.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;An LLM can generate shell commands.&lt;br&gt;
An Agent can execute tools.&lt;br&gt;
A prompt injection can become a system compromise.&lt;/p&gt;

&lt;p&gt;And in many systems, the execution layer still looks like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="nf"&gt;exec&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;generated_code&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;or:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;bash &lt;span class="nt"&gt;-c&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="nv"&gt;$LLM_OUTPUT&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That is not an AI architecture problem.&lt;/p&gt;

&lt;p&gt;It is a runtime security problem.&lt;/p&gt;

&lt;p&gt;This is exactly why I started paying attention to &lt;a href="https://github.com/guyoung/boxagnts" rel="noopener noreferrer"&gt;BoxAgnts GitHub Repository&lt;/a&gt; — a Rust-based AI Agent runtime that uses WebAssembly sandboxing as its core security model. (&lt;a href="https://dev.to/guyoung/boxagnts-is-an-out-of-the-box-secure-ai-agent-toolbox-in-a-wasm-sandbox-1hif"&gt;DEV Community&lt;/a&gt;)&lt;/p&gt;




&lt;h1&gt;
  
  
  The Problem: AI Agents Have Too Much Power
&lt;/h1&gt;

&lt;p&gt;Modern AI Agents are no longer just chatbots.&lt;/p&gt;

&lt;p&gt;They can:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;read files&lt;/li&gt;
&lt;li&gt;execute shell commands&lt;/li&gt;
&lt;li&gt;scrape websites&lt;/li&gt;
&lt;li&gt;generate code&lt;/li&gt;
&lt;li&gt;call APIs&lt;/li&gt;
&lt;li&gt;schedule background tasks&lt;/li&gt;
&lt;li&gt;deploy services&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This creates a dangerous architecture pattern:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;LLM
  ↓
Tool Selection
  ↓
Host System Access
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The problem is not theoretical anymore.&lt;/p&gt;

&lt;p&gt;Prompt injection attacks already demonstrate that AI systems can be manipulated into:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;leaking secrets&lt;/li&gt;
&lt;li&gt;executing malicious commands&lt;/li&gt;
&lt;li&gt;accessing unintended resources&lt;/li&gt;
&lt;li&gt;escalating privileges&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The industry response so far has mostly been:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Docker containers&lt;/li&gt;
&lt;li&gt;permission prompts&lt;/li&gt;
&lt;li&gt;regex filtering&lt;/li&gt;
&lt;li&gt;isolated VMs&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;These help, but they are still relatively coarse-grained.&lt;/p&gt;

&lt;p&gt;What AI Agents actually need is:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;capability-based execution.&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h1&gt;
  
  
  Why WASM Changes Everything
&lt;/h1&gt;

&lt;p&gt;This is where WebAssembly becomes interesting.&lt;/p&gt;

&lt;p&gt;Most developers associate WASM with browsers.&lt;/p&gt;

&lt;p&gt;But WASM is quietly becoming something much bigger:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;A secure universal runtime layer.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;The BoxAgnts architecture is built around this idea. (&lt;a href="https://dev.to/guyoung/boxagnts-is-an-out-of-the-box-secure-ai-agent-toolbox-in-a-wasm-sandbox-1hif"&gt;DEV Community&lt;/a&gt;)&lt;/p&gt;

&lt;p&gt;Instead of allowing tools to run directly on the host machine, tools execute inside a WebAssembly sandbox powered by Wasmtime. (&lt;a href="https://dev.to/guyoung/boxagnts-is-an-out-of-the-box-secure-ai-agent-toolbox-in-a-wasm-sandbox-1hif"&gt;DEV Community&lt;/a&gt;)&lt;/p&gt;

&lt;p&gt;That changes the execution model entirely.&lt;/p&gt;

&lt;p&gt;Instead of:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Agent
  ↓
Shell Access
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You get:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Agent
  ↓
WASM Runtime
  ↓
Capability-Controlled Execution
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This is a fundamentally different security philosophy.&lt;/p&gt;




&lt;h1&gt;
  
  
  Capability-Based AI Agents
&lt;/h1&gt;

&lt;p&gt;Traditional Agent frameworks often assume tools have broad access to the environment.&lt;/p&gt;

&lt;p&gt;But capability-based systems work differently.&lt;/p&gt;

&lt;p&gt;A tool only receives the permissions explicitly granted to it.&lt;/p&gt;

&lt;p&gt;For example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="na"&gt;tool&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;web-fetch&lt;/span&gt;
  &lt;span class="na"&gt;permissions&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
    &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;network:https://api.example.com&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Or:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="na"&gt;tool&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;file-reader&lt;/span&gt;
  &lt;span class="na"&gt;permissions&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
    &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;fs.read:/workspace&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;No global filesystem access.&lt;br&gt;
No unrestricted shell execution.&lt;br&gt;
No unrestricted networking.&lt;/p&gt;

&lt;p&gt;This model is much closer to:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;browser sandboxing&lt;/li&gt;
&lt;li&gt;mobile app permissions&lt;/li&gt;
&lt;li&gt;serverless isolates&lt;/li&gt;
&lt;li&gt;microVM security&lt;/li&gt;
&lt;li&gt;wasmCloud capability systems&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;And that matters because AI Agents are increasingly acting like autonomous software operators.&lt;/p&gt;


&lt;h1&gt;
  
  
  What BoxAgnts Actually Implements
&lt;/h1&gt;

&lt;p&gt;BoxAgnts is not just a chatbot UI.&lt;/p&gt;

&lt;p&gt;The project already includes:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;multi-model AI support&lt;/li&gt;
&lt;li&gt;tool execution&lt;/li&gt;
&lt;li&gt;scheduled automation&lt;/li&gt;
&lt;li&gt;workspaces&lt;/li&gt;
&lt;li&gt;Web dashboard&lt;/li&gt;
&lt;li&gt;WebSocket streaming&lt;/li&gt;
&lt;li&gt;skill systems&lt;/li&gt;
&lt;li&gt;WebAssembly sandbox runtime&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;according to the project documentation and architecture overview. (&lt;a href="https://dev.to/guyoung/boxagnts-is-an-out-of-the-box-secure-ai-agent-toolbox-in-a-wasm-sandbox-1hif"&gt;DEV Community&lt;/a&gt;)&lt;/p&gt;

&lt;p&gt;Its Rust workspace structure includes components such as:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;gateway/
tools/
wasm-sandbox/
workspace/
server/
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;with a dedicated &lt;code&gt;wasm-sandbox&lt;/code&gt; module built on Wasmtime. (&lt;a href="https://dev.to/guyoung/boxagnts-is-an-out-of-the-box-secure-ai-agent-toolbox-in-a-wasm-sandbox-1hif"&gt;DEV Community&lt;/a&gt;)&lt;/p&gt;

&lt;p&gt;The runtime also supports:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;isolated execution&lt;/li&gt;
&lt;li&gt;permission management&lt;/li&gt;
&lt;li&gt;network access control&lt;/li&gt;
&lt;li&gt;workspace isolation&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;which are all critical primitives for secure Agent systems. (&lt;a href="https://dev.to/guyoung/boxagnts-is-an-out-of-the-box-secure-ai-agent-toolbox-in-a-wasm-sandbox-1hif"&gt;DEV Community&lt;/a&gt;)&lt;/p&gt;




&lt;h1&gt;
  
  
  AI Infrastructure Is Shifting
&lt;/h1&gt;

&lt;p&gt;Most AI Agent discussions today focus on:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;prompts&lt;/li&gt;
&lt;li&gt;workflows&lt;/li&gt;
&lt;li&gt;memory&lt;/li&gt;
&lt;li&gt;multi-agent orchestration&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;But over time, the infrastructure layer will matter more.&lt;/p&gt;

&lt;p&gt;Because eventually every serious Agent system must answer questions like:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;How do we safely execute untrusted tools?&lt;/li&gt;
&lt;li&gt;How do we isolate generated code?&lt;/li&gt;
&lt;li&gt;How do we audit permissions?&lt;/li&gt;
&lt;li&gt;How do we run autonomous agents locally?&lt;/li&gt;
&lt;li&gt;How do we support edge deployment securely?&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This is why I think the next generation of AI infrastructure will increasingly resemble:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;serverless runtimes&lt;/li&gt;
&lt;li&gt;capability systems&lt;/li&gt;
&lt;li&gt;sandboxed execution environments&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;instead of traditional scripting frameworks.&lt;/p&gt;




&lt;h1&gt;
  
  
  Why Rust Is a Strong Fit
&lt;/h1&gt;

&lt;p&gt;Rust is particularly well-suited for this kind of runtime architecture.&lt;/p&gt;

&lt;p&gt;Not because “Rust is fast” — that’s the least interesting reason.&lt;/p&gt;

&lt;p&gt;The real advantages are:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;memory safety&lt;/li&gt;
&lt;li&gt;predictable concurrency&lt;/li&gt;
&lt;li&gt;strong type systems&lt;/li&gt;
&lt;li&gt;systems-level control&lt;/li&gt;
&lt;li&gt;excellent WASM ecosystem&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Projects like:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Wasmtime&lt;/li&gt;
&lt;li&gt;wasmCloud&lt;/li&gt;
&lt;li&gt;Deno&lt;/li&gt;
&lt;li&gt;Fermyon Spin&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;have already demonstrated that Rust and WASM form a powerful foundation for secure runtime systems.&lt;/p&gt;

&lt;p&gt;BoxAgnts is applying that same philosophy to AI Agents.&lt;/p&gt;




&lt;h1&gt;
  
  
  AI Agents Need a Runtime Layer
&lt;/h1&gt;

&lt;p&gt;Today, most AI frameworks focus on orchestration.&lt;/p&gt;

&lt;p&gt;But orchestration is not enough.&lt;/p&gt;

&lt;p&gt;The future AI stack will likely look more like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;LLM Layer
   ↓
Planning Layer
   ↓
Agent Runtime
   ↓
Sandboxed Tool Execution
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;And the runtime layer will become increasingly important.&lt;/p&gt;

&lt;p&gt;Because eventually:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;the biggest problem in AI Agents is not intelligence.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;It is trust.&lt;/p&gt;




&lt;h1&gt;
  
  
  Beyond Docker
&lt;/h1&gt;

&lt;p&gt;Some people will ask:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Why not just use Docker?&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Docker is useful, but it operates at a different abstraction level.&lt;/p&gt;

&lt;p&gt;Containers are relatively heavyweight and coarse-grained.&lt;/p&gt;

&lt;p&gt;WASM runtimes enable:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;lightweight isolation&lt;/li&gt;
&lt;li&gt;fast startup&lt;/li&gt;
&lt;li&gt;portable execution&lt;/li&gt;
&lt;li&gt;fine-grained capabilities&lt;/li&gt;
&lt;li&gt;embedded deployment&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This makes them especially attractive for:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;local AI assistants&lt;/li&gt;
&lt;li&gt;edge AI&lt;/li&gt;
&lt;li&gt;browser-hosted agents&lt;/li&gt;
&lt;li&gt;embedded devices&lt;/li&gt;
&lt;li&gt;self-hosted automation&lt;/li&gt;
&lt;li&gt;secure plugin ecosystems&lt;/li&gt;
&lt;/ul&gt;




&lt;h1&gt;
  
  
  The Most Interesting Direction: WASM-Native Tools
&lt;/h1&gt;

&lt;p&gt;The most exciting possibility is not just sandboxing existing tools.&lt;/p&gt;

&lt;p&gt;It is building an entire ecosystem where:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Tool = WASM Module
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That would enable:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;portable tools&lt;/li&gt;
&lt;li&gt;auditable permissions&lt;/li&gt;
&lt;li&gt;safe execution&lt;/li&gt;
&lt;li&gt;cross-platform compatibility&lt;/li&gt;
&lt;li&gt;secure marketplaces&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Imagine an “npm for AI Agent tools” — but capability-safe by default.&lt;/p&gt;

&lt;p&gt;That could fundamentally reshape how Agent ecosystems evolve.&lt;/p&gt;




&lt;h1&gt;
  
  
  Final Thoughts
&lt;/h1&gt;

&lt;p&gt;Most AI Agent projects today are competing on:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;better prompts&lt;/li&gt;
&lt;li&gt;better workflows&lt;/li&gt;
&lt;li&gt;more automation&lt;/li&gt;
&lt;li&gt;more autonomy&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;But the real long-term challenge is:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;secure execution.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;That is why I think projects like &lt;a href="https://github.com/guyoung/boxagnts" rel="noopener noreferrer"&gt;BoxAgnts&lt;/a&gt; are interesting. They are not just building “another Agent framework.”&lt;/p&gt;

&lt;p&gt;They are exploring a much deeper idea:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Rebuilding the runtime security model of AI Agents using WebAssembly sandboxing. (&lt;a href="https://dev.to/guyoung/boxagnts-is-an-out-of-the-box-secure-ai-agent-toolbox-in-a-wasm-sandbox-1hif"&gt;DEV Community&lt;/a&gt;)&lt;/p&gt;
&lt;/blockquote&gt;

</description>
      <category>ai</category>
      <category>agents</category>
      <category>webassembly</category>
      <category>sandbox</category>
    </item>
    <item>
      <title>BoxAgnts is an Out-Of-The-Box Secure AI Agent ToolBox in a WASM SandBox</title>
      <dc:creator>Guyoung Studio</dc:creator>
      <pubDate>Sat, 23 May 2026 03:49:57 +0000</pubDate>
      <link>https://forem.com/guyoung/boxagnts-is-an-out-of-the-box-secure-ai-agent-toolbox-in-a-wasm-sandbox-1hif</link>
      <guid>https://forem.com/guyoung/boxagnts-is-an-out-of-the-box-secure-ai-agent-toolbox-in-a-wasm-sandbox-1hif</guid>
      <description>&lt;p&gt;BoxAgnts is an open-source AI Agent ToolBox built with Rust, dedicated to delivering an ultimate out-of-the-box experience. Leveraging WebAssembly sandbox, it provides a runtime environment that balances security and flexibility, helping users effortlessly tackle a wide range of complex tasks and thus becoming an efficient and trustworthy personal AI assistant.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ftda2isgs53p19jcewe2z.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ftda2isgs53p19jcewe2z.jpg" alt=" "&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Core Architecture
&lt;/h2&gt;

&lt;h3&gt;
  
  
  🎯 AI Agent Tool*&lt;em&gt;Box&lt;/em&gt;*
&lt;/h3&gt;

&lt;p&gt;BoxAgnts is a fully-featured AI Agent toolkit providing:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Multi-model support&lt;/strong&gt;: Compatible with major AI model providers including OpenAI, Anthropic, CodeX, Google, Deepseek, MiniMax, OpenCode&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Tool system&lt;/strong&gt;: Built-in file operations, web access, code execution, and many other tools&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Skill system&lt;/strong&gt;: Create specialized AI skills through simple configuration&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  🛡️ WebAssembly Sand*&lt;em&gt;Box&lt;/em&gt;*
&lt;/h3&gt;

&lt;p&gt;Build a secure runtime environment using WebAssembly technology:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Isolated execution&lt;/strong&gt;: All custom tools and skills run in a WASM sandbox&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Security control&lt;/strong&gt;: Fine-grained permission management and network access control&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Cross-platform&lt;/strong&gt;: Compile once, run everywhere&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;High performance&lt;/strong&gt;: Based on Wasmtime runtime, near-native performance&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  ✨ Out of the &lt;strong&gt;Box&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Out-of-the-box experience:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Zero-configuration startup&lt;/strong&gt;: Download and run, no complex configuration&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Web interface&lt;/strong&gt;: Built-in beautiful Dashboard for visual management of all features&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Built-in extensions&lt;/strong&gt;: Pre-configured with commonly used tools and skills, ready to use&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Quick start&lt;/strong&gt;: Simple API and intuitive workflow&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Key Features
&lt;/h2&gt;

&lt;h3&gt;
  
  
  🤖 AI Chat and Agents
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Chat with multiple AI models&lt;/li&gt;
&lt;li&gt;Create and manage custom Agents&lt;/li&gt;
&lt;li&gt;Save and manage chat history&lt;/li&gt;
&lt;li&gt;Support for streaming responses&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  🔧 Tool Execution
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;File read/write and editing&lt;/li&gt;
&lt;li&gt;Shell command execution&lt;/li&gt;
&lt;li&gt;Web content scraping&lt;/li&gt;
&lt;li&gt;Code review and analysis&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  📦 Skill System
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Quickly create specialized skills&lt;/li&gt;
&lt;li&gt;Skill combination and reuse&lt;/li&gt;
&lt;li&gt;Built-in skills including code review, weather query, front-end component generation, etc.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  ⏰ Automatic Tasks Cron
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Create and manage scheduled tasks&lt;/li&gt;
&lt;li&gt;Support for standard Cron expressions&lt;/li&gt;
&lt;li&gt;Task execution logs and status tracking&lt;/li&gt;
&lt;li&gt;Flexible task configuration and triggering methods&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  🌐 Web Service
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Custom website deployment&lt;/li&gt;
&lt;li&gt;Static file serving&lt;/li&gt;
&lt;li&gt;API endpoint management&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Quick Start
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Download Executable
&lt;/h3&gt;

&lt;p&gt;Download the latest compressed package from the &lt;a href="https://github.com/guyoung/boxagnts/releases" rel="noopener noreferrer"&gt;Releases&lt;/a&gt; page, extract and run.&lt;/p&gt;

&lt;h3&gt;
  
  
  Start Service
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# Start service&lt;/span&gt;
boxagnts

&lt;span class="c"&gt;# Specify workspace directory&lt;/span&gt;
boxagnts &lt;span class="nt"&gt;--workspace-dir&lt;/span&gt; /path/to/workspace

&lt;span class="c"&gt;# Specify port&lt;/span&gt;
boxagnts &lt;span class="nt"&gt;--workspace-dir&lt;/span&gt; /path/to/workspace &lt;span class="nt"&gt;--port&lt;/span&gt; 30002
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;blockquote&gt;
&lt;p&gt;Suggestion: BoxAgnts supports multiple workspaces, each with its own configuration file and data directory. It is recommended not to run in the default directory, but to specify a workspace directory or workspace-dir.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Command line arguments:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;BoxAgnts is an open-source AI Agent ToolBox built with Rust.

Usage: boxagnts &lt;span class="o"&gt;[&lt;/span&gt;OPTIONS]

Options:
      &lt;span class="nt"&gt;--port&lt;/span&gt; &amp;lt;PORT&amp;gt;          Port to run the web server on &lt;span class="o"&gt;[&lt;/span&gt;default: 30001]
      &lt;span class="nt"&gt;--host&lt;/span&gt; &amp;lt;HOST&amp;gt;          Host to &lt;span class="nb"&gt;bind &lt;/span&gt;to &lt;span class="o"&gt;(&lt;/span&gt;0.0.0.0 &lt;span class="k"&gt;for &lt;/span&gt;all interfaces&lt;span class="o"&gt;)&lt;/span&gt; &lt;span class="o"&gt;[&lt;/span&gt;default: 127.0.0.1]
      &lt;span class="nt"&gt;--workspace-dir&lt;/span&gt; &amp;lt;DIR&amp;gt;  Set workspace &lt;span class="nb"&gt;dir&lt;/span&gt;, default current &lt;span class="nb"&gt;dir&lt;/span&gt;
      &lt;span class="nt"&gt;--app-dir&lt;/span&gt; &amp;lt;DIR&amp;gt;        Set app &lt;span class="nb"&gt;dir&lt;/span&gt;, default Boxagnts executable file &lt;span class="nb"&gt;dir&lt;/span&gt;
      &lt;span class="nt"&gt;--admin-user&lt;/span&gt; &amp;lt;USERNAME&amp;gt;  Set admin username
      &lt;span class="nt"&gt;--admin-pass&lt;/span&gt; &amp;lt;PASSWORD&amp;gt;  Set admin password
  &lt;span class="nt"&gt;-h&lt;/span&gt;, &lt;span class="nt"&gt;--help&lt;/span&gt;                 Print &lt;span class="nb"&gt;help&lt;/span&gt;
  &lt;span class="nt"&gt;-V&lt;/span&gt;, &lt;span class="nt"&gt;--version&lt;/span&gt;              Print version
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Access Dashboard
&lt;/h3&gt;

&lt;p&gt;Open your browser and visit &lt;code&gt;http://127.0.0.1:30001&lt;/code&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Configure Model
&lt;/h3&gt;

&lt;p&gt;Add AI models and API Keys in the settings page&lt;/p&gt;

&lt;h2&gt;
  
  
  Project Structure and Source Code Compilation
&lt;/h2&gt;

&lt;p&gt;This project is developed based on &lt;a href="https://github.com/Kuberwastaken/claurst" rel="noopener noreferrer"&gt;claurst&lt;/a&gt; project code&lt;/p&gt;

&lt;h3&gt;
  
  
  Directory Structure
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;boxagnts/
├── boxagnts/                 # Rust backend core code
│   ├── api/                 # AI model API (multi-provider support)
│   ├── core/                # Core types, constants, and basic functions
│   ├── gateway/             # API gateway (includes Cron task scheduling)
│   ├── mcp/                 # MCP protocol implementation (optional)
│   ├── server/              # Web server and Dashboard interface
│   ├── tools/               # Tool system and built-in tools
│   ├── tools-manager/       # Tool manager
│   ├── query/               # Query orchestration
│   ├── wasm-sandbox/        # WebAssembly sandbox runtime
│   ├── wasm-tools/          # WASM tool wrappers
│   └── workspace/           # Workspace and configuration management
├── boxagnts-dashboard-web/  # Vue 3 frontend source code
│   ├── src/
│   │   ├── api/            # API interface wrappers
│   │   ├── components/     # Vue components
│   │   ├── composables/    # Composables
│   │   ├── stores/         # Pinia state management
│   │   ├── views/          # Page components
│   │   └── router/         # Router configuration
│   └── package.json        # Frontend dependencies
├── app/                     # Application resources
│   ├── dashboard-web/      # Compiled web interface static assets
│   └── extensions/         # Extensions (tools/skills)
└── Cargo.toml              # Rust workspace configuration
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Backend Code Analysis
&lt;/h3&gt;

&lt;p&gt;The backend is developed in Rust using Tokio async runtime. The main modules are:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;api/&lt;/strong&gt;: Wraps APIs from multiple AI providers including OpenAI, Anthropic, Google, Azure, Bedrock, providing unified interface calling and message format conversion&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;core/&lt;/strong&gt;: Defines core data types, constants, error handling, and system prompts&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;gateway/&lt;/strong&gt;: API gateway layer, handles HTTP requests, includes Cron task scheduling system (cron/ subdirectory), supporting scheduled task creation, management, and execution&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;server/&lt;/strong&gt;: Web server, providing Dashboard REST API and WebSocket support&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;tools/&lt;/strong&gt;: Tool system, implements execution framework for built-in tools and skills&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;wasm-sandbox/&lt;/strong&gt;: WebAssembly sandbox based on Wasmtime, implementing secure code execution environment&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;workspace/&lt;/strong&gt;: Workspace management, handles configuration, authentication, and history storage&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Frontend Code Analysis
&lt;/h3&gt;

&lt;p&gt;The frontend uses Vue 3 + TypeScript + Vuetify technology stack:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Uses &lt;strong&gt;Pinia&lt;/strong&gt; for state management (stores/ directory)&lt;/li&gt;
&lt;li&gt;Uses &lt;strong&gt;Vue Router&lt;/strong&gt; for routing management (router/ directory)&lt;/li&gt;
&lt;li&gt;Main pages: Chat, Agents, Cron tasks, Files, Skills, Tools, Sites, Settings, etc.&lt;/li&gt;
&lt;li&gt;Supports Markdown rendering, code editor (CodeMirror), charts (Chart.js), etc.&lt;/li&gt;
&lt;li&gt;Communicates with backend via REST API and WebSocket&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Source Code Compilation Method
&lt;/h3&gt;

&lt;h4&gt;
  
  
  Environment Requirements
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;Rust 1.75+ (Install: &lt;a href="https://www.rust-lang.org/tools/install" rel="noopener noreferrer"&gt;https://www.rust-lang.org/tools/install&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;Node.js 18+ (Install: &lt;a href="https://nodejs.org/" rel="noopener noreferrer"&gt;https://nodejs.org/&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;npm or pnpm&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  Compile Backend
&lt;/h4&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# Enter project root directory&lt;/span&gt;
&lt;span class="nb"&gt;cd &lt;/span&gt;boxagnts-pub

&lt;span class="c"&gt;# Compile Debug version&lt;/span&gt;
cargo build

&lt;span class="c"&gt;# Compile Release version (optimize for size and performance)&lt;/span&gt;
cargo build &lt;span class="nt"&gt;--release&lt;/span&gt;

&lt;span class="c"&gt;# Compiled executable is located at target/release/boxagnts&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  Compile Frontend
&lt;/h4&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# Enter frontend directory&lt;/span&gt;
&lt;span class="nb"&gt;cd &lt;/span&gt;boxagnts-dashboard-web

&lt;span class="c"&gt;# Install dependencies&lt;/span&gt;
npm &lt;span class="nb"&gt;install&lt;/span&gt;

&lt;span class="c"&gt;# Start development mode (hot reload)&lt;/span&gt;
npm run dev

&lt;span class="c"&gt;# Compile production version&lt;/span&gt;
npm run build

&lt;span class="c"&gt;# Compiled static files will be output to app/dashboard-web/&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  Complete Build Process
&lt;/h4&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# 1. Compile frontend&lt;/span&gt;
&lt;span class="nb"&gt;cd &lt;/span&gt;boxagnts-dashboard-web
npm &lt;span class="nb"&gt;install
&lt;/span&gt;npm run build

&lt;span class="c"&gt;# 2. Compile backend&lt;/span&gt;
&lt;span class="nb"&gt;cd&lt;/span&gt; ..
cargo build &lt;span class="nt"&gt;--release&lt;/span&gt;

&lt;span class="c"&gt;# 3. Run&lt;/span&gt;
./target/release/boxagnts
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  License
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://dev.toLICENSE"&gt;MIT&lt;/a&gt;&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;Repository&lt;/strong&gt;: &lt;a href="https://github.com/guyoung/boxagnts" rel="noopener noreferrer"&gt;https://github.com/guyoung/boxagnts&lt;/a&gt;&lt;/p&gt;

</description>
      <category>agents</category>
      <category>ai</category>
      <category>opensource</category>
      <category>rust</category>
    </item>
  </channel>
</rss>
