Skip to content
Changelog

Read the files a CompanyOS Task produced from your own app

ContributorAshpreet BediFounder & CEO

November 17, 20262 min read

The AgentOS Company API now serves a CompanyOS Task's files and the shared notes over HTTP, so your own app or dashboard can show what a Task produced. CompanyOS agents leave their work in a file tree, and in earlier releases a person could read those folders only by asking Super Agent in chat.

A CompanyOS file tree in two panels. The left panel shows a Task folder written by Mini Agent, tasks/task_id/ holding report.md and data/rows.csv, read with GET /company/tasks/task_id/files and GET /company/tasks/task_id/files/path, scopes tasks:read and wiki:read. The right panel shows the shared notes written by Super Agent, notes/ holding follow-ups.md, read with GET /company/notes and GET /company/notes/path, scope wiki:read. Below, real output of reading data/rows.csv returns 200 with its content and a size of 22 bytes

Mini Agent writes working files and deliverables into tasks/<task-id>/ while it runs a Task. Super Agent keeps its own notes in notes/, one folder shared by everyone who talks to it. Each folder gets a listing route and a read route:

GET /company/tasks/{task_id}/files          list a Task's files
GET /company/tasks/{task_id}/files/{path}   read one file
GET /company/notes                          list the shared notes
GET /company/notes/{path}                   read one note

Listings use the wiki routes' paged shape, with limit from 1 to 200 (20 by default) and page. Each entry gives path, size_bytes, version and updated_at, and the path is relative to the folder, so data/rows.csv keeps its subfolder and goes straight into the read route. A read returns content, the same metadata and next_offset, which tells you where the next read of a long file starts.

We ran the routes on SQLite through FastAPI's TestClient. The script wrote the files with CompanyFiles.write, the call behind the agents' write_company_file tool, in place of Mini Agent and Super Agent. Real output:

GET /company/tasks/{task_id}/files               200  ["data/rows.csv", "report.md"]
GET /company/notes/follow-ups.md                 200  size_bytes 37
GET /company/tasks/{task_id}/files/missing.md    404  File not found
GET /company/tasks/{task_id}/files/%2e%2e/...    422  Invalid file path. A path is at most 469 characters ...

The same script against the previous release got 404 Not Found on all four routes. With AgentOS authorization on, a token holding tasks:read alone still opens the Task and gets 403 on its files, which also need wiki:read, the scope chat asks for when it reads them. A missing or archived Task returns 404 Task not found. User isolation doesn't apply to these routes, so any caller with the scope can open them. Treat the notes as shared with everyone who can read the wiki.

See the cookbook, and learn more about running CompanyOS in the documentation.

Frequently asked questions

With AgentOS authorization on, /company/notes and /company/notes/{path} need wiki:read. A Task's files need tasks:read and wiki:read together, and a token missing one gets 403 Insufficient permissions. Required scope(s): tasks:read, wiki:read.

Each read returns at most 40,000 characters. When next_offset is not null, send the same request again with ?offset=<next_offset> and append the content until next_offset comes back null.

The four routes only read. Writes stay with the agents. Mini Agent writes into its Task folder while it works, and Super Agent writes notes and confirmed pages in chat through its file tools.

Reading data/rows.csv from a Task folder returned {"content": "name,count\ninstall,12\n", "metadata": {"path": "data/rows.csv", "size_bytes": 22, "version": 1, "updated_at": 1795460665, "user_id": null}, "next_offset": null}. user_id is always null for these files.

Shipped around the same time