Vercel Logo

Test and Extend

The agent is complete! There is already a chat input and API route created to kick off the agent and stream back the results. Start the development server with pnpm dev and go to http://localhost:3000 in the browser to test the agent.

Ask it a question like "how did the deal progress?" or "did they mention pricing?" and see the agent work by navigating the filesystem!

Outcome

You've verified the agent handles diverse questions and you understand how to extend it with more tools, data sources, and capabilities.

Fast Track

  1. Test with broad questions ("how did the deal progress?") and specific ones ("did they mention pricing?")
  2. Watch the tool calls in the UI to understand the agent's exploration strategy
  3. Review the extension ideas and pick one to try

Test the Agent

Try these categories of questions and observe how the agent uses bash differently for each.

Discovery questions

These test whether the agent can orient itself in the filesystem:

  • "What files are available?"
  • "How many calls are there?"
  • "What's in the calls directory?"

The agent should use ls and possibly wc to answer. Watch the tool calls. The agent figures out the filesystem structure on its own.

Summarization questions

These test whether the agent can read and synthesize content:

  • "Summarize the first call"
  • "What were the main topics across all calls?"
  • "Who are the participants in call 2?"

The agent typically cats one or more files and produces a structured summary. For cross-file questions, it might read each file sequentially.

Search questions

These test the agent's ability to find specific information:

  • "Did anyone mention pricing?"
  • "Were there any objections raised?"
  • "What action items were discussed?"

Watch for grep usage. The agent should search across files rather than reading everything. This is where the filesystem-as-context pattern shines: the agent uses bash as a query language.

Watch the tool calls

The chat UI renders each bashTool invocation with the command and its output. This is your window into the agent's reasoning, so you can see exactly which commands it runs and in what order.

Extending This App

Here are some ways to build on this project:

Add more tools

Give the agent additional capabilities:

  • File upload tool - Let users upload documents dynamically instead of pre-loading them
  • Search tool - Add semantic search over documents using embeddings
  • Write tool - Allow the agent to create summaries or reports and save them

Improve the data pipeline

  • Load files from cloud storage (S3, Vercel Blob) instead of the local filesystem
  • Connect to a database to query structured data alongside the transcripts
  • Add a tool that fetches files on-demand rather than pre-loading everything

Enhance the UI

  • Add chat history persistence with a database
  • Show a file tree of what's available in the sandbox
  • Add authentication to restrict access

Use bash-tool

The bash-tool package abstracts the complexity of writing and reading files from the filesystem and integrates seamlessly with Vercel Sandbox and the AI SDK.

Done-When

  • You've tested the agent with discovery, summarization, and search questions
  • You've observed how the agent uses different bash commands for different question types
  • You understand the tool loop: prompt → tool call → result → next tool call → final response
  • You've reviewed the extension ideas and have a sense of what to build next