A request to count support tickets can now take a different route through CrewAI: the model chooses a table query, and Python counts the parsed rows. The November 8 release of version 1.15.38 in crewAIInc/crewAI connects spreadsheet file URLs in an agent’s input to tools for inspecting and calculating across their contents.
CrewAI is a framework for organizing AI agents, their tools and their tasks. With its optional crewai[spreadsheets] dependencies installed, a caller can supply a direct CSV, TSV or XLSX download URL. The framework prepares a short description of the file and gives the agent two tools: inspect_spreadsheet and query_spreadsheet. The useful change is where the arithmetic happens.
Inside CrewAI’s spreadsheet test
How can a short preview yield a full-table count?
The model chooses a structured query. Pandas, a Python data library, counts the parsed table, including rows absent from the profile’s five-row sample.
- Open
- 400
- In progress
- 400
- Closed
- 400
Test fixture, not a live-agent run. The upstream test scripts the model’s query and mocks the download. We inspected it; we did not run it.
Count extent: 1,200 ticket rows
Sheet: Chamados
| Ticket ID | Current status |
|---|---|
| T-0000 | Open |
| T-0001 | In progress |
| T-0002 | Closed |
| T-0003 | Open |
| T-0004 | In progress |
| 1,194 middle rows omitted here; still included in the count. | |
| T-1199 | Closed |
The first five tickets are the profile sample. The last ticket shows the extent beyond it. IDs are not worksheet row numbers; the topic column is omitted here.
Translated from Aberto (Open), Em andamento (In progress) and Fechado (Closed). The separate Priorizacao sheet has 50 rows; this query does not count them.
Trace the count
The test supplies this fixed query_spreadsheet request. The column name below is kept exactly as written in the source.
{
"file": "tickets.xlsx",
"sheet": "Chamados",
"operation": "value_counts",
"columns": ["Status atual (slide)"]
}
The implementation selects the sheet’s parsed frame, applies any filters and omits a suspected total row for aggregates. Pandas counts the selected column’s values before the result is paginated. This fixture has 1,200 tickets cycling through three statuses, so each count is 400.
The overview already contains full-column statistics; the profile adds a five-row sample. Neither preview becomes the row input to this calculation. Headers, inferred types and saved formula values still determine what the parsed table contains.
Inspect the merge-pinned fixture rows, prescribed query and pandas count implementation.
This division is visible in the tool definitions and query implementation. The model selects from five fixed operations: retrieving rows, describing columns, counting values, grouping and aggregating, or correlating numeric columns. It supplies structured choices such as the sheet, column and filters. It does not write arbitrary Python expressions for this query tool to execute.
The preview is a map to the table
The initial overview already includes statistics computed across columns. A fuller inspection adds column types, missing values, common values and a small row sample. Those are aids to choosing the question. Filtering and aggregation operate on the parsed table before the displayed answer is shortened or paginated.
The integration tests prescribe the query through agent, task and crew entry points. This checks the intended wiring; it does not establish that a live model will select the right sheet or formulate the right question.
The release advances an existing reader. The earlier change, merged November 7, brought spreadsheet-reading code from Studio Assistant into the library and explicitly said nothing called it yet. November 8’s integration makes caller-provided URLs reach that machinery across agent entry points. Familiar table operations have become an available input path.
A calculation still needs a defined table
The parser decides what the calculation receives. It detects a header and infers column types; a caller can override the header row. Values that disagree with an inferred type can become empty. Excel formulas contribute their saved values, without recalculation: an upstream test explicitly expects an uncached formula to read as empty.
There is also a consequential convenience: aggregates omit a final row that looks like a total, and report the omission. The heuristic recognizes total labels or a numeric final value approximately equal to the sum above. Ordinary amounts of 1, 2 and 3 would satisfy that numerical rule. That is a deduction from the implementation, not a reproduction we ran. The row remains available through the rows operation.
For builders, the immediate opportunity is bounded, read-only questions over supported tables: ticket backlogs, grouped sales or column summaries. Start by inspecting the selected sheet, header and reported omissions, then compare a known count or total with the source workbook. Direct file downloads and the optional dependencies are required; this release does not establish a Studio upload rollout.
The next useful evidence is how often live agents choose the right operation and preserve its meaning in their answer. The released change already supplies something concrete: a table-computation path whose inputs and arithmetic can be inspected separately from the model’s explanation.