graphjin 3.20.72 → 3.20.73

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.
Files changed (2) hide show
  1. package/README.md +34 -89
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -50,6 +50,23 @@ Download .deb/.rpm from [releases](https://github.com/dosco/graphjin/releases)
50
50
  docker pull dosco/graphjin
51
51
  ```
52
52
 
53
+ **Docker — as an agent environment**
54
+
55
+ The same binary also ships as a graded environment for training and evaluating
56
+ agents. It boots ready with nothing mounted: the demo world and a 113-task
57
+ verified suite are built in.
58
+
59
+ ```bash
60
+ docker run -d -p 8090:8090 --tmpfs /tmp:size=1g dosco/graphjin:env-latest
61
+ ```
62
+
63
+ `/health` says what it is — build, suite fingerprint, dataset fingerprint,
64
+ reward contract, and whether the suite matches the world it is served on.
65
+ `/tmp` must be writable: each world provisions its own database there.
66
+
67
+ See [the environment docs](https://graphjin.com/environment/quickstart/) for
68
+ the full story.
69
+
53
70
  ## Try It Now
54
71
 
55
72
  One command, no clone, no Docker. The binary ships with a built-in demo — a
@@ -651,109 +668,35 @@ under [MCP Tools](#mcp-tools); the full model is in
651
668
 
652
669
  ## Train And Measure Agents On Your Own Graph
653
670
 
654
- The same machinery that grades GraphJin's public benchmark can grade agents on
655
- *your* data, and serve as a reinforcement-learning environment for tuning small
671
+ The same machinery that grades GraphJin's public benchmark grades agents on
672
+ *your* data, and runs as a reinforcement-learning environment for tuning small
656
673
  models on it.
657
674
 
658
675
  ```bash
659
676
  # Generate a verified task suite from your catalog, with a train/eval split
660
- graphjin eval create --demo --writable --scale 500 --composition coverage \
661
- --verify-concurrency 8 --split 0.8
677
+ graphjin eval create --demo --writable --scale 500 --composition coverage --split 0.8
662
678
 
663
679
  # Serve it: pooled isolated worlds, one graded episode per request
664
680
  graphjin env serve --path ./graphjin-demo --suite eval/suite.yml --pool 4 \
665
681
  --split eval/suite.split.json --side train --freeze-time 2026-08-01T12:00:00Z
666
682
  ```
667
683
 
668
- - **Tasks come from your schema.** Each carries a hidden oracle a read-only
669
- query that computes the answer in the database so being plausible earns
670
- nothing. Writes are graded by the state the database ended in *and* by every
671
- other row staying put.
684
+ - **Tasks come from your schema, and the reward comes from the database.** Each
685
+ task carries a hidden oracle a read-only query that computes the answer —
686
+ so being plausible earns nothing. Writes are graded by the state the database
687
+ ended in *and* by every other row staying put.
672
688
  - **Worlds are isolated and resettable.** An episode leases one, so a task that
673
689
  writes changes only the world it was given.
674
- - **Your policy plugs in by configuration**, not code: point `agent.base_url` at
675
- any OpenAI-compatible endpoint.
676
- - **Your real schema, without your real data.** `graphjin env clone --url
677
- <server>` learns a running GraphJin server's schema from its catalog and
678
- writes a local SQLite copy filled with synthetic rows. No data is read: the
679
- only real values that cross over are the closed sets the catalog already
680
- publishes. The clone is writable and resettable, so write tasks and training
681
- work against it while production is never touched.
682
- - **Nothing memorable to overfit.** `graphjin env new-world` writes a fresh
683
- organization — schema, data and all — deterministically from a seed, so you
684
- can train on some companies and measure on others. Worlds can be asked for the
685
- awkwardness real schemas have: one word meaning two things, a stale column
686
- that still looks authoritative, fields that are usually null.
687
- - **Any industry, not three.** `graphjin env new-world --describe "genome
688
- sequencing lab"` asks a capable model to name the records that business would
689
- actually keep, checks every name, and saves the description as
690
- `world-pack.json` inside the world. From then on the world is rebuilt from
691
- that file with `--pack`: deterministic, and with no model involved.
692
- - **A big model writes the questions a schema cannot derive.** Counting and
693
- filtering follow from column statistics; knowing that *failed invoices are
694
- worth alerting on* does not. `graphjin eval author` asks a capable model —
695
- configured separately from the small one being trained, via `GJ_GENERATOR_*` —
696
- to choose what is worth watching and phrase it as a colleague would. Every
697
- table, column and value it names must exist, and every task it produces is
698
- verified against the live database before it counts.
699
- - **Questions no single source answers.** Real answers are often half in the
700
- database and half in something somebody wrote down. Clones carry over the
701
- document sources the original served — the names only, never a file — and
702
- authoring plants the standard it grades against in a document of its own, so
703
- the ground truth is true by construction rather than assumed.
704
- - **Runs export as training data.** `graphjin eval export` writes trajectories
705
- as JSONL, marking the programs GraphJin's runtime wrote itself so they are not
706
- mistaken for the policy's.
707
- - **Collecting is not measuring.** `graphjin eval sample --repeats 8
708
- --temperature 0.8` draws many attempts at each task instead of judging one.
709
- It reaches no verdict and promotes nothing, because a temperature raised on
710
- purpose loses against a greedy baseline every time — and it records which side
711
- of the split it drew from, so `eval export` can refuse to build a training
712
- corpus out of held-out work.
713
-
714
- ```bash
715
- # Learn a real server's schema; write a local synthetic copy
716
- graphjin env clone --url https://graphjin.internal --out ./clone-acme
717
-
718
- # Have a capable model author the richer families for it
719
- export GJ_GENERATOR_MODEL=<a-strong-model>
720
- graphjin eval author --demo --path ./clone-acme --kinds watch,confirmation,file --yes
721
- ```
722
-
723
- ### Driving Episodes Your Own Way
724
-
725
- Three ways in, all grading through the same contract, so a number from one is a
726
- number from any:
727
-
728
- - **Let GraphJin call your endpoint** — the default. Point `agent.base_url` at
729
- anything OpenAI-compatible.
730
- - **Supply each completion yourself** — `env serve --step`. The episode runs
731
- normally, but when the model is needed the call is parked and handed to you as
732
- an observation; you post the completion back and it resumes. Useful when the
733
- weights being updated live inside your training process and standing up an
734
- inference server just to be called back is machinery you do not want.
735
- - **Bring your own agent entirely** — `env serve --external`. You get the task,
736
- an MCP endpoint and a deadline, do the work with your own scaffold, and post
737
- an answer. The server records every tool call, so the method and behavior
738
- rules apply exactly as they do to a hosted run — an answer with no work behind
739
- it scores zero.
740
-
741
- An agent run is several model calls with different jobs, and they need not all
742
- be the policy's. `--support-model` (or `GJ_SUPPORT_MODEL`) puts a fixed capable
743
- model in front of the distiller and responder stages while the policy answers
744
- the executor, so a small model is measured on the work being trained rather than
745
- through bottlenecks it did not create. The stages that write the final answer
746
- stay with the policy: letting a stronger model write those would score its care
747
- as the policy's grounding.
690
+ - **Your real schema, without your real data.** `graphjin env clone` learns a
691
+ running server's schema from its catalog and writes a local synthetic copy.
692
+ No rows are read; the only real values that cross over are the closed sets
693
+ the catalog already publishes.
748
694
 
749
- ```bash
750
- # Train only the executor; a fixed model condenses and phrases
751
- graphjin env serve --path ./clone-acme --suite eval/suite.yml --pool 4 \
752
- --step --support-model <a-fast-model>
753
- ```
695
+ Three ways to drive an episode — GraphJin calls your endpoint, you supply each
696
+ completion, or you bring the whole agent over MCP all grading through the same
697
+ contract.
754
698
 
755
- See [training/README.md](training/README.md) for the client, an example policy
756
- server, and what to record alongside a result.
699
+ **→ [The GraphJin Agent Environment](https://graphjin.com/environment/)**
757
700
 
758
701
  ## JS Workflows (GraphQL + REST)
759
702
 
@@ -982,6 +925,8 @@ Built-in web UI at `http://localhost:8080` for query development.
982
925
 
983
926
  - [Configuration Reference](CONFIG.md)
984
927
  - [Feature Reference](FEATURES.md)
928
+ - [Agent Environment](https://graphjin.com/environment/) — train and measure agents
929
+ - [Agent Evaluation](https://graphjin.com/agentic/evaluation/) — gate a release
985
930
  - [Go Examples](https://pkg.go.dev/github.com/dosco/graphjin/core#pkg-examples)
986
931
 
987
932
  ## Get in Touch
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "graphjin",
3
- "version": "3.20.72",
3
+ "version": "3.20.73",
4
4
  "description": "GraphJin — one governed graph for AI agents: GraphQL + MCP over your databases, files, APIs, and code",
5
5
  "bin": {
6
6
  "graphjin": "bin/graphjin.js"