惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Last Week in AI
Last Week in AI
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
博客园_首页
雷峰网
雷峰网
IT之家
IT之家
I
InfoQ
酷 壳 – CoolShell
酷 壳 – CoolShell
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
B
Blog
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
博客园 - 【当耐特】
大猫的无限游戏
大猫的无限游戏
博客园 - 聂微东
Hugging Face - Blog
Hugging Face - Blog
A
About on SuperTechFans
月光博客
月光博客
P
Proofpoint News Feed
博客园 - 三生石上(FineUI控件)
J
Java Code Geeks
G
Google Developers Blog
小众软件
小众软件
宝玉的分享
宝玉的分享
Jina AI
Jina AI
V
Visual Studio Blog

DEV Community

Authentication Security Deep Dive: From Brute Force to Salted Hashing (With Java Examples) Why AI Systems Don’t Fail — They Drift Spilling beans for how i learn for exam😁"Reinforcement Learning Cheat Sheet" I Replaced Chrome with Safari for AI Browser Automation. Here's What Broke (and What Finally Worked) How Python Borrows Other People's Work The $40 Architecture: Processing 1 Billion API Requests with 99.99% Uptime Vibe Coding: A Workflow Guide (From Zero to SaaS) Most webhook security guides protect the wrong side. The scary part is delivery. Headless CMS for TanStack Start: Build a Blog with Cosmic EU Age Verification App "Hacked in 2 Minutes" — What Actually Happened Comfy Cloud’s delete function does not actually remove files Running AI Models on GPU Cloud Servers: A Beginner Guide Event-driven media intelligence with AWS Step Functions and Bedrock I scored 500 AI prompts across 8 quality dimensions — here's what broke How to Call Google Gemini API from Next.js (Free Tier, No Backend Needed) The Portal Protocol: Reclaiming Human Connection in the Age of AI How to Fix Your Team's Scattered Knowledge Problem With a Self-Hosted Forum Intro to tc Cloud Functors: A Graph-First Mental Model for the Modern Cloud Designing Multi-Tenant Backends With Both Ownership and Team Access I Built a Neumorphic CSS Library with 77+ Components — Here's What I Learned PostgreSQL Performance Optimization: Why Connection Pooling Is Critical at Scale Cómo construí un SaaS multi-rubro para gestionar expensas en Argentina con FastAPI + Vue 3 🚀 I Built an Ethical Hacking Scanner Tool – Open Source Project I Replaced /usage and /context in Claude Code With a Single Statusline A Pythonic Way to Handle Emails (IMAP/SMTP) with Auto-Discovery and AI-Ready Design I Collected 8.9 Million Polymarket Price Points — Here's What I Found About How Markets Really Move EcoTrack AI — Carbon Footprint Tracker & Dashboard Everyone's Using AI. No One Agrees How. 5 self-hosted ebook managers worth trying in 2026 Building Your First AI Agent with LangChain: From Chatbot to Autonomous Assistant
AIClaw Now Returns Tool Output Attachments You Can Actual...
chowyu · 2026-06-28 · via DEV Community

chowyu

AIClaw already let agents run tools, generate files, and continue working across steps. The weak point was the handoff back to the user: a tool might create a report, image, or data file, but the final answer did not always make that output obvious or directly downloadable.

Recent AIClaw changes tightened that workflow. Tool-generated files are now collected, deduplicated, exposed in API responses and streaming completion chunks, linked into the final assistant message, and rendered by the chat UI through stable /public/files/<uuid> download URLs.

This is not a cosmetic change. It closes the loop between tool execution and user-visible results.

The problem

In a tool-using agent system, “I created the file” is not enough. Users need to:

  • know that a file was produced
  • see which final answer it belongs to
  • download it without searching through logs
  • keep that file associated with the conversation history

Without that, generated artifacts are easy to lose, especially when an agent uses multiple tools or delegates work to sub-agents.

What changed in AIClaw

The recent attachment work is visible across the backend and frontend.

On the execution side, AIClaw now:

  • collects file outputs returned by tools
  • scans sandbox directories for newly created files when a tool does not explicitly return a file result
  • pulls generated files back out of sub_agent results
  • deduplicates attachments before the final response is stored or streamed

You can see that in the tool execution path:

The final assistant response now appends an attachment section with Markdown links such as:

Attachment List:
- [report.csv](/public/files/<uuid>)
- [chart.png](/public/files/<uuid>)

In the current Chinese codebase revision, that section is rendered as 附件列表 in the saved final content.

The response payload also includes files directly:

  • blocking chat responses now return files
  • streaming done chunks now include files

That path is visible in:

On the frontend, the chat view turns those file objects into clickable downloads through /public/files/${file.uuid}:

Why this matters in practice

This feature is useful anywhere an AIClaw agent produces artifacts instead of pure text.

Examples:

  1. A code_interpreter task generates a CSV and a PNG chart.
  2. A browser automation flow saves a screenshot or extracted document.
  3. A sub-agent writes a research summary file and passes it back to the parent run.
  4. A shell command creates a log bundle or transformed dataset in the sandbox.

Before this improvement, users could still end up asking, “Where did the file go?”

Now the expected workflow is much cleaner:

  1. The tool runs.
  2. AIClaw captures the output files.
  3. The final answer includes explicit download links.
  4. The API and streamed completion both carry the file metadata.
  5. The UI renders the attachments as part of the conversation result.

That means AIClaw behaves more like a practical work system and less like a text-only chatbot that happens to call tools.

A small detail that matters: sub-agent outputs

One useful part of this change is that file outputs are not limited to the top-level agent.

The executor now extracts file references from sub_agent results and folds them back into the parent response. That matters because many real AIClaw workflows split research, scraping, or data prep into delegated tasks. If child artifacts disappear at the parent boundary, the system feels unreliable.

Bringing those files back into the parent answer makes nested agent execution much easier to trust.

Another practical improvement: better streaming behavior

The same change set also adds SSE ping support in chat streaming handlers. That is separate from attachments, but it helps long-running tool workflows stay alive while the agent is still working.

For attachment-heavy runs, that pairing is useful:

  • streaming stays active during long tool work
  • the final done chunk can carry the generated files

Why I picked this feature

This is a good example of AIClaw’s local-first, tool-oriented design philosophy. The platform is not just trying to produce a nice paragraph. It is trying to complete work and return the artifacts that work produces.

Generated files are often the real output. Making them first-class in the response path is the right move.

If you are building with AIClaw, this is the kind of feature that improves daily usability more than another abstract prompt tweak.