@nestbox-ai/cli 1.0.63 → 1.0.66
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +555 -10
- package/dist/agents/docProc/anthropic.d.ts +21 -0
- package/dist/agents/docProc/anthropic.js +225 -0
- package/dist/agents/docProc/anthropic.js.map +1 -0
- package/dist/agents/docProc/index.d.ts +2 -20
- package/dist/agents/docProc/index.js +7 -223
- package/dist/agents/docProc/index.js.map +1 -1
- package/dist/agents/docProc/openai.d.ts +16 -0
- package/dist/agents/docProc/openai.js +222 -0
- package/dist/agents/docProc/openai.js.map +1 -0
- package/dist/agents/reportGenerator/REPORT_CONFIG_GUIDE.md +1449 -0
- package/dist/agents/reportGenerator/SYSTEM_PROMPT.md +28 -0
- package/dist/agents/reportGenerator/annual_report_10k.yaml +633 -0
- package/dist/agents/reportGenerator/anthropic.d.ts +19 -0
- package/dist/agents/reportGenerator/anthropic.js +209 -0
- package/dist/agents/reportGenerator/anthropic.js.map +1 -0
- package/dist/agents/reportGenerator/index.d.ts +2 -0
- package/dist/agents/reportGenerator/index.js +10 -0
- package/dist/agents/reportGenerator/index.js.map +1 -0
- package/dist/agents/reportGenerator/openai.d.ts +16 -0
- package/dist/agents/reportGenerator/openai.js +200 -0
- package/dist/agents/reportGenerator/openai.js.map +1 -0
- package/dist/agents/reportGenerator/report_config.schema.yaml +905 -0
- package/dist/agents/reportGenerator/vc_portfolio_monitoring.yaml +443 -0
- package/dist/commands/generate/docProc.js +27 -16
- package/dist/commands/generate/docProc.js.map +1 -1
- package/dist/commands/generate/reportComposer.d.ts +2 -0
- package/dist/commands/generate/reportComposer.js +110 -0
- package/dist/commands/generate/reportComposer.js.map +1 -0
- package/dist/commands/generate.js +2 -0
- package/dist/commands/generate.js.map +1 -1
- package/package.json +3 -2
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Nestbox CLI for managing and deploying agents
|
|
2
2
|
|
|
3
|
-
The Nestbox CLI tool is designed to facilitate development, management, and deployment of AI agents built on the Nestbox platform. It provides developers streamlined commands for authentication, deployment lifecycle management, and AI
|
|
3
|
+
The Nestbox CLI tool is designed to facilitate development, management, and deployment of AI agents built on the Nestbox platform. It provides developers streamlined commands for authentication, deployment lifecycle management, AI agent management, document processing, and AI-assisted configuration generation.
|
|
4
4
|
|
|
5
5
|
Read more in the [Nestbox AI developers site](https://developers.nestbox.ai)
|
|
6
6
|
|
|
@@ -45,13 +45,14 @@ Options:
|
|
|
45
45
|
## Commands Overview
|
|
46
46
|
|
|
47
47
|
- [`login`](#login) - Login using Google SSO
|
|
48
|
-
- [`logout`](#logout) - Logout from Nestbox platform
|
|
48
|
+
- [`logout`](#logout) - Logout from Nestbox platform
|
|
49
49
|
- [`project`](#project) - Manage Nestbox projects
|
|
50
50
|
- [`compute`](#compute) - Manage Nestbox compute instances
|
|
51
51
|
- [`agent`](#agent) - Manage Nestbox agents
|
|
52
52
|
- [`document`](#document) - Manage Nestbox documents and collections
|
|
53
53
|
- [`image`](#image) - Manage Nestbox images
|
|
54
|
-
- [`
|
|
54
|
+
- [`doc-proc`](#doc-proc) - Document processing pipeline management
|
|
55
|
+
- [`generate`](#generate) - AI-assisted configuration generation (Anthropic or OpenAI)
|
|
55
56
|
|
|
56
57
|
---
|
|
57
58
|
|
|
@@ -496,13 +497,430 @@ nestbox image list [options]
|
|
|
496
497
|
|
|
497
498
|
---
|
|
498
499
|
|
|
499
|
-
##
|
|
500
|
+
## Document Processing
|
|
501
|
+
|
|
502
|
+
### `doc-proc`
|
|
503
|
+
|
|
504
|
+
Manage document processing pipelines — upload documents, run processing jobs, manage profiles, run evaluations, and configure webhooks.
|
|
505
|
+
|
|
506
|
+
**Global options** (available on all `doc-proc` subcommands):
|
|
507
|
+
- `--project <projectId>` - Project ID or name (defaults to current project)
|
|
508
|
+
- `--instance <instanceId>` - Document processing instance ID
|
|
509
|
+
- `--json` - Output raw JSON instead of formatted tables
|
|
510
|
+
|
|
511
|
+
---
|
|
512
|
+
|
|
513
|
+
### Profile Management
|
|
514
|
+
|
|
515
|
+
A *profile* is a YAML configuration file that controls how documents are processed (OCR settings, chunking strategy, GraphRAG indexing, etc.).
|
|
516
|
+
|
|
517
|
+
#### `doc-proc profile init`
|
|
518
|
+
|
|
519
|
+
Scaffold a profile YAML template to the local filesystem.
|
|
520
|
+
|
|
521
|
+
```bash
|
|
522
|
+
nestbox doc-proc profile init [options]
|
|
523
|
+
```
|
|
524
|
+
|
|
525
|
+
**Options:**
|
|
526
|
+
- `-o, --output <path>` - Output file path (default: `./profile.yaml`)
|
|
527
|
+
- `-f, --force` - Overwrite existing file
|
|
528
|
+
|
|
529
|
+
**Example:**
|
|
530
|
+
```bash
|
|
531
|
+
nestbox doc-proc profile init -o ./my-profile.yaml
|
|
532
|
+
```
|
|
533
|
+
|
|
534
|
+
#### `doc-proc profile create`
|
|
535
|
+
|
|
536
|
+
Register a profile from a YAML file with the processing instance.
|
|
537
|
+
|
|
538
|
+
```bash
|
|
539
|
+
nestbox doc-proc profile create --file <path> [options]
|
|
540
|
+
```
|
|
541
|
+
|
|
542
|
+
**Options:**
|
|
543
|
+
- `-f, --file <path>` - Path to profile YAML file (required)
|
|
544
|
+
- `-n, --name <name>` - Override the profile name from the file
|
|
545
|
+
- `--project <projectId>` - Project ID or name
|
|
546
|
+
- `--instance <instanceId>` - Processing instance ID
|
|
547
|
+
- `--json` - Output raw JSON
|
|
548
|
+
|
|
549
|
+
**Example:**
|
|
550
|
+
```bash
|
|
551
|
+
nestbox doc-proc profile create --file ./my-profile.yaml --name "OCR + GraphRAG"
|
|
552
|
+
```
|
|
553
|
+
|
|
554
|
+
#### `doc-proc profile list`
|
|
555
|
+
|
|
556
|
+
List all profiles registered with the instance.
|
|
557
|
+
|
|
558
|
+
```bash
|
|
559
|
+
nestbox doc-proc profile list [options]
|
|
560
|
+
```
|
|
561
|
+
|
|
562
|
+
**Options:**
|
|
563
|
+
- `--page <page>` - Page number (default: `1`)
|
|
564
|
+
- `--limit <limit>` - Page size (default: `20`)
|
|
565
|
+
|
|
566
|
+
#### `doc-proc profile show`
|
|
567
|
+
|
|
568
|
+
Show full details of a profile by ID.
|
|
569
|
+
|
|
570
|
+
```bash
|
|
571
|
+
nestbox doc-proc profile show --profile <profileId> [options]
|
|
572
|
+
```
|
|
573
|
+
|
|
574
|
+
**Options:**
|
|
575
|
+
- `--profile <profileId>` - Profile ID (required)
|
|
576
|
+
|
|
577
|
+
#### `doc-proc profile validate`
|
|
578
|
+
|
|
579
|
+
Validate a profile YAML file against the schema without registering it.
|
|
580
|
+
|
|
581
|
+
```bash
|
|
582
|
+
nestbox doc-proc profile validate --file <path> [options]
|
|
583
|
+
```
|
|
584
|
+
|
|
585
|
+
**Options:**
|
|
586
|
+
- `-f, --file <path>` - Path to profile YAML file (required)
|
|
587
|
+
|
|
588
|
+
#### `doc-proc profile schema`
|
|
589
|
+
|
|
590
|
+
Print the full profile JSON Schema for reference.
|
|
591
|
+
|
|
592
|
+
```bash
|
|
593
|
+
nestbox doc-proc profile schema [options]
|
|
594
|
+
```
|
|
595
|
+
|
|
596
|
+
---
|
|
597
|
+
|
|
598
|
+
### Document Management
|
|
599
|
+
|
|
600
|
+
#### `doc-proc document create`
|
|
601
|
+
|
|
602
|
+
Upload a file and create a document processing job.
|
|
603
|
+
|
|
604
|
+
```bash
|
|
605
|
+
nestbox doc-proc document create --input <path> [options]
|
|
606
|
+
```
|
|
607
|
+
|
|
608
|
+
**Options:**
|
|
609
|
+
- `--input <path>` - Document file path (required)
|
|
610
|
+
- `--profile <profileId>` - Processing profile ID
|
|
611
|
+
- `--stages <stages>` - Comma-separated stage override (e.g. `ocr,chunking`)
|
|
612
|
+
- `--priority <priority>` - Job priority: `low`, `normal`, or `high`
|
|
613
|
+
|
|
614
|
+
**Example:**
|
|
615
|
+
```bash
|
|
616
|
+
nestbox doc-proc document create --input ./contract.pdf --profile prof-abc123
|
|
617
|
+
```
|
|
618
|
+
|
|
619
|
+
#### `doc-proc document list`
|
|
620
|
+
|
|
621
|
+
List all processed documents.
|
|
622
|
+
|
|
623
|
+
```bash
|
|
624
|
+
nestbox doc-proc document list [options]
|
|
625
|
+
```
|
|
626
|
+
|
|
627
|
+
**Options:**
|
|
628
|
+
- `--page <page>` - Page number (default: `1`)
|
|
629
|
+
- `--limit <limit>` - Page size (default: `20`)
|
|
630
|
+
|
|
631
|
+
#### `doc-proc document show`
|
|
632
|
+
|
|
633
|
+
Show details of a specific processed document.
|
|
634
|
+
|
|
635
|
+
```bash
|
|
636
|
+
nestbox doc-proc document show --document <documentId> [options]
|
|
637
|
+
```
|
|
638
|
+
|
|
639
|
+
**Options:**
|
|
640
|
+
- `--document <documentId>` - Document ID (required)
|
|
641
|
+
|
|
642
|
+
#### `doc-proc document artifacts`
|
|
643
|
+
|
|
644
|
+
Download all artifacts for a document as a zip file (GraphRAG output, chunks, etc.).
|
|
645
|
+
|
|
646
|
+
```bash
|
|
647
|
+
nestbox doc-proc document artifacts --document <documentId> [options]
|
|
648
|
+
```
|
|
649
|
+
|
|
650
|
+
**Options:**
|
|
651
|
+
- `--document <documentId>` - Document ID (required)
|
|
652
|
+
- `-o, --output <path>` - Output zip path (default: `./document-artifacts.zip`)
|
|
653
|
+
|
|
654
|
+
**Example:**
|
|
655
|
+
```bash
|
|
656
|
+
nestbox doc-proc document artifacts --document doc-abc123 -o ./artifacts.zip
|
|
657
|
+
```
|
|
658
|
+
|
|
659
|
+
---
|
|
660
|
+
|
|
661
|
+
### Job Monitoring
|
|
662
|
+
|
|
663
|
+
#### `doc-proc job list`
|
|
664
|
+
|
|
665
|
+
List document processing jobs.
|
|
666
|
+
|
|
667
|
+
```bash
|
|
668
|
+
nestbox doc-proc job list [options]
|
|
669
|
+
```
|
|
670
|
+
|
|
671
|
+
**Options:**
|
|
672
|
+
- `--state <state>` - Filter by job state (e.g. `pending`, `running`, `completed`, `failed`)
|
|
673
|
+
- `--page <page>` - Page number (default: `1`)
|
|
674
|
+
- `--limit <limit>` - Page size (default: `20`)
|
|
675
|
+
|
|
676
|
+
#### `doc-proc job status`
|
|
677
|
+
|
|
678
|
+
Get the status of a specific job.
|
|
679
|
+
|
|
680
|
+
```bash
|
|
681
|
+
nestbox doc-proc job status --job <jobId> [options]
|
|
682
|
+
```
|
|
683
|
+
|
|
684
|
+
**Options:**
|
|
685
|
+
- `--job <jobId>` - Job ID (required)
|
|
686
|
+
- `--full` - Fetch full job details instead of lightweight status
|
|
687
|
+
|
|
688
|
+
**Example:**
|
|
689
|
+
```bash
|
|
690
|
+
nestbox doc-proc job status --job job-xyz789 --full
|
|
691
|
+
```
|
|
692
|
+
|
|
693
|
+
---
|
|
694
|
+
|
|
695
|
+
### Evaluations
|
|
696
|
+
|
|
697
|
+
Evaluations run a set of Q&A test cases against a processed document to measure extraction quality.
|
|
698
|
+
|
|
699
|
+
#### `doc-proc eval init`
|
|
700
|
+
|
|
701
|
+
Scaffold an eval YAML template.
|
|
702
|
+
|
|
703
|
+
```bash
|
|
704
|
+
nestbox doc-proc eval init [options]
|
|
705
|
+
```
|
|
706
|
+
|
|
707
|
+
**Options:**
|
|
708
|
+
- `-o, --output <path>` - Output file path (default: `./eval.yaml`)
|
|
709
|
+
- `-f, --force` - Overwrite existing file
|
|
710
|
+
|
|
711
|
+
**Example eval.yaml:**
|
|
712
|
+
```yaml
|
|
713
|
+
testCases:
|
|
714
|
+
- id: q1
|
|
715
|
+
question: "What are the payment terms?"
|
|
716
|
+
expectedAnswer: "Net 30"
|
|
717
|
+
```
|
|
718
|
+
|
|
719
|
+
#### `doc-proc eval run`
|
|
720
|
+
|
|
721
|
+
Run an evaluation against a document.
|
|
722
|
+
|
|
723
|
+
```bash
|
|
724
|
+
nestbox doc-proc eval run --document <documentId> --file <path> [options]
|
|
725
|
+
```
|
|
726
|
+
|
|
727
|
+
**Options:**
|
|
728
|
+
- `--document <documentId>` - Document ID (required)
|
|
729
|
+
- `-f, --file <path>` - Path to eval YAML file (required)
|
|
730
|
+
|
|
731
|
+
**Example:**
|
|
732
|
+
```bash
|
|
733
|
+
nestbox doc-proc eval run --document doc-abc123 --file ./eval.yaml
|
|
734
|
+
```
|
|
735
|
+
|
|
736
|
+
#### `doc-proc eval validate`
|
|
737
|
+
|
|
738
|
+
Validate an eval YAML file against the schema without running it.
|
|
739
|
+
|
|
740
|
+
```bash
|
|
741
|
+
nestbox doc-proc eval validate --document <documentId> --file <path> [options]
|
|
742
|
+
```
|
|
743
|
+
|
|
744
|
+
#### `doc-proc eval list`
|
|
745
|
+
|
|
746
|
+
List all evaluations for a document.
|
|
747
|
+
|
|
748
|
+
```bash
|
|
749
|
+
nestbox doc-proc eval list --document <documentId> [options]
|
|
750
|
+
```
|
|
751
|
+
|
|
752
|
+
**Options:**
|
|
753
|
+
- `--document <documentId>` - Document ID (required)
|
|
754
|
+
- `--page <page>` - Page number (default: `1`)
|
|
755
|
+
- `--limit <limit>` - Page size (default: `20`)
|
|
756
|
+
|
|
757
|
+
#### `doc-proc eval show`
|
|
758
|
+
|
|
759
|
+
Get full details of a specific evaluation.
|
|
760
|
+
|
|
761
|
+
```bash
|
|
762
|
+
nestbox doc-proc eval show --document <documentId> --eval <evalId> [options]
|
|
763
|
+
```
|
|
764
|
+
|
|
765
|
+
**Options:**
|
|
766
|
+
- `--document <documentId>` - Document ID (required)
|
|
767
|
+
- `--eval <evalId>` - Evaluation ID (required)
|
|
768
|
+
|
|
769
|
+
---
|
|
770
|
+
|
|
771
|
+
### Batch Queries
|
|
772
|
+
|
|
773
|
+
Batch queries let you run multiple questions against a processed document in one request.
|
|
774
|
+
|
|
775
|
+
#### `doc-proc query init`
|
|
776
|
+
|
|
777
|
+
Scaffold a batch query YAML template.
|
|
778
|
+
|
|
779
|
+
```bash
|
|
780
|
+
nestbox doc-proc query init [options]
|
|
781
|
+
```
|
|
782
|
+
|
|
783
|
+
**Options:**
|
|
784
|
+
- `-o, --output <path>` - Output file path (default: `./query.yaml`)
|
|
785
|
+
- `-f, --force` - Overwrite existing file
|
|
786
|
+
|
|
787
|
+
**Example query.yaml:**
|
|
788
|
+
```yaml
|
|
789
|
+
queries:
|
|
790
|
+
- id: payment_terms
|
|
791
|
+
question: "What are the payment terms?"
|
|
792
|
+
mode: local
|
|
793
|
+
```
|
|
794
|
+
|
|
795
|
+
#### `doc-proc query create`
|
|
796
|
+
|
|
797
|
+
Submit a batch query from a YAML file.
|
|
798
|
+
|
|
799
|
+
```bash
|
|
800
|
+
nestbox doc-proc query create --file <path> [options]
|
|
801
|
+
```
|
|
802
|
+
|
|
803
|
+
**Options:**
|
|
804
|
+
- `-f, --file <path>` - YAML file path (required)
|
|
805
|
+
|
|
806
|
+
#### `doc-proc query validate`
|
|
807
|
+
|
|
808
|
+
Validate a query YAML file without submitting it.
|
|
809
|
+
|
|
810
|
+
```bash
|
|
811
|
+
nestbox doc-proc query validate --file <path> [options]
|
|
812
|
+
```
|
|
813
|
+
|
|
814
|
+
#### `doc-proc query list`
|
|
815
|
+
|
|
816
|
+
List all batch queries.
|
|
817
|
+
|
|
818
|
+
```bash
|
|
819
|
+
nestbox doc-proc query list [options]
|
|
820
|
+
```
|
|
821
|
+
|
|
822
|
+
**Options:**
|
|
823
|
+
- `--page <page>` - Page number (default: `1`)
|
|
824
|
+
- `--limit <limit>` - Page size (default: `20`)
|
|
825
|
+
|
|
826
|
+
#### `doc-proc query show`
|
|
827
|
+
|
|
828
|
+
Get details of a specific batch query.
|
|
829
|
+
|
|
830
|
+
```bash
|
|
831
|
+
nestbox doc-proc query show --query <queryId> [options]
|
|
832
|
+
```
|
|
833
|
+
|
|
834
|
+
**Options:**
|
|
835
|
+
- `--query <queryId>` - Query ID (required)
|
|
836
|
+
|
|
837
|
+
---
|
|
838
|
+
|
|
839
|
+
### Webhooks
|
|
840
|
+
|
|
841
|
+
#### `doc-proc webhook create`
|
|
842
|
+
|
|
843
|
+
Register a webhook to receive processing event notifications.
|
|
844
|
+
|
|
845
|
+
```bash
|
|
846
|
+
nestbox doc-proc webhook create --url <url> [options]
|
|
847
|
+
```
|
|
848
|
+
|
|
849
|
+
**Options:**
|
|
850
|
+
- `--url <url>` - Webhook URL (required)
|
|
851
|
+
- `--secret <secret>` - HMAC signing secret for payload verification
|
|
852
|
+
- `--event <event...>` - One or more event names to subscribe to
|
|
853
|
+
|
|
854
|
+
**Example:**
|
|
855
|
+
```bash
|
|
856
|
+
nestbox doc-proc webhook create --url https://my-app.com/hooks/nestbox --event job.completed job.failed
|
|
857
|
+
```
|
|
858
|
+
|
|
859
|
+
#### `doc-proc webhook list`
|
|
860
|
+
|
|
861
|
+
List all registered webhooks.
|
|
862
|
+
|
|
863
|
+
```bash
|
|
864
|
+
nestbox doc-proc webhook list [options]
|
|
865
|
+
```
|
|
866
|
+
|
|
867
|
+
#### `doc-proc webhook show`
|
|
868
|
+
|
|
869
|
+
Get details of a specific webhook.
|
|
870
|
+
|
|
871
|
+
```bash
|
|
872
|
+
nestbox doc-proc webhook show --webhook <webhookId> [options]
|
|
873
|
+
```
|
|
874
|
+
|
|
875
|
+
#### `doc-proc webhook update`
|
|
876
|
+
|
|
877
|
+
Update a webhook's configuration.
|
|
878
|
+
|
|
879
|
+
```bash
|
|
880
|
+
nestbox doc-proc webhook update --webhook <webhookId> [options]
|
|
881
|
+
```
|
|
882
|
+
|
|
883
|
+
**Options:**
|
|
884
|
+
- `--webhook <webhookId>` - Webhook ID (required)
|
|
885
|
+
- `--url <url>` - New webhook URL
|
|
886
|
+
- `--secret <secret>` - New signing secret
|
|
887
|
+
- `--event <event...>` - New event subscriptions
|
|
888
|
+
- `--active <true|false>` - Enable or disable the webhook
|
|
889
|
+
|
|
890
|
+
#### `doc-proc webhook delete`
|
|
891
|
+
|
|
892
|
+
Delete a webhook.
|
|
893
|
+
|
|
894
|
+
```bash
|
|
895
|
+
nestbox doc-proc webhook delete --webhook <webhookId> [options]
|
|
896
|
+
```
|
|
897
|
+
|
|
898
|
+
**Options:**
|
|
899
|
+
- `--webhook <webhookId>` - Webhook ID (required)
|
|
900
|
+
|
|
901
|
+
---
|
|
902
|
+
|
|
903
|
+
### Health Check
|
|
904
|
+
|
|
905
|
+
#### `doc-proc health`
|
|
906
|
+
|
|
907
|
+
Check the health of the document processing API.
|
|
908
|
+
|
|
909
|
+
```bash
|
|
910
|
+
nestbox doc-proc health [options]
|
|
911
|
+
```
|
|
912
|
+
|
|
913
|
+
---
|
|
914
|
+
|
|
915
|
+
## Generate
|
|
500
916
|
|
|
501
917
|
### `generate`
|
|
502
918
|
|
|
503
|
-
|
|
919
|
+
AI-assisted generation of configuration files and project scaffolds. Uses an AI agent (Anthropic Claude or OpenAI GPT, your choice) to produce validated YAML configurations from plain-English instruction files. The agent writes, validates against the schema, and iterates automatically until the output is valid.
|
|
920
|
+
|
|
921
|
+
---
|
|
504
922
|
|
|
505
|
-
|
|
923
|
+
### `generate project`
|
|
506
924
|
|
|
507
925
|
Generate a new Nestbox project from templates.
|
|
508
926
|
|
|
@@ -514,8 +932,8 @@ nestbox generate project <folder> [options]
|
|
|
514
932
|
- `<folder>` - Name of the folder to create the project in
|
|
515
933
|
|
|
516
934
|
**Options:**
|
|
517
|
-
- `--lang <language>` - Project language (ts
|
|
518
|
-
- `--template <type>` - Template type (agent
|
|
935
|
+
- `--lang <language>` - Project language (`ts`|`js`)
|
|
936
|
+
- `--template <type>` - Template type (`agent`|`chatbot`)
|
|
519
937
|
- `--instanceName <name>` - Name of the compute instance
|
|
520
938
|
- `--project <projectId>` - Project ID
|
|
521
939
|
|
|
@@ -525,7 +943,135 @@ nestbox generate project <folder> [options]
|
|
|
525
943
|
nestbox generate project my-agent --lang ts --template agent
|
|
526
944
|
|
|
527
945
|
# Generate a JavaScript chatbot project
|
|
528
|
-
nestbox generate project my-chatbot --lang js --template chatbot
|
|
946
|
+
nestbox generate project my-chatbot --lang js --template chatbot
|
|
947
|
+
```
|
|
948
|
+
|
|
949
|
+
---
|
|
950
|
+
|
|
951
|
+
### `generate doc-proc`
|
|
952
|
+
|
|
953
|
+
Generate a document processing pipeline configuration (`config.yaml` and `eval.yaml`) from a plain-English instructions file using AI.
|
|
954
|
+
|
|
955
|
+
The agent reads your instructions, writes both files, validates each against their schemas, and iterates automatically until both pass validation. Supports **Anthropic Claude** and **OpenAI GPT** — provide one API key to select the provider.
|
|
956
|
+
|
|
957
|
+
```bash
|
|
958
|
+
nestbox generate doc-proc --file <path> --output <dir> [--anthropicApiKey <key> | --openAiApiKey <key>] [options]
|
|
959
|
+
```
|
|
960
|
+
|
|
961
|
+
**Required options:**
|
|
962
|
+
- `-f, --file <path>` - Path to a Markdown file describing what the pipeline should do
|
|
963
|
+
- `-o, --output <dir>` - Output directory where `config.yaml` and `eval.yaml` will be written
|
|
964
|
+
|
|
965
|
+
**API key (one required):**
|
|
966
|
+
- `--anthropicApiKey <key>` - Use Claude (Anthropic). Also reads `ANTHROPIC_API_KEY` env var
|
|
967
|
+
- `--openAiApiKey <key>` - Use GPT (OpenAI). Also reads `OPENAI_API_KEY` env var
|
|
968
|
+
|
|
969
|
+
When both are provided, Anthropic takes precedence.
|
|
970
|
+
|
|
971
|
+
**Optional options:**
|
|
972
|
+
- `--model <model>` - Model ID. Defaults to `claude-sonnet-4-6` (Anthropic) or `gpt-4o` (OpenAI)
|
|
973
|
+
- `--maxIterations <n>` - Maximum agent iterations before giving up (default: `8`)
|
|
974
|
+
|
|
975
|
+
**Output files:**
|
|
976
|
+
- `config.yaml` — document processing pipeline configuration
|
|
977
|
+
- `eval.yaml` — evaluation test cases for the pipeline
|
|
978
|
+
|
|
979
|
+
**Examples:**
|
|
980
|
+
```bash
|
|
981
|
+
# Anthropic Claude
|
|
982
|
+
nestbox generate doc-proc \
|
|
983
|
+
--file ./instructions.md \
|
|
984
|
+
--output ./pipeline \
|
|
985
|
+
--anthropicApiKey sk-ant-...
|
|
986
|
+
|
|
987
|
+
# OpenAI GPT
|
|
988
|
+
nestbox generate doc-proc \
|
|
989
|
+
--file ./instructions.md \
|
|
990
|
+
--output ./pipeline \
|
|
991
|
+
--openAiApiKey sk-...
|
|
992
|
+
|
|
993
|
+
# Via environment variables
|
|
994
|
+
export ANTHROPIC_API_KEY=sk-ant-...
|
|
995
|
+
nestbox generate doc-proc --file ./instructions.md --output ./pipeline
|
|
996
|
+
```
|
|
997
|
+
|
|
998
|
+
**Example instructions file (`instructions.md`):**
|
|
999
|
+
```markdown
|
|
1000
|
+
# Contract Processing Pipeline
|
|
1001
|
+
|
|
1002
|
+
Process PDF contracts. Extract text with OCR using rapidocr.
|
|
1003
|
+
Chunk with the docling_hybrid strategy, max 1200 tokens, 200 overlap.
|
|
1004
|
+
Enable GraphRAG indexing.
|
|
1005
|
+
|
|
1006
|
+
Eval test cases:
|
|
1007
|
+
- "What are the payment terms?" → expected answer should mention Net 30 or similar
|
|
1008
|
+
- "Who are the parties to this agreement?"
|
|
1009
|
+
```
|
|
1010
|
+
|
|
1011
|
+
---
|
|
1012
|
+
|
|
1013
|
+
### `generate report-composer`
|
|
1014
|
+
|
|
1015
|
+
Generate a GraphRAG report composer configuration (`report.yaml`) from a plain-English instructions file using AI.
|
|
1016
|
+
|
|
1017
|
+
The agent reads your instructions, writes the report configuration, validates it against the schema (v2.2), and iterates automatically until it passes — it will not finish until the file is valid. Supports **Anthropic Claude** and **OpenAI GPT** — provide one API key to select the provider.
|
|
1018
|
+
|
|
1019
|
+
```bash
|
|
1020
|
+
nestbox generate report-composer --file <path> --output <dir> [--anthropicApiKey <key> | --openAiApiKey <key>] [options]
|
|
1021
|
+
```
|
|
1022
|
+
|
|
1023
|
+
**Required options:**
|
|
1024
|
+
- `-f, --file <path>` - Path to a Markdown file describing the report to generate
|
|
1025
|
+
- `-o, --output <dir>` - Output directory where `report.yaml` will be written
|
|
1026
|
+
|
|
1027
|
+
**API key (one required):**
|
|
1028
|
+
- `--anthropicApiKey <key>` - Use Claude (Anthropic). Also reads `ANTHROPIC_API_KEY` env var
|
|
1029
|
+
- `--openAiApiKey <key>` - Use GPT (OpenAI). Also reads `OPENAI_API_KEY` env var
|
|
1030
|
+
|
|
1031
|
+
When both are provided, Anthropic takes precedence.
|
|
1032
|
+
|
|
1033
|
+
**Optional options:**
|
|
1034
|
+
- `--model <model>` - Model ID. Defaults to `claude-sonnet-4-6` (Anthropic) or `gpt-4o` (OpenAI)
|
|
1035
|
+
- `--maxIterations <n>` - Maximum agent iterations before giving up (default: `5`)
|
|
1036
|
+
|
|
1037
|
+
**Output files:**
|
|
1038
|
+
- `report.yaml` — report composer configuration (schema version 2.2)
|
|
1039
|
+
|
|
1040
|
+
**Examples:**
|
|
1041
|
+
```bash
|
|
1042
|
+
# Anthropic Claude
|
|
1043
|
+
nestbox generate report-composer \
|
|
1044
|
+
--file ./report-instructions.md \
|
|
1045
|
+
--output ~/Downloads/my-report \
|
|
1046
|
+
--anthropicApiKey sk-ant-...
|
|
1047
|
+
|
|
1048
|
+
# OpenAI GPT
|
|
1049
|
+
nestbox generate report-composer \
|
|
1050
|
+
--file ./report-instructions.md \
|
|
1051
|
+
--output ~/Downloads/my-report \
|
|
1052
|
+
--openAiApiKey sk-...
|
|
1053
|
+
|
|
1054
|
+
# Via environment variable
|
|
1055
|
+
export OPENAI_API_KEY=sk-...
|
|
1056
|
+
nestbox generate report-composer --file ./report-instructions.md --output ~/Downloads/my-report
|
|
1057
|
+
```
|
|
1058
|
+
|
|
1059
|
+
**Example instructions file (`report-instructions.md`):**
|
|
1060
|
+
```markdown
|
|
1061
|
+
# Quarterly Board Report
|
|
1062
|
+
|
|
1063
|
+
Analyze the board deck PDF for Q4 2025.
|
|
1064
|
+
|
|
1065
|
+
Extract:
|
|
1066
|
+
- Total ARR and net retention rate
|
|
1067
|
+
- Net new ARR broken down by new business vs expansion
|
|
1068
|
+
- Top 3 customer deals closed in the quarter
|
|
1069
|
+
- Key risks and mitigation plans
|
|
1070
|
+
|
|
1071
|
+
The document is stored at repo:doc-abc123. Use ${OPENAI_API_KEY} for GraphRAG search
|
|
1072
|
+
and ${LLAMAINDEX_API_KEY} for the LlamaIndex agent.
|
|
1073
|
+
|
|
1074
|
+
Include two guardrails: one to check all numbers have citations, one to detect fabricated data.
|
|
529
1075
|
```
|
|
530
1076
|
|
|
531
1077
|
---
|
|
@@ -547,4 +1093,3 @@ The CLI includes automatic token refresh functionality. If your authentication t
|
|
|
547
1093
|
For more information and detailed guides, visit the [Nestbox AI developers site](https://developers.nestbox.ai).
|
|
548
1094
|
|
|
549
1095
|
For issues and bug reports, please visit the [GitHub repository](https://github.com/NestboxAI/nestbox-ai-cli-tools).
|
|
550
|
-
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export interface DocProcAgentOptions {
|
|
2
|
+
/** Full instruction text (from the instructions file) */
|
|
3
|
+
instructions: string;
|
|
4
|
+
/** Anthropic API key */
|
|
5
|
+
anthropicApiKey: string;
|
|
6
|
+
/** Claude model ID, e.g. "claude-sonnet-4-6" */
|
|
7
|
+
model?: string;
|
|
8
|
+
/** Maximum agentic iterations before giving up */
|
|
9
|
+
maxIterations?: number;
|
|
10
|
+
/** Called on each status update (for spinner / logging) */
|
|
11
|
+
onProgress?: (message: string) => void;
|
|
12
|
+
}
|
|
13
|
+
export interface DocProcAgentResult {
|
|
14
|
+
configYaml: string;
|
|
15
|
+
evalYaml: string;
|
|
16
|
+
iterations: number;
|
|
17
|
+
configValid: boolean;
|
|
18
|
+
evalValid: boolean;
|
|
19
|
+
}
|
|
20
|
+
export declare const DEFAULT_MODEL = "claude-sonnet-4-6";
|
|
21
|
+
export declare function runDocProcAgent(options: DocProcAgentOptions): Promise<DocProcAgentResult>;
|