AbstractAgent 0.3.10__tar.gz → 0.3.13__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 (134) hide show
  1. {abstractagent-0.3.10 → abstractagent-0.3.13}/PKG-INFO +32 -11
  2. abstractagent-0.3.10/src/abstractagent.egg-info/PKG-INFO → abstractagent-0.3.13/README.md +25 -25
  3. {abstractagent-0.3.10 → abstractagent-0.3.13}/pyproject.toml +7 -7
  4. {abstractagent-0.3.10 → abstractagent-0.3.13}/src/abstractagent/__init__.py +15 -0
  5. abstractagent-0.3.13/src/abstractagent/adapters/__init__.py +21 -0
  6. {abstractagent-0.3.10 → abstractagent-0.3.13}/src/abstractagent/adapters/codeact_runtime.py +767 -145
  7. abstractagent-0.3.13/src/abstractagent/adapters/emit_inventory.py +170 -0
  8. abstractagent-0.3.13/src/abstractagent/adapters/generation_params.py +661 -0
  9. abstractagent-0.3.13/src/abstractagent/adapters/loop_hooks.py +384 -0
  10. abstractagent-0.3.13/src/abstractagent/adapters/media.py +180 -0
  11. {abstractagent-0.3.10 → abstractagent-0.3.13}/src/abstractagent/adapters/memact_runtime.py +512 -64
  12. abstractagent-0.3.13/src/abstractagent/adapters/native_loop_registry.py +325 -0
  13. abstractagent-0.3.13/src/abstractagent/adapters/progress.py +182 -0
  14. abstractagent-0.3.13/src/abstractagent/adapters/react_runtime.py +3979 -0
  15. abstractagent-0.3.13/src/abstractagent/adapters/read_orchestration.py +261 -0
  16. abstractagent-0.3.13/src/abstractagent/adapters/tool_allowlist.py +59 -0
  17. abstractagent-0.3.13/src/abstractagent/adapters/tool_failure_hints.py +320 -0
  18. abstractagent-0.3.13/src/abstractagent/adapters/transcripts.py +434 -0
  19. {abstractagent-0.3.10 → abstractagent-0.3.13}/src/abstractagent/agents/base.py +33 -1
  20. {abstractagent-0.3.10 → abstractagent-0.3.13}/src/abstractagent/agents/codeact.py +75 -20
  21. abstractagent-0.3.13/src/abstractagent/agents/defaults.py +131 -0
  22. {abstractagent-0.3.10 → abstractagent-0.3.13}/src/abstractagent/agents/memact.py +65 -32
  23. {abstractagent-0.3.10 → abstractagent-0.3.13}/src/abstractagent/agents/react.py +69 -20
  24. abstractagent-0.3.13/src/abstractagent/agents/task_reset.py +134 -0
  25. abstractagent-0.3.13/src/abstractagent/agents/unattended.py +68 -0
  26. {abstractagent-0.3.10 → abstractagent-0.3.13}/src/abstractagent/logic/builtins.py +72 -0
  27. abstractagent-0.3.13/src/abstractagent/logic/codeact.py +273 -0
  28. {abstractagent-0.3.10 → abstractagent-0.3.13}/src/abstractagent/logic/memact.py +35 -6
  29. {abstractagent-0.3.10 → abstractagent-0.3.13}/src/abstractagent/logic/react.py +45 -10
  30. abstractagent-0.3.13/src/abstractagent/metrics/__init__.py +5 -0
  31. abstractagent-0.3.13/src/abstractagent/metrics/prefix_reuse.py +123 -0
  32. {abstractagent-0.3.10 → abstractagent-0.3.13}/src/abstractagent/repl.py +6 -3
  33. {abstractagent-0.3.10 → abstractagent-0.3.13}/src/abstractagent/sandbox/interface.py +3 -1
  34. {abstractagent-0.3.10 → abstractagent-0.3.13}/src/abstractagent/sandbox/local.py +20 -4
  35. {abstractagent-0.3.10 → abstractagent-0.3.13}/src/abstractagent/scripts/lmstudio_tool_eval.py +57 -1
  36. abstractagent-0.3.13/src/abstractagent/tools/code_execution.py +66 -0
  37. abstractagent-0.3.10/README.md → abstractagent-0.3.13/src/abstractagent.egg-info/PKG-INFO +46 -4
  38. {abstractagent-0.3.10 → abstractagent-0.3.13}/src/abstractagent.egg-info/SOURCES.txt +58 -1
  39. abstractagent-0.3.13/src/abstractagent.egg-info/requires.txt +16 -0
  40. {abstractagent-0.3.10 → abstractagent-0.3.13}/tests/test_active_context_policy_adoption.py +7 -2
  41. abstractagent-0.3.13/tests/test_adversary_hardening_2026_07_13.py +230 -0
  42. {abstractagent-0.3.10 → abstractagent-0.3.13}/tests/test_agent_plan_review_modes.py +35 -19
  43. abstractagent-0.3.13/tests/test_agent_speculation_inheritance.py +59 -0
  44. abstractagent-0.3.13/tests/test_batching_prompt_rule.py +58 -0
  45. abstractagent-0.3.13/tests/test_budget_triage_tail.py +147 -0
  46. abstractagent-0.3.13/tests/test_c2447_visit_lane_honesty.py +495 -0
  47. abstractagent-0.3.13/tests/test_claim_0029_residue_2026_07_14.py +303 -0
  48. {abstractagent-0.3.10 → abstractagent-0.3.13}/tests/test_codeact_logic.py +1 -1
  49. abstractagent-0.3.13/tests/test_delegate_session_route_composition.py +253 -0
  50. abstractagent-0.3.13/tests/test_emit_inventory_drift.py +50 -0
  51. abstractagent-0.3.13/tests/test_gated_remainder_wave_2026_07_14.py +364 -0
  52. abstractagent-0.3.13/tests/test_generation_params_media_policies.py +207 -0
  53. abstractagent-0.3.13/tests/test_history_monster_clamp.py +335 -0
  54. abstractagent-0.3.13/tests/test_improvement_wave_2026_07_13.py +228 -0
  55. abstractagent-0.3.13/tests/test_lmstudio_tool_eval_metrics.py +40 -0
  56. abstractagent-0.3.13/tests/test_loop_hooks.py +460 -0
  57. abstractagent-0.3.13/tests/test_loop_hooks_0026_follow_ups.py +287 -0
  58. abstractagent-0.3.13/tests/test_memact_codeact_guidance_durable_transcript.py +134 -0
  59. abstractagent-0.3.13/tests/test_native_loop_registry.py +275 -0
  60. abstractagent-0.3.13/tests/test_operator_conclude.py +163 -0
  61. abstractagent-0.3.13/tests/test_optimal_wave_batch2_2026_07_13.py +210 -0
  62. {abstractagent-0.3.10 → abstractagent-0.3.13}/tests/test_packaging_profiles.py +6 -6
  63. abstractagent-0.3.13/tests/test_parse_prompt_cache_capture.py +102 -0
  64. abstractagent-0.3.13/tests/test_prefix_reuse_metric.py +135 -0
  65. abstractagent-0.3.13/tests/test_progress_detection.py +169 -0
  66. abstractagent-0.3.13/tests/test_react_act_only_observation.py +174 -0
  67. abstractagent-0.3.13/tests/test_react_delegate_agent_tool.py +269 -0
  68. abstractagent-0.3.13/tests/test_react_election_fence_conformance.py +181 -0
  69. abstractagent-0.3.13/tests/test_react_entity_dress_conformance.py +233 -0
  70. abstractagent-0.3.13/tests/test_react_guidance_durable_transcript.py +179 -0
  71. {abstractagent-0.3.10 → abstractagent-0.3.13}/tests/test_react_logic.py +5 -3
  72. abstractagent-0.3.13/tests/test_react_loop_aborted_generation_retry.py +224 -0
  73. {abstractagent-0.3.10 → abstractagent-0.3.13}/tests/test_react_loop_context_transcript_levels.py +148 -5
  74. {abstractagent-0.3.10 → abstractagent-0.3.13}/tests/test_react_loop_followthrough_retry.py +5 -2
  75. {abstractagent-0.3.10 → abstractagent-0.3.13}/tests/test_react_loop_truncated_output_retry.py +8 -3
  76. {abstractagent-0.3.10 → abstractagent-0.3.13}/tests/test_react_max_iterations_concludes.py +8 -2
  77. abstractagent-0.3.13/tests/test_react_phase_grant_boundary.py +274 -0
  78. abstractagent-0.3.13/tests/test_react_prompt_prefix_stability.py +288 -0
  79. abstractagent-0.3.13/tests/test_react_sight_lane_media_fold.py +381 -0
  80. abstractagent-0.3.13/tests/test_react_turn_byte_stability.py +221 -0
  81. abstractagent-0.3.13/tests/test_react_verifier_and_plan.py +167 -0
  82. abstractagent-0.3.13/tests/test_react_visit_composition.py +334 -0
  83. abstractagent-0.3.13/tests/test_react_visit_merge.py +282 -0
  84. abstractagent-0.3.13/tests/test_read_orchestration_guidance.py +409 -0
  85. abstractagent-0.3.13/tests/test_reasoning_first_citizen_agent.py +284 -0
  86. abstractagent-0.3.13/tests/test_review_failure_containment.py +259 -0
  87. abstractagent-0.3.13/tests/test_sibling_loop_defects_batch.py +328 -0
  88. abstractagent-0.3.13/tests/test_sibling_strict_transcripts_0011.py +166 -0
  89. abstractagent-0.3.13/tests/test_stuck_streak_termination.py +525 -0
  90. abstractagent-0.3.13/tests/test_tool_failure_hints.py +244 -0
  91. abstractagent-0.3.13/tests/test_tool_loop_prefix_extension_a3.py +202 -0
  92. abstractagent-0.3.13/tests/test_unseeded_render_limits.py +116 -0
  93. abstractagent-0.3.13/tests/test_verifier_execution_preference.py +462 -0
  94. abstractagent-0.3.13/tests/test_verifier_schema_strict.py +197 -0
  95. abstractagent-0.3.10/src/abstractagent/adapters/__init__.py +0 -7
  96. abstractagent-0.3.10/src/abstractagent/adapters/generation_params.py +0 -89
  97. abstractagent-0.3.10/src/abstractagent/adapters/media.py +0 -45
  98. abstractagent-0.3.10/src/abstractagent/adapters/react_runtime.py +0 -1612
  99. abstractagent-0.3.10/src/abstractagent/logic/codeact.py +0 -176
  100. abstractagent-0.3.10/src/abstractagent/tools/code_execution.py +0 -45
  101. abstractagent-0.3.10/src/abstractagent.egg-info/requires.txt +0 -16
  102. abstractagent-0.3.10/tests/test_generation_params_media_policies.py +0 -51
  103. abstractagent-0.3.10/tests/test_react_delegate_agent_tool.py +0 -85
  104. {abstractagent-0.3.10 → abstractagent-0.3.13}/LICENSE +0 -0
  105. {abstractagent-0.3.10 → abstractagent-0.3.13}/setup.cfg +0 -0
  106. {abstractagent-0.3.10 → abstractagent-0.3.13}/src/abstractagent/agents/__init__.py +0 -0
  107. {abstractagent-0.3.10 → abstractagent-0.3.13}/src/abstractagent/logic/__init__.py +0 -0
  108. {abstractagent-0.3.10 → abstractagent-0.3.13}/src/abstractagent/logic/types.py +0 -0
  109. {abstractagent-0.3.10 → abstractagent-0.3.13}/src/abstractagent/sandbox/__init__.py +0 -0
  110. {abstractagent-0.3.10 → abstractagent-0.3.13}/src/abstractagent/scripts/__init__.py +0 -0
  111. {abstractagent-0.3.10 → abstractagent-0.3.13}/src/abstractagent/tools/__init__.py +0 -0
  112. {abstractagent-0.3.10 → abstractagent-0.3.13}/src/abstractagent/tools/self_improve.py +0 -0
  113. {abstractagent-0.3.10 → abstractagent-0.3.13}/src/abstractagent.egg-info/dependency_links.txt +0 -0
  114. {abstractagent-0.3.10 → abstractagent-0.3.13}/src/abstractagent.egg-info/entry_points.txt +0 -0
  115. {abstractagent-0.3.10 → abstractagent-0.3.13}/src/abstractagent.egg-info/top_level.txt +0 -0
  116. {abstractagent-0.3.10 → abstractagent-0.3.13}/tests/test_agents_integration_llm.py +0 -0
  117. {abstractagent-0.3.10 → abstractagent-0.3.13}/tests/test_base_agent_trace_accessors.py +0 -0
  118. {abstractagent-0.3.10 → abstractagent-0.3.13}/tests/test_builtin_tool_specs_optional_defaults.py +0 -0
  119. {abstractagent-0.3.10 → abstractagent-0.3.13}/tests/test_codeact_runtime_verifier_policy.py +0 -0
  120. {abstractagent-0.3.10 → abstractagent-0.3.13}/tests/test_llm_call_payload_requires_prompt_or_messages.py +0 -0
  121. {abstractagent-0.3.10 → abstractagent-0.3.13}/tests/test_memact_session_memory.py +0 -0
  122. {abstractagent-0.3.10 → abstractagent-0.3.13}/tests/test_memact_workflow.py +0 -0
  123. {abstractagent-0.3.10 → abstractagent-0.3.13}/tests/test_memory_recall_tool.py +0 -0
  124. {abstractagent-0.3.10 → abstractagent-0.3.13}/tests/test_open_attachment_tool_available.py +0 -0
  125. {abstractagent-0.3.10 → abstractagent-0.3.13}/tests/test_react_active_attachments_disable_tools_first_iteration.py +0 -0
  126. {abstractagent-0.3.10 → abstractagent-0.3.13}/tests/test_react_adapter_forwards_context_attachments_media.py +0 -0
  127. {abstractagent-0.3.10 → abstractagent-0.3.13}/tests/test_react_loop_side_effect_dedupe_comms.py +0 -0
  128. {abstractagent-0.3.10 → abstractagent-0.3.13}/tests/test_react_planish_heuristic.py +0 -0
  129. {abstractagent-0.3.10 → abstractagent-0.3.13}/tests/test_react_workflow_system_prompt_and_tools_override.py +0 -0
  130. {abstractagent-0.3.10 → abstractagent-0.3.13}/tests/test_react_workflow_toolset_refresh.py +0 -0
  131. {abstractagent-0.3.10 → abstractagent-0.3.13}/tests/test_run_start_seeds_runtime_provider_model.py +0 -0
  132. {abstractagent-0.3.10 → abstractagent-0.3.13}/tests/test_session_memory.py +0 -0
  133. {abstractagent-0.3.10 → abstractagent-0.3.13}/tests/test_tool_observe_emits_result_for_tui.py +0 -0
  134. {abstractagent-0.3.10 → abstractagent-0.3.13}/tests/test_tools_editing.py +0 -0
