Guyoung Studio Posted on May 30 BoxAgnts Introduction (6) — Agent Multi-Turn Conversation and Tool/Skill Invocation # agents # agentskills # ai If you've only chatted with ChatGPT, you might think an AI Agent is simply "send a prompt to the API, display the response." The reality is far more complex. Here is a complete Agent interaction flow in BoxAgnts: User input: "Help me read config.toml and change port to 9090" 1. User message added to conversation history 2. Build system prompt (tool list + skill list + AGENTS.md + Agent role definition) 3. Call LLM API → stream receive response 4. AI decides to call tool: tool_use("read", {path: "config.toml"}) 5. Execute read tool (within WASM sandbox) 6. Tool result injected into conversation history 7. Call API again → AI analyzes config 8. AI decides to call tool: tool_use("edit", {path: "config.toml", old: "port = 8080", new: "port = 9090"}) 9. Execute edit tool 10. Tool result injected into conversation 11. Call API again → AI responds: "Port has been changed from 8080 to 9090" 12. end_turn → Conversation ends Enter fullscreen mode Exit fullscreen mode This process involves 3 API calls, 2 tool executions, streaming push, and context management. This article dissects the design and implementation of each link. Agent Definition: Giving the Agent an "Identity" Before starting the reasoning loop, the Agent's "role" needs to be defined. BoxAgnts comes with three pre-installed Agents: // boxagnts-workspace/src/config.rs pub struct AgentDefinition { pub description : "Option<String>, // Description" pub model : Option < String > , // Model override pub temperature : Option < f64 > , // Temperature override pub prompt : Option < String > , // System prompt prefix pub access : String , // Permission: full / read-only / search-only pub visible : bool , // Whether visible in @agent autocomplete pub max_turns : Option < u32 > , // Max turns override pub color : Option < String > , // Terminal dis
Back to Home

BoxAgnts Introduction (6) — Agent Multi-Turn Conversation and Tool/Skill Invocation
B
Blizine Admin
·2 min read·0 views
📰Dev.to — dev.to
B
Blizine Admin
View Profile Staff Writer