Understand a project with the explorer
This tutorial follows an incident review: a strategy requests human approval, then calls an agent authorized to read the incident. Exploration compiles the code; it requires no model or business-service access.
1. Prepare the program
Create a project with touba init, then save this program in
src/exploration.tb:
module exploration
tool ReadIncident
description "Read the incident and return a diagnosis."
takes request as Text
gives Text
agent Specialist
takes request as Text
gives Text
responsibility "Diagnose the incident using the authorized reading tool."
uses ReadIncident
callable_by strategy Review
strategy Review
takes request as Text
gives Text
uses Specialist
do
human.approve
with context as request
with role as "incident_manager"
with timeout_ms as 60000
into approval
Specialist
with request as request
into diagnosis
give diagnosis
2. Read the architecture
From your project, run:
touba explore
Select the exploration module and choose Explore contents.
The Review strategy, Specialist agent and ReadIncident tool appear
in the list. Select the agent to read its responsibility and its
request: Text → Text signature.
In VS Code, Touba: Explore Project opens the same views.
3. Follow the flow
Open Flow. Follow the entry to Review, human approval, the call to
Specialist, and the return. Select the approval step: the detail panel shows
the incident_manager role and a 60-second timeout.
Use Open source to check these declarations in the program.
4. Examine authority
In Governance, find these relationships:
| From | Relationship | To |
|---|---|---|
| Review | may use | Specialist |
| Review | may invoke agent | Specialist |
| Specialist | may use | ReadIncident |
The first comes from the strategy's uses; the second comes from the agent's
callable_by. They represent two complementary checks.
5. Check refresh
Edit the agent's responsibility and save: its detail panel updates. Temporarily introduce a syntax error and save: diagnostics appear and the last valid graph remains identified. Fix the file to return to Up to date.
Finish with the SVG or PNG export, then close the service with Ctrl+C. To explore parallel work, continue with the parallel processing tutorial.