@@ -1,18 +1,18 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: abstractagent
3
- Version: 0.3.10
3
+ Version: 0.3.13
4
4
  Summary: Agent implementations using AbstractRuntime and AbstractCore
5
5
  Requires-Python: >=3.10
6
6
  Description-Content-Type: text/markdown
7
7
  License-File: LICENSE
8
- Requires-Dist: abstractcore[tools]>=2.13.31
9
- Requires-Dist: abstractruntime>=0.4.26
8
+ Requires-Dist: abstractcore[tools]>=2.13.41
9
+ Requires-Dist: abstractruntime>=0.4.32
10
10
  Provides-Extra: apple
11
- Requires-Dist: abstractcore[all-apple]>=2.13.31; extra == "apple"
12
- Requires-Dist: abstractruntime[apple]>=0.4.26; extra == "apple"
11
+ Requires-Dist: abstractcore[all-apple]>=2.13.41; extra == "apple"
12
+ Requires-Dist: abstractruntime[apple]>=0.4.32; extra == "apple"
13
13
  Provides-Extra: gpu
14
- Requires-Dist: abstractcore[all-gpu]>=2.13.31; extra == "gpu"
15
- Requires-Dist: abstractruntime[gpu]>=0.4.26; extra == "gpu"
14
+ Requires-Dist: abstractcore[all-gpu]>=2.13.41; extra == "gpu"
15
+ Requires-Dist: abstractruntime[gpu]>=0.4.32; extra == "gpu"
16
16
  Provides-Extra: dev
17
17
  Requires-Dist: pytest>=7.0; extra == "dev"
18
18
  Provides-Extra: test
@@ -45,6 +45,7 @@ flowchart LR
45
45
 
46
46
  - Getting started: [`docs/getting-started.md`](docs/getting-started.md)
47
47
  - API reference: [`docs/api.md`](docs/api.md)
48
+ - Loop hooks (listen/steer/capture): [`docs/hooks.md`](docs/hooks.md)
48
49
  - FAQ / troubleshooting: [`docs/faq.md`](docs/faq.md)
49
50
  - Architecture (diagrams): [`docs/architecture.md`](docs/architecture.md)
50
51
  - Changelog: [`CHANGELOG.md`](CHANGELOG.md)
@@ -55,10 +56,16 @@ flowchart LR
55
56
  ## What you get
56
57
 
57
58
  - **ReAct**: tool-first Reason → Act → Observe loop
58
- - **CodeAct**: executes Python (tool call or fenced ` ```python``` ` blocks)
59
- - **MemAct**: memory-enhanced agent using runtime-owned Active Memory
59
+ - **CodeAct**: executes Python (tool calls; on prompted-tools models also fenced ` ```python``` ` blocks)
60
+ - **MemAct** (experimental): memory-enhanced agent using runtime-owned Active Memory — distinct architecture, less production mileage; import from `abstractagent.agents.memact` (deliberately not top-level)
60
61
  - **Durable runs**: pause/resume via `run_id` + runtime stores
61
- - **Tool control**: explicit tool bundles + per-run allowlists
62
+ - **Tool control**: explicit tool bundles + per-run allowlists (unresolvable
63
+ grant names are recorded loudly, never dropped silently)
64
+ - **Loop hooks**: listen/steer/capture on the running loop via `LoopHooks`
65
+ (see [`docs/hooks.md`](docs/hooks.md)); the flat `on_step` callback remains
66
+ - **Generation controls**: temperature, seed, media policy, prompt-cache
67
+ identity, streaming, Core `thinking` and `speculation` (MTP) are normalized
68
+ before LLM calls and inherited by delegated children
62
69
  - **Observability**: durable ledger of LLM calls, tool calls, and waits
63
70
 
64
71
  Where this lives in code (source of truth):
@@ -96,6 +103,10 @@ Native Python hardware profile cascades are available for deployment manifests:
96
103
  AbstractCore and AbstractRuntime profiles; AbstractAgent itself remains
97
104
  provider/runtime agnostic.
98
105
 
106
+ AbstractAgent 0.3.13 requires `abstractcore[tools]>=2.13.41` and
107
+ `AbstractRuntime>=0.4.32` (the runtime release that provides turn grounding,
108
+ in-flight cancellation and speculation inheritance).
109
+
99
110
  Note: the repository may be ahead of the latest published PyPI release. To verify what you installed:
100
111
 
101
112
  ```bash
@@ -107,12 +118,22 @@ python -c "import importlib.metadata as md; print(md.version('abstractagent'))"
107
118
  ```python
108
119
  from abstractagent import create_react_agent
109
120
 
110
- agent = create_react_agent(provider="ollama", model="qwen3:1.7b-q4_K_M")
121
+ # provider/model resolve from your AbstractCore config defaults
122
+ # (`abstractcore --config`) when omitted; pass them explicitly to pin.
123
+ agent = create_react_agent(provider="ollama", model="qwen3:4b")
111
124
  agent.start("List the files in the current directory")
112
125
  state = agent.run_to_completion()
113
126
  print(state.output["answer"])
114
127
  ```
115
128
 
129
+ Tip: these loops send the full transcript plus ~19 tool schemas every cycle —
130
+ prefer a tool-capable model. On Ollama, raise the context window to the model's
131
+ maximum available context or the server silently truncates from the oldest
132
+ content first: per-call `llm_kwargs={"num_ctx": <model max>}` (forwarded since
133
+ 2026-07-13) or server-side `OLLAMA_CONTEXT_LENGTH=<model max> ollama serve`.
134
+ House rule: maximum available context unless you explicitly choose otherwise —
135
+ a fixed lower number is a hidden ceiling (see [`docs/faq.md`](docs/faq.md)).
136
+
116
137
  ## Persistence (resume across restarts)
117
138
 
118
139
  By default, the factory helpers use an in-memory runtime store. For resume across process restarts,
@@ -1,24 +1,3 @@
1
- Metadata-Version: 2.4
2
- Name: abstractagent
3
- Version: 0.3.10
4
- Summary: Agent implementations using AbstractRuntime and AbstractCore
5
- Requires-Python: >=3.10
6
- Description-Content-Type: text/markdown
7
- License-File: LICENSE
8
- Requires-Dist: abstractcore[tools]>=2.13.31
9
- Requires-Dist: abstractruntime>=0.4.26
10
- Provides-Extra: apple
11
- Requires-Dist: abstractcore[all-apple]>=2.13.31; extra == "apple"
12
- Requires-Dist: abstractruntime[apple]>=0.4.26; extra == "apple"
13
- Provides-Extra: gpu
14
- Requires-Dist: abstractcore[all-gpu]>=2.13.31; extra == "gpu"
15
- Requires-Dist: abstractruntime[gpu]>=0.4.26; extra == "gpu"
16
- Provides-Extra: dev
17
- Requires-Dist: pytest>=7.0; extra == "dev"
18
- Provides-Extra: test
19
- Requires-Dist: pytest>=7.0; extra == "test"
20
- Dynamic: license-file
21
-
22
1
  # AbstractAgent
23
2
 
24
3
  Agent patterns (ReAct / CodeAct / MemAct) built on **AbstractRuntime** (durable execution) and **AbstractCore** (tools + LLM integration).
@@ -45,6 +24,7 @@ flowchart LR
45
24
 
46
25
  - Getting started: [`docs/getting-started.md`](docs/getting-started.md)
47
26
  - API reference: [`docs/api.md`](docs/api.md)
27
+ - Loop hooks (listen/steer/capture): [`docs/hooks.md`](docs/hooks.md)
48
28
  - FAQ / troubleshooting: [`docs/faq.md`](docs/faq.md)
49
29
  - Architecture (diagrams): [`docs/architecture.md`](docs/architecture.md)
50
30
  - Changelog: [`CHANGELOG.md`](CHANGELOG.md)
@@ -55,10 +35,16 @@ flowchart LR
55
35
  ## What you get
56
36
 
57
37
  - **ReAct**: tool-first Reason → Act → Observe loop
58
- - **CodeAct**: executes Python (tool call or fenced ` ```python``` ` blocks)
59
- - **MemAct**: memory-enhanced agent using runtime-owned Active Memory
38
+ - **CodeAct**: executes Python (tool calls; on prompted-tools models also fenced ` ```python``` ` blocks)
39
+ - **MemAct** (experimental): memory-enhanced agent using runtime-owned Active Memory — distinct architecture, less production mileage; import from `abstractagent.agents.memact` (deliberately not top-level)
60
40
  - **Durable runs**: pause/resume via `run_id` + runtime stores
61
- - **Tool control**: explicit tool bundles + per-run allowlists
41
+ - **Tool control**: explicit tool bundles + per-run allowlists (unresolvable
42
+ grant names are recorded loudly, never dropped silently)
43
+ - **Loop hooks**: listen/steer/capture on the running loop via `LoopHooks`
44
+ (see [`docs/hooks.md`](docs/hooks.md)); the flat `on_step` callback remains
45
+ - **Generation controls**: temperature, seed, media policy, prompt-cache
46
+ identity, streaming, Core `thinking` and `speculation` (MTP) are normalized
47
+ before LLM calls and inherited by delegated children
62
48
  - **Observability**: durable ledger of LLM calls, tool calls, and waits
63
49
 
64
50
  Where this lives in code (source of truth):
@@ -96,6 +82,10 @@ Native Python hardware profile cascades are available for deployment manifests:
96
82
  AbstractCore and AbstractRuntime profiles; AbstractAgent itself remains
97
83
  provider/runtime agnostic.
98
84
 
85
+ AbstractAgent 0.3.13 requires `abstractcore[tools]>=2.13.41` and
86
+ `AbstractRuntime>=0.4.32` (the runtime release that provides turn grounding,
87
+ in-flight cancellation and speculation inheritance).
88
+
99
89
  Note: the repository may be ahead of the latest published PyPI release. To verify what you installed:
100
90
 
101
91
  ```bash
@@ -107,12 +97,22 @@ python -c "import importlib.metadata as md; print(md.version('abstractagent'))"
107
97
  ```python
108
98
  from abstractagent import create_react_agent
109
99
 
110
- agent = create_react_agent(provider="ollama", model="qwen3:1.7b-q4_K_M")
100
+ # provider/model resolve from your AbstractCore config defaults
101
+ # (`abstractcore --config`) when omitted; pass them explicitly to pin.
102
+ agent = create_react_agent(provider="ollama", model="qwen3:4b")
111
103
  agent.start("List the files in the current directory")
112
104
  state = agent.run_to_completion()
113
105
  print(state.output["answer"])
114
106
  ```
115
107
 
108
+ Tip: these loops send the full transcript plus ~19 tool schemas every cycle —
109
+ prefer a tool-capable model. On Ollama, raise the context window to the model's
110
+ maximum available context or the server silently truncates from the oldest
111
+ content first: per-call `llm_kwargs={"num_ctx": <model max>}` (forwarded since
112
+ 2026-07-13) or server-side `OLLAMA_CONTEXT_LENGTH=<model max> ollama serve`.
113
+ House rule: maximum available context unless you explicitly choose otherwise —
114
+ a fixed lower number is a hidden ceiling (see [`docs/faq.md`](docs/faq.md)).
115
+
116
116
  ## Persistence (resume across restarts)
117
117
 
118
118
  By default, the factory helpers use an in-memory runtime store. For resume across process restarts,
@@ -4,23 +4,23 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "abstractagent"
7
- version = "0.3.10"
7
+ version = "0.3.13"
8
8
  description = "Agent implementations using AbstractRuntime and AbstractCore"
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.10"
11
11
  dependencies = [
12
- "abstractcore[tools]>=2.13.31",
13
- "abstractruntime>=0.4.26",
12
+ "abstractcore[tools]>=2.13.41",
13
+ "abstractruntime>=0.4.32",
14
14
  ]
15
15
 
16
16
  [project.optional-dependencies]
17
17
  apple = [
18
- "abstractcore[all-apple]>=2.13.31",
19
- "abstractruntime[apple]>=0.4.26",
18
+ "abstractcore[all-apple]>=2.13.41",
19
+ "abstractruntime[apple]>=0.4.32",
20
20
  ]
21
21
  gpu = [
22
- "abstractcore[all-gpu]>=2.13.31",
23
- "abstractruntime[gpu]>=0.4.26",
22
+ "abstractcore[all-gpu]>=2.13.41",
23
+ "abstractruntime[gpu]>=0.4.32",
24
24
  ]
25
25
  dev = [
26
26
  "pytest>=7.0",
@@ -1,5 +1,12 @@
1
1
  """AbstractAgent - Agent implementations using AbstractRuntime and AbstractCore."""
2
2
 
3
+ from .adapters.loop_hooks import DEFAULT_EVENT_MAP, HookEvent, LoopHooks
4
+ from .adapters.native_loop_registry import (
5
+ audit_native_loop_manifest,
6
+ build_native_loop_manifest,
7
+ materialize_native_loop_spec,
8
+ pack_native_loop_bundle,
9
+ )
3
10
  from .agents import (
4
11
  BaseAgent,
5
12
  ReactAgent,
@@ -26,6 +33,14 @@ from .tools import (
26
33
  __all__ = [
27
34
  # Base class for custom agents
28
35
  "BaseAgent",
36
+ # First-class loop hooks (listen + steer + capture)
37
+ "DEFAULT_EVENT_MAP",
38
+ "HookEvent",
39
+ "LoopHooks",
40
+ "audit_native_loop_manifest",
41
+ "materialize_native_loop_spec",
42
+ "build_native_loop_manifest",
43
+ "pack_native_loop_bundle",
29
44
  # ReAct agent
30
45
  "ReactAgent",
31
46
  "create_react_workflow",
@@ -0,0 +1,21 @@
1
+ """Runtime adapters for agent logic."""
2
+
3
+ from .codeact_runtime import create_codeact_workflow
4
+ from .native_loop_registry import (
5
+ audit_native_loop_manifest,
6
+ build_native_loop_manifest,
7
+ materialize_native_loop_spec,
8
+ pack_native_loop_bundle,
9
+ )
10
+ from .react_runtime import create_react_workflow
11
+ from .memact_runtime import create_memact_workflow
12
+
13
+ __all__ = [
14
+ "create_react_workflow",
15
+ "create_codeact_workflow",
16
+ "create_memact_workflow",
17
+ "audit_native_loop_manifest",
18
+ "materialize_native_loop_spec",
19
+ "build_native_loop_manifest",
20
+ "pack_native_loop_bundle",
21
+ ]