Rohan03 commited on
Commit
25d834f
Β·
verified Β·
1 Parent(s): 25de736

v3.0.0a1: add runtime event system exports, bump version

Browse files
Files changed (1) hide show
  1. purpose_agent/__init__.py +13 -23
purpose_agent/__init__.py CHANGED
@@ -1,28 +1,13 @@
1
  """
2
  purpose_agent β€” A local-first self-improvement kernel for agents.
3
 
4
- Turns traces into tested memory, policies, and rubrics so agents improve
5
- without fine-tuning, cloud infrastructure, or vendor lock-in.
6
 
7
- Architecture based on 13 published papers.
8
  See COMPILED_RESEARCH.md for the full research trace.
9
-
10
- Modules:
11
- Core: types, llm_backend, actor, purpose_function, experience_replay, optimizer, orchestrator
12
- V2 Kernel: v2_types, trace, memory, compiler, immune, memory_ci, evalport, benchmark_v2
13
- Research: meta_rewarding, self_taught, prompt_optimizer, llm_compiler, retroformer
14
- SLM: slm_backends (Ollama, llama-cpp, prompt compression)
15
- Streaming: streaming (async generators, event streaming)
16
- Tools: tools (Tool base class, built-in tools, Tool RAG)
17
- Observe: observability (cost tracking, callbacks, metrics)
18
- Multi: multi_agent (shared memory, agent delegation, teams)
19
- HITL: hitl (checkpoint, interrupt, resume, Ξ¦ overrides)
20
- Eval: evaluation (benchmark runner, improvement curves)
21
- Unified: unified (Agent, Graph, parallel, Conversation, KnowledgeStore)
22
- Easy: easy (purpose(), Team, quickstart wizard)
23
  """
24
 
25
- __version__ = "2.1.1"
26
 
27
  # ── Core ──────────────────────────────────────────────────────────────────
28
  from purpose_agent.types import (
@@ -49,6 +34,10 @@ from purpose_agent.memory_ci import MemoryCI
49
  from purpose_agent.evalport import EvalCase, EvalPort, DictEvalPort, ScoreBundle
50
  from purpose_agent.benchmark_v2 import BenchmarkRunnerV2, V2BenchmarkResult
51
 
 
 
 
 
52
  # ── Research Implementations ──────────────────────────────────────────────
53
  from purpose_agent.meta_rewarding import MetaRewardingLoop
54
  from purpose_agent.self_taught import SelfTaughtEvaluator
@@ -99,11 +88,10 @@ from purpose_agent.registry import (
99
  from purpose_agent.unified import (
100
  Agent, Graph, parallel, Conversation, KnowledgeStore,
101
  START, END, Message,
102
- # Creative names (primary β€” use these)
103
  Spark, Flow, swarm, Council, Vault, BEGIN, DONE_SIGNAL,
104
  )
105
 
106
- # ── Easy API (the only thing beginners need) ─────────────────────────────
107
  from purpose_agent.easy import purpose, Team, quickstart, TEAM_TEMPLATES
108
 
109
  __all__ = [
@@ -123,6 +111,9 @@ __all__ = [
123
  "MemoryCI",
124
  "EvalCase", "EvalPort", "DictEvalPort", "ScoreBundle",
125
  "BenchmarkRunnerV2", "V2BenchmarkResult",
 
 
 
126
  # Research
127
  "MetaRewardingLoop", "SelfTaughtEvaluator",
128
  "PromptOptimizer", "Signature", "Demonstration",
@@ -144,15 +135,14 @@ __all__ = [
144
  # HITL
145
  "HITLOrchestrator", "Checkpoint", "HumanInputHandler",
146
  "CLIInputHandler", "AutoApproveHandler", "InterruptType",
147
- # Evaluation (V1)
148
  "BenchmarkTask", "BenchmarkRunner", "BenchmarkResult",
149
  # Plugin Registry
150
  "PluginRegistry", "backend_registry", "callback_registry", "model_registry",
151
  "EmbeddingBackend", "default_embedding",
152
- # Unified Capabilities (backward-compat names)
153
  "Agent", "Graph", "parallel", "Conversation", "KnowledgeStore",
154
  "START", "END", "Message",
155
- # Creative names (primary β€” use these)
156
  "Spark", "Flow", "swarm", "Council", "Vault", "BEGIN", "DONE_SIGNAL",
157
  # Easy API
158
  "purpose", "Team", "quickstart", "TEAM_TEMPLATES",
 
1
  """
2
  purpose_agent β€” A local-first self-improvement kernel for agents.
3
 
4
+ v3.0 adds: canonical event runtime, AG-UI streaming, durable execution (planned).
 
5
 
6
+ Architecture based on 13+ published papers.
7
  See COMPILED_RESEARCH.md for the full research trace.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
8
  """
9
 
10
+ __version__ = "3.0.0a1"
11
 
12
  # ── Core ──────────────────────────────────────────────────────────────────
13
  from purpose_agent.types import (
 
34
  from purpose_agent.evalport import EvalCase, EvalPort, DictEvalPort, ScoreBundle
35
  from purpose_agent.benchmark_v2 import BenchmarkRunnerV2, V2BenchmarkResult
36
 
37
+ # ── V3 Runtime (NEW) ─────────────────────────────────────────────────────
38
+ from purpose_agent.runtime.events import PAEvent, EventKind, Visibility, create_event
39
+ from purpose_agent.runtime.event_bus import EventBus, parallel_merge
40
+
41
  # ── Research Implementations ──────────────────────────────────────────────
42
  from purpose_agent.meta_rewarding import MetaRewardingLoop
43
  from purpose_agent.self_taught import SelfTaughtEvaluator
 
88
  from purpose_agent.unified import (
89
  Agent, Graph, parallel, Conversation, KnowledgeStore,
90
  START, END, Message,
 
91
  Spark, Flow, swarm, Council, Vault, BEGIN, DONE_SIGNAL,
92
  )
93
 
94
+ # ── Easy API ─────────────────────────────────────────────────────────────
95
  from purpose_agent.easy import purpose, Team, quickstart, TEAM_TEMPLATES
96
 
97
  __all__ = [
 
111
  "MemoryCI",
112
  "EvalCase", "EvalPort", "DictEvalPort", "ScoreBundle",
113
  "BenchmarkRunnerV2", "V2BenchmarkResult",
114
+ # V3 Runtime (NEW)
115
+ "PAEvent", "EventKind", "Visibility", "create_event",
116
+ "EventBus", "parallel_merge",
117
  # Research
118
  "MetaRewardingLoop", "SelfTaughtEvaluator",
119
  "PromptOptimizer", "Signature", "Demonstration",
 
135
  # HITL
136
  "HITLOrchestrator", "Checkpoint", "HumanInputHandler",
137
  "CLIInputHandler", "AutoApproveHandler", "InterruptType",
138
+ # Evaluation
139
  "BenchmarkTask", "BenchmarkRunner", "BenchmarkResult",
140
  # Plugin Registry
141
  "PluginRegistry", "backend_registry", "callback_registry", "model_registry",
142
  "EmbeddingBackend", "default_embedding",
143
+ # Unified Capabilities
144
  "Agent", "Graph", "parallel", "Conversation", "KnowledgeStore",
145
  "START", "END", "Message",
 
146
  "Spark", "Flow", "swarm", "Council", "Vault", "BEGIN", "DONE_SIGNAL",
147
  # Easy API
148
  "purpose", "Team", "quickstart", "TEAM_TEMPLATES",