Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 3 additions & 19 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,9 +79,9 @@ best. We can perform quick experiments to measure performance after making chang
pnpm dev
```

Then open your browser and go to the [http://localhost:3000/](demo site).
Then open your browser and go to the [http://localhost:3000/](demo site): http://localhost:3000/

Setup for Step 0 is complete after this step.
Setup for Step 0 (baseline site with manual processing) is complete after this step.

3. **(Optional) Enable Weave Tracing**

Expand Down Expand Up @@ -119,23 +119,7 @@ best. We can perform quick experiments to measure performance after making chang

Then restart the local webserver with `pnpm dev`.

5. **Start the local webserver**
TODO: replace with pnpm run_demo
TODO: make run_demo do the runloop agent setup too

```bash
pnpm dev
```

Set up Runloop resources for this demo and start the local tax prep web server.

6. **Open demo application**
- **Demo Dashboard**: http://localhost:3000

TODO: list things to look at:
- eg: http://localhost:3000/stepN/ to see various steps
- eg: runloop dashboard w/ created artifacts
- eg: benchmark scenario runs
Now check out the demo dashboard again for [step 1](http://localhost:3000/step1) to see it in action.

## License

Expand Down
16 changes: 14 additions & 2 deletions docs/step1/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,21 @@ Step 1 largely reuses code from our original implementation: reading PDFs, parsi
- **API endpoint**:
You can walk through the streaming API route that orchestrates the entire processing flow:

<<<<<<< HEAD
```ts
84:238:packages/frontend/src/app/api/tax/process-step1-stream/route.ts
=======
```84:238:packages/frontend/src/app/api/tax/process-step1-stream/route.ts
>>>>>>> main
// Handles file upload, creates devbox, runs agent, generates PDF
// Returns Server-Sent Events for real-time progress updates
```

- **Devbox creation and agent execution**:
The API endpoint creates an instance of `TaxService` then calls `processTaxReturn`. In turn, this spins up the Runloop devbox, uploads files, and executes the agent:

```70:178:packages/frontend/src/lib/tax-processing-service.ts
```ts
70:178:packages/frontend/src/lib/tax-processing-service.ts
// Creates devbox from blueprint, uploads W-2 file and agent prompt,
// executes the agent via execAsync, and retrieves the JSON result
```
Expand Down Expand Up @@ -80,7 +86,12 @@ Step 1 largely reuses code from our original implementation: reading PDFs, parsi
- **Agent execution script**:
After setting up the evironment, we invoke the agent using a standalone script that runs on the devbox to process the W-2 and generate Form 1040 JSON:

<<<<<<< HEAD
```ts
11:97:packages/tax-processing/src/bin/run-agent-turn.ts
=======
```11:97:packages/tax-processing/src/bin/run-agent-turn.ts
>>>>>>> main
// Runs a single agent turn using CodexService to process W-2
// and write Form 1040 JSON output to the specified file
```
Expand All @@ -102,7 +113,8 @@ Step 1 largely reuses code from our original implementation: reading PDFs, parsi
- **PDF generation**:
After processing the input, the final step is to generate the 1040 PDF form:

```29:50:packages/frontend/src/lib/pdf-generator.ts
```ts
29:50:packages/frontend/src/lib/pdf-generator.ts
// Loads IRS Form 1040 template, fills form fields with agent output,
// and saves the completed PDF to the output directory
```
Expand Down
Loading