axel-protocol 2.3.2__tar.gz → 2.3.3__tar.gz

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 (38) hide show
  1. {axel_protocol-2.3.2 → axel_protocol-2.3.3}/PKG-INFO +1 -1
  2. {axel_protocol-2.3.2 → axel_protocol-2.3.3}/axel/cli.py +91 -37
  3. {axel_protocol-2.3.2 → axel_protocol-2.3.3}/axel/static/monitor.html +4 -1
  4. {axel_protocol-2.3.2 → axel_protocol-2.3.3}/pyproject.toml +1 -1
  5. {axel_protocol-2.3.2 → axel_protocol-2.3.3}/.github/workflows/ci.yml +0 -0
  6. {axel_protocol-2.3.2 → axel_protocol-2.3.3}/.github/workflows/publish.yml +0 -0
  7. {axel_protocol-2.3.2 → axel_protocol-2.3.3}/.gitignore +0 -0
  8. {axel_protocol-2.3.2 → axel_protocol-2.3.3}/CHANGELOG.md +0 -0
  9. {axel_protocol-2.3.2 → axel_protocol-2.3.3}/CONTRIBUTING.md +0 -0
  10. {axel_protocol-2.3.2 → axel_protocol-2.3.3}/Dockerfile +0 -0
  11. {axel_protocol-2.3.2 → axel_protocol-2.3.3}/LICENSE +0 -0
  12. {axel_protocol-2.3.2 → axel_protocol-2.3.3}/README.md +0 -0
  13. {axel_protocol-2.3.2 → axel_protocol-2.3.3}/axel/__init__.py +0 -0
  14. {axel_protocol-2.3.2 → axel_protocol-2.3.3}/axel/adapters/__init__.py +0 -0
  15. {axel_protocol-2.3.2 → axel_protocol-2.3.3}/axel/adapters/bedrock.py +0 -0
  16. {axel_protocol-2.3.2 → axel_protocol-2.3.3}/axel/adapters/cohere.py +0 -0
  17. {axel_protocol-2.3.2 → axel_protocol-2.3.3}/axel/adapters/gemini.py +0 -0
  18. {axel_protocol-2.3.2 → axel_protocol-2.3.3}/axel/adapters/groq.py +0 -0
  19. {axel_protocol-2.3.2 → axel_protocol-2.3.3}/axel/adapters/litellm.py +0 -0
  20. {axel_protocol-2.3.2 → axel_protocol-2.3.3}/axel/adapters/mistral.py +0 -0
  21. {axel_protocol-2.3.2 → axel_protocol-2.3.3}/axel/adapters/together.py +0 -0
  22. {axel_protocol-2.3.2 → axel_protocol-2.3.3}/axel/client.py +0 -0
  23. {axel_protocol-2.3.2 → axel_protocol-2.3.3}/axel/core.py +0 -0
  24. {axel_protocol-2.3.2 → axel_protocol-2.3.3}/axel/learning.py +0 -0
  25. {axel_protocol-2.3.2 → axel_protocol-2.3.3}/axel/persistence.py +0 -0
  26. {axel_protocol-2.3.2 → axel_protocol-2.3.3}/axel/server.py +0 -0
  27. {axel_protocol-2.3.2 → axel_protocol-2.3.3}/axel/testing.py +0 -0
  28. {axel_protocol-2.3.2 → axel_protocol-2.3.3}/axel/universal.py +0 -0
  29. {axel_protocol-2.3.2 → axel_protocol-2.3.3}/docker-compose.yml +0 -0
  30. {axel_protocol-2.3.2 → axel_protocol-2.3.3}/docs/message-schemas.md +0 -0
  31. {axel_protocol-2.3.2 → axel_protocol-2.3.3}/examples/demo_live.py +0 -0
  32. {axel_protocol-2.3.2 → axel_protocol-2.3.3}/install.sh +0 -0
  33. {axel_protocol-2.3.2 → axel_protocol-2.3.3}/tests/__init__.py +0 -0
  34. {axel_protocol-2.3.2 → axel_protocol-2.3.3}/tests/test_adapters.py +0 -0
  35. {axel_protocol-2.3.2 → axel_protocol-2.3.3}/tests/test_client.py +0 -0
  36. {axel_protocol-2.3.2 → axel_protocol-2.3.3}/tests/test_core.py +0 -0
  37. {axel_protocol-2.3.2 → axel_protocol-2.3.3}/tests/test_new_features.py +0 -0
  38. {axel_protocol-2.3.2 → axel_protocol-2.3.3}/tests/test_server.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: axel-protocol
3
- Version: 2.3.2
3
+ Version: 2.3.3
4
4
  Summary: AXEL — Agent eXchange Language: a universal protocol for multi-LLM networks
5
5
  Project-URL: Homepage, https://github.com/sectorx/axel-protocol
6
6
  Project-URL: Repository, https://github.com/sectorx/axel-protocol
@@ -486,11 +486,14 @@ _FREE_MODELS = [
486
486
  # Each agent gets a model that suits its role — the whole point of AXEL.
487
487
  # These are paid OpenRouter models (need credits); unlock with --multi-model.
488
488
  _SPECIALIST_MODELS = {
489
- "planner": "anthropic/claude-3-5-haiku", # fast, great at structured breakdown
490
- "researcher": "openai/gpt-4o-mini", # strong retrieval + summarisation
491
- "analyst": "google/gemini-flash-1.5", # quick pattern synthesis
492
- "writer": "anthropic/claude-3-5-sonnet", # best prose quality
493
- "reviewer": "openai/gpt-4o", # sharpest critic
489
+ "planner": "anthropic/claude-3-5-haiku", # fast, great at structured breakdown
490
+ "researcher": "openai/gpt-4o-mini", # strong retrieval + summarisation
491
+ "analyst": "google/gemini-flash-1.5", # quick pattern synthesis
492
+ "fact-checker": "mistralai/mistral-large", # rigorous verification
493
+ "writer": "anthropic/claude-3-5-sonnet", # best prose quality
494
+ "devil-advocate": "meta-llama/llama-3.3-70b-instruct", # challenges assumptions
495
+ "summarizer": "qwen/qwen-2.5-72b-instruct", # distills to essence
496
+ "reviewer": "openai/gpt-4o", # sharpest final critic
494
497
  }
495
498
 
496
499
 
@@ -549,7 +552,6 @@ _MOCK_RESPONSES = {
549
552
  "research": (
550
553
  "Subtask 1 — Specialisation:\n"
551
554
  "• Each agent can be fine-tuned or prompted for a narrow domain, reducing error rate\n"
552
- "• A single model context window limits depth; distributed agents share the load\n"
553
555
  "• Role-specific agents outperform generalists on benchmark tasks by 18-34%\n\n"
554
556
  "Subtask 2 — Parallelism:\n"
555
557
  "• Independent subtasks run concurrently, cutting wall-clock time significantly\n"
@@ -559,24 +561,34 @@ _MOCK_RESPONSES = {
559
561
  "• Agents avoid re-computing knowledge already stored by teammates"
560
562
  ),
561
563
  "analyze": (
562
- "Key Insight 1: Specialisation beats generalisation — focused agents produce higher-quality "
563
- "outputs on domain tasks than any single model asked to do everything.\n"
564
- "Key Insight 2: Parallelism is a force multipliermulti-agent systems complete complex "
565
- "workflows 3-5x faster by eliminating sequential bottlenecks.\n"
566
- "Key Insight 3: Shared memory creates compounding returns — each run makes the network "
567
- "smarter, unlike stateless single-model calls that start from zero every time."
564
+ "Key Insight 1: Specialisation beats generalisation — focused agents produce higher-quality outputs.\n"
565
+ "Key Insight 2: Parallelism is a force multiplier multi-agent systems complete complex workflows 3-5x faster.\n"
566
+ "Key Insight 3: Shared memory creates compounding returnseach run makes the network smarter."
567
+ ),
568
+ "fact_check": (
569
+ " Specialised agents outperform generalists on domain tasks supported by benchmark literature\n"
570
+ "✓ Parallel execution reduces wall-clock time — well established in distributed systems research\n"
571
+ "⚠ '3-5x faster' claim — specific multiplier is unverified; real gains vary by task topology"
568
572
  ),
569
573
  "draft_content": (
570
574
  "Multi-agent AI systems don't just divide work — they multiply intelligence. "
571
575
  "By combining specialised models, parallel execution, and shared memory, "
572
576
  "agent networks solve problems that would overwhelm any single model."
573
577
  ),
578
+ "challenge": (
579
+ "Counterargument 1: Coordination overhead can negate speed gains — orchestrating 8 agents "
580
+ "introduces latency and failure points that a single well-prompted model avoids.\n"
581
+ "Counterargument 2: Shared memory creates echo chambers — agents that learn from each other "
582
+ "may reinforce early errors rather than converge on truth."
583
+ ),
584
+ "summarize": (
585
+ "Multi-agent systems outperform single models when task complexity justifies coordination cost, "
586
+ "but only if shared memory is designed to surface disagreement, not just consensus."
587
+ ),
574
588
  "review": (
575
589
  "Score: 9/10\n"
576
- "Strength: The three-part structure mirrors the three insights perfectly — "
577
- "readers absorb the argument without needing background knowledge.\n"
578
- "Improvement: Add a concrete example (e.g. 'a research pipeline that cut analysis "
579
- "time from 4 hours to 12 minutes') to ground the claim in reality."
590
+ "Strength: The pipeline surfaces and resolves its own counterargumentsrare and valuable.\n"
591
+ "Improvement: Add a concrete example to ground the coordination-overhead tradeoff in reality."
580
592
  ),
581
593
  }
582
594
 
@@ -631,11 +643,14 @@ def cmd_demo(args): # noqa: C901
631
643
 
632
644
  # ── Register all 5 agents ─────────────────────────────────────
633
645
  AGENTS = [
634
- ("planner", ["plan", "breakdown"], "🗺️"),
635
- ("researcher", ["research", "summarize"], "🔍"),
636
- ("analyst", ["analyze", "synthesize"], "📊"),
637
- ("writer", ["write", "draft_content"], "✍️"),
638
- ("reviewer", ["review", "critique", "score"], "🔬"),
646
+ ("planner", ["plan", "breakdown"], "🗺️"),
647
+ ("researcher", ["research", "summarize"], "🔍"),
648
+ ("analyst", ["analyze", "synthesize"], "📊"),
649
+ ("fact-checker", ["fact_check", "verify", "audit"], ""),
650
+ ("writer", ["write", "draft_content"], "✍️"),
651
+ ("devil-advocate", ["challenge", "critique", "debate"], "😈"),
652
+ ("summarizer", ["summarize", "distill", "tldr"], "🗜️"),
653
+ ("reviewer", ["review", "score", "final"], "🔬"),
639
654
  ]
640
655
  def _agent_model(aid: str) -> str:
641
656
  if multi_model:
@@ -722,7 +737,7 @@ def cmd_demo(args): # noqa: C901
722
737
  mdl = _agent_model(to)
723
738
  mdl_short = mdl.split("/")[-1].replace(":free", "") if mdl != "auto/free" else "free"
724
739
  print(f"\n {fr} → {to} [{action}] ({mdl_short})")
725
- _fire_progress(server, run_count, step_counter[0], 5, to, action)
740
+ _fire_progress(server, run_count, step_counter[0], 8, to, action)
726
741
  _fire_task(server, fr, to, action, {"prompt": prompt[:200]})
727
742
  if mock:
728
743
  time.sleep(0.8)
@@ -779,11 +794,13 @@ def cmd_demo(args): # noqa: C901
779
794
  print(f"\n 📋 Run #{run_count} Mission: \"{topic}\"")
780
795
  print(" ─────────────────────────────────────────────────")
781
796
 
797
+ TOTAL = 8
798
+
782
799
  # ── Step 1: planner ───────────────────────────────────
783
- print("\n STEP 1/5 Planner breaks the mission into subtasks")
800
+ print(f"\n STEP 1/{TOTAL} Planner breaks the mission into subtasks")
784
801
  plan = step(
785
802
  "user", "planner", "plan",
786
- f"Break this mission into exactly 3 short subtasks (numbered list, one line each): {topic}",
803
+ f"Break this mission into exactly 3 focused subtasks (numbered list, one line each): {topic}",
787
804
  learn_key="task-planning",
788
805
  learn_insight="Breaking missions into 3 focused subtasks improves agent handoff quality",
789
806
  mem_ctx=mem_ctx,
@@ -791,7 +808,7 @@ def cmd_demo(args): # noqa: C901
791
808
  if not plan: break
792
809
 
793
810
  # ── Step 2: researcher ────────────────────────────────
794
- print("\n STEP 2/5 Researcher investigates each subtask")
811
+ print(f"\n STEP 2/{TOTAL} Researcher investigates each subtask")
795
812
  research = step(
796
813
  "planner", "researcher", "research",
797
814
  f"Research these subtasks and give 2-3 bullet points of findings for each:\n{plan}",
@@ -802,32 +819,69 @@ def cmd_demo(args): # noqa: C901
802
819
  if not research: break
803
820
 
804
821
  # ── Step 3: analyst ───────────────────────────────────
805
- print("\n STEP 3/5 Analyst synthesises the findings")
822
+ print(f"\n STEP 3/{TOTAL} Analyst synthesises the findings")
806
823
  analysis = step(
807
824
  "researcher", "analyst", "analyze",
808
- f"Synthesise these research findings into 3 key insights (be sharp and specific):\n{research}",
825
+ f"Synthesise these research findings into 3 sharp key insights:\n{research}",
809
826
  learn_key="synthesis",
810
827
  learn_insight="Distilling findings to 3 insights makes downstream writing stronger",
811
828
  mem_ctx=mem_ctx,
812
829
  )
813
830
  if not analysis: break
814
831
 
815
- # ── Step 4: writer ────────────────────────────────────
816
- print("\n STEP 4/5 Writer drafts from the insights")
832
+ # ── Step 4: fact-checker ──────────────────────────────
833
+ print(f"\n STEP 4/{TOTAL} Fact-Checker verifies the analysis")
834
+ fact_check = step(
835
+ "analyst", "fact-checker", "fact_check",
836
+ f"Fact-check these insights. Flag any claims that are vague, unverifiable, or likely wrong. "
837
+ f"Return: verified claims ✓ and flagged claims ⚠ with a one-line reason:\n{analysis}",
838
+ learn_key="fact-checking",
839
+ learn_insight="Flagging unverifiable claims before writing prevents misinformation in output",
840
+ mem_ctx=mem_ctx,
841
+ )
842
+ if not fact_check: break
843
+
844
+ # ── Step 5: writer ────────────────────────────────────
845
+ print(f"\n STEP 5/{TOTAL} Writer drafts from verified insights")
817
846
  draft = step(
818
- "analyst", "writer", "draft_content",
819
- f"Write a compelling 3-sentence summary for a general audience based on:\n{analysis}",
847
+ "fact-checker", "writer", "draft_content",
848
+ f"Write a compelling 3-sentence summary for a general audience. Use only the verified insights:\n{fact_check}",
820
849
  learn_key="writing-style",
821
- learn_insight="3-sentence summaries from structured insights land well with non-technical readers",
850
+ learn_insight="3-sentence summaries from verified insights land well with non-technical readers",
822
851
  mem_ctx=mem_ctx,
823
852
  )
824
853
  if not draft: break
825
854
 
826
- # ── Step 5: reviewer ──────────────────────────────────
827
- print("\n STEP 5/5 Reviewer critiques and scores")
855
+ # ── Step 6: devil's advocate ──────────────────────────
856
+ print(f"\n STEP 6/{TOTAL} Devil's Advocate challenges the draft")
857
+ challenge = step(
858
+ "writer", "devil-advocate", "challenge",
859
+ f"Play devil's advocate. Give 2 strong counterarguments or weaknesses in this draft. "
860
+ f"Be specific and intellectually honest:\n{draft}",
861
+ learn_key="critical-thinking",
862
+ learn_insight="Surfacing counterarguments before final review strengthens the output quality",
863
+ mem_ctx=mem_ctx,
864
+ )
865
+ if not challenge: break
866
+
867
+ # ── Step 7: summarizer ────────────────────────────────
868
+ print(f"\n STEP 7/{TOTAL} Summarizer distils everything to essence")
869
+ summary = step(
870
+ "devil-advocate", "summarizer", "summarize",
871
+ f"Given the draft and its counterarguments, write the single best 1-sentence TL;DR "
872
+ f"that captures the core truth:\nDraft: {draft}\nChallenges: {challenge}",
873
+ learn_key="distillation",
874
+ learn_insight="A single-sentence TL;DR that survives counterarguments is the most durable insight",
875
+ mem_ctx=mem_ctx,
876
+ )
877
+ if not summary: break
878
+
879
+ # ── Step 8: reviewer ──────────────────────────────────
880
+ print(f"\n STEP 8/{TOTAL} Reviewer gives final score")
828
881
  review = step(
829
- "writer", "reviewer", "review",
830
- f"Review this draft. Give: (1) a score /10, (2) one strength, (3) one improvement:\n{draft}",
882
+ "summarizer", "reviewer", "review",
883
+ f"Final review of the full pipeline output. Score /10. One strength, one improvement.\n"
884
+ f"Draft: {draft}\nTL;DR: {summary}",
831
885
  learn_key="review-criteria",
832
886
  learn_insight="Score + strength + improvement is the most actionable review format",
833
887
  mem_ctx=mem_ctx,
@@ -835,7 +889,7 @@ def cmd_demo(args): # noqa: C901
835
889
  if not review: break
836
890
 
837
891
  print("\n ─────────────────────────────────────────────────")
838
- print(f" ✅ Run #{run_count} complete! ({5} tasks · {5} lessons written)")
892
+ print(f" ✅ Run #{run_count} complete! ({TOTAL} tasks · {TOTAL} lessons written)")
839
893
  if not loop:
840
894
  print(" Tip: run axel demo --mock --loop to keep agents running continuously\n")
841
895
  break
@@ -373,6 +373,9 @@ header {
373
373
  <div class="prog-dot" id="pd3"></div>
374
374
  <div class="prog-dot" id="pd4"></div>
375
375
  <div class="prog-dot" id="pd5"></div>
376
+ <div class="prog-dot" id="pd6"></div>
377
+ <div class="prog-dot" id="pd7"></div>
378
+ <div class="prog-dot" id="pd8"></div>
376
379
  </div>
377
380
  <div class="prog-track"><div class="prog-fill" id="progFill" style="width:0%"></div></div>
378
381
  <div class="prog-agent" id="progAgent"></div>
@@ -949,7 +952,7 @@ function updateProgress(run, step, total, agent, action) {
949
952
  document.getElementById('progFill').style.width = `${((step-1)/total)*100}%`;
950
953
  document.getElementById('progAgent').textContent = agent + '…';
951
954
  document.getElementById('progAction').textContent = action;
952
- for (let i=1; i<=5; i++) {
955
+ for (let i=1; i<=8; i++) {
953
956
  const dot = document.getElementById(`pd${i}`);
954
957
  if (dot) dot.className = 'prog-dot' + (i<step?' done':i===step?' active':'');
955
958
  }
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
4
4
 
5
5
  [project]
6
6
  name = "axel-protocol"
7
- version = "2.3.2"
7
+ version = "2.3.3"
8
8
  description = "AXEL — Agent eXchange Language: a universal protocol for multi-LLM networks"
9
9
  readme = "README.md"
10
10
  license = { file = "LICENSE" }
File without changes
File without changes
File without changes
File without changes
File without changes