clio-agent 0.5.0__py3-none-any.whl

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 (64) hide show
  1. clio_agent/__init__.py +59 -0
  2. clio_agent/agent.py +1587 -0
  3. clio_agent/arc/__init__.py +44 -0
  4. clio_agent/arc/cache.py +246 -0
  5. clio_agent/arc/context_compiler.py +377 -0
  6. clio_agent/arc/coordinator.py +576 -0
  7. clio_agent/arc/index.py +366 -0
  8. clio_agent/arc/lsm.py +541 -0
  9. clio_agent/arc/memory.py +1137 -0
  10. clio_agent/arc/retrieval.py +414 -0
  11. clio_agent/arc/schema.py +848 -0
  12. clio_agent/arc/storage.py +582 -0
  13. clio_agent/config.py +883 -0
  14. clio_agent/conversation_manager.py +79 -0
  15. clio_agent/errors.py +163 -0
  16. clio_agent/experts/__init__.py +92 -0
  17. clio_agent/experts/analysis_expert.py +559 -0
  18. clio_agent/experts/data_expert.py +481 -0
  19. clio_agent/experts/native_tools.py +66 -0
  20. clio_agent/experts/visualization_expert.py +580 -0
  21. clio_agent/gact/__init__.py +15 -0
  22. clio_agent/gact/app.py +6545 -0
  23. clio_agent/gact/events.py +190 -0
  24. clio_agent/gact/scheduler.py +182 -0
  25. clio_agent/gact/sessions.py +324 -0
  26. clio_agent/gact/types.py +595 -0
  27. clio_agent/gact/user_agents.py +125 -0
  28. clio_agent/gact/workspaces.py +199 -0
  29. clio_agent/harness.py +501 -0
  30. clio_agent/optimizer/__init__.py +27 -0
  31. clio_agent/optimizer/instrumentation.py +246 -0
  32. clio_agent/optimizer/runner.py +236 -0
  33. clio_agent/optimizer/trainer.py +263 -0
  34. clio_agent/optimizer/variants.py +303 -0
  35. clio_agent/providers/__init__.py +8 -0
  36. clio_agent/providers/argonne_auth.py +267 -0
  37. clio_agent/registry/__init__.py +30 -0
  38. clio_agent/registry/capability_matcher.py +197 -0
  39. clio_agent/registry/registry.py +382 -0
  40. clio_agent/runtime/__init__.py +28 -0
  41. clio_agent/runtime/hooks.py +167 -0
  42. clio_agent/runtime/nanoagent.py +181 -0
  43. clio_agent/runtime/status.py +1070 -0
  44. clio_agent/signatures/__init__.py +47 -0
  45. clio_agent/signatures/analysis_sig.py +126 -0
  46. clio_agent/signatures/expert_sig.py +92 -0
  47. clio_agent/signatures/main_agent_sig.py +107 -0
  48. clio_agent/signatures/visualization_sig.py +119 -0
  49. clio_agent/tools/__init__.py +10 -0
  50. clio_agent/tools/execution.py +532 -0
  51. clio_agent/tools/file_policy.py +325 -0
  52. clio_agent/tools/gateway.py +134 -0
  53. clio_agent/tools/servers/__init__.py +7 -0
  54. clio_agent/tools/servers/fs_server.py +135 -0
  55. clio_agent/tools/servers/hdf5_server.py +431 -0
  56. clio_agent/tools/servers/parquet_server.py +257 -0
  57. clio_agent/ui/__init__.py +27 -0
  58. clio_agent/ui/api.py +390 -0
  59. clio_agent/ui/cli.py +839 -0
  60. clio_agent-0.5.0.dist-info/METADATA +184 -0
  61. clio_agent-0.5.0.dist-info/RECORD +64 -0
  62. clio_agent-0.5.0.dist-info/WHEEL +4 -0
  63. clio_agent-0.5.0.dist-info/entry_points.txt +4 -0
  64. clio_agent-0.5.0.dist-info/licenses/LICENSE +45 -0
clio_agent/__init__.py ADDED
@@ -0,0 +1,59 @@
1
+ """
2
+ ClioAgent - Cognitive Layer for Adaptive Universal Data & Intelligent Operations
3
+
4
+ ClioAgent Agent Framework (IOWarp Intelligence Layer) for scientific computing.
5
+
6
+ Core Architecture:
7
+ - Declarative Intelligence: Agent signatures without prompt engineering
8
+ - CLIO Harness: validated routing, explicit tool traces, ARC-backed memory
9
+ - FastMCP Tool Boundary: scientific tools exposed through the MCP gateway
10
+ - Expert Orchestration: deterministic scientific paths with DSPy reasoning where useful
11
+ - UV-Native: Self-contained scripts with inline dependencies
12
+ - Local LM Support: Privacy-preserving HPC computing (LM Studio)
13
+
14
+ Example:
15
+ >>> from clio_agent import ClioAgent, setup_dspy
16
+ >>>
17
+ >>> # Setup LM (LM Studio)
18
+ >>> lm = setup_dspy()
19
+ >>>
20
+ >>> # Create ClioAgent agent
21
+ >>> agent = ClioAgent()
22
+ >>>
23
+ >>> # Ask data I/O questions
24
+ >>> result = agent(question="How do I optimize my HDF5 file?")
25
+ >>>
26
+ >>> # Inspect results
27
+ >>> print(f"Expert used: {result.selected_expert}") # "data"
28
+ >>> print(f"Answer: {result.answer}")
29
+ """
30
+
31
+ __version__ = "0.5.0"
32
+ __author__ = "IOWarp Team"
33
+
34
+ __all__ = [
35
+ "ClioAgent",
36
+ "setup_dspy",
37
+ "LMStudioConfig",
38
+ ]
39
+
40
+ # PEP 562 lazy attribute access. ``from clio_agent import ClioAgent``
41
+ # still works, but plain ``import clio_agent`` (or anything that just
42
+ # touches a submodule like ``clio_agent.gact.app``) no longer drags in
43
+ # DSPy + every expert + ARC at import time. The boot-time win matters
44
+ # for ``clio-agent-gact``: gact-tui's ``agent deploy`` probe only waits
45
+ # 3 s for /v1/capabilities, and an eager import here ate the budget.
46
+ def __getattr__(name: str):
47
+ if name == "ClioAgent":
48
+ from clio_agent.agent import ClioAgent # noqa: PLC0415
49
+
50
+ return ClioAgent
51
+ if name == "setup_dspy":
52
+ from clio_agent.config import setup_dspy # noqa: PLC0415
53
+
54
+ return setup_dspy
55
+ if name == "LMStudioConfig":
56
+ from clio_agent.config import LMStudioConfig # noqa: PLC0415
57
+
58
+ return LMStudioConfig
59
+ raise AttributeError(f"module {__name__!r} has no attribute {name!r}")