Skip to content

Latest commit

 

History

History
84 lines (62 loc) · 3.61 KB

File metadata and controls

84 lines (62 loc) · 3.61 KB

java - disinformation network mapping

This demo scans a synthetic social graph for coordinated inauthentic behavior. The parent agent partitions the graph, delegates partition scans, merges candidate clusters, and streams a final report with GraphML/JSON artifacts.

Showcases: Spring Boot + Reactor orchestration, partition-parallel delegation, JGraphT-style graph ops, Spark-friendly compute budgets, and clean progress over partition count.

Quickstart

cp .env.example .env
make up

Generate and scan the bundled synthetic graph once the client is wired:

make sample
make scan

The default sample plants three coordination clusters, so the report has something real to find instead of waving at an empty graph. Handy, right?

Configure

Variable Default Effect
ARCP_AGENT_NAME disinfo.scan Parent agent that owns the full graph scan.
ARCP_CHILD_AGENT_NAME disinfo.scan_partition Child agent for one partition.
GRAPH_DIR /data/graphs Read-only graph input volume in the containers.
REPORTS_DIR /data/reports Report and artifact output volume.
DEFAULT_GRAPH_ID synth-coord-001 Bundled sample graph id.
DEFAULT_PARTITIONS 16 Partitions delegated by the parent.
DEFAULT_PARALLELISM 4 Max child jobs scanned at once.
SIGNALS cadence,bio_similarity,coposting Enabled signal passes.
SCAN_BUDGET_USD 5.00 Parent model spend ceiling.
SCAN_BUDGET_SPARK_MS 600000 Parent Spark executor-ms ceiling.
PARTITION_BUDGET_USD 0.50 Per-partition model spend ceiling.
PARTITION_BUDGET_SPARK_MS 30000 Per-partition executor-ms ceiling.
SPARK_DRIVER_MEMORY 2g Driver memory for the Spark sidecar.
SPARK_EXECUTOR_MEMORY 2g Executor memory for worker tasks.
SPARK_WORKER_COUNT 2 Local worker count for the demo cluster.
OLLAMA_MODEL qwen2.5:1.5b-instruct Local model used for synthesis.
ARCP_SDK_VERSION latest Maven dependency version.

How it is wired

The parent agent does four things:

  • Loads a graph manifest from GRAPH_DIR.
  • Calls graph.partition, then delegates disinfo.scan_partition child jobs.
  • Merges cross-partition clusters in Java instead of asking the model to fake graph math.
  • Uses the model at the end for a concise synthesis, then emits artifact_ref events.

The tool set is intentionally boring in the best way:

  • graph.partition
  • signal.cadence
  • signal.bio_similarity
  • signal.coposting
  • cluster.detect
  • spark.execute

The mechanical signals find candidates. The model explains the strongest ones.

Budget story

This example cares about more than tokens. The parent lease uses cost.budget: ["USD:5.00", "spark_executor_ms:600000"], while child leases get smaller USD and executor-ms caps. If Spark work runs long, ARCP stops it with the same budget semantics it uses for money. Nice and boring, which is exactly what you want in shared compute.

Where to add code

  • src/main/java/com/example/arcp/agents/DisinfoScan.java - parent agent.
  • src/main/java/com/example/arcp/agents/DisinfoScanPartition.java - child agent.
  • src/main/java/com/example/arcp/tools/*.java - graph, signal, cluster, and Spark tools.
  • src/main/java/com/example/arcp/client/Cli.java - Spring Shell CLI.
  • samples/networks/generate.java - synthetic graph generator.
  • samples/networks/synth-coord-001/ - bundled graph manifest and ground truth.

src/ is still a build-safe scaffold for now, so make verify stays focused on dependency resolution.

Verify install only

make verify