abstractagent 0.2.0__tar.gz → 0.3.1__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 (79) hide show
  1. abstractagent-0.3.1/PKG-INFO +112 -0
  2. abstractagent-0.3.1/README.md +99 -0
  3. {abstractagent-0.2.0 → abstractagent-0.3.1}/pyproject.toml +9 -2
  4. {abstractagent-0.2.0 → abstractagent-0.3.1}/src/abstractagent/adapters/__init__.py +2 -1
  5. abstractagent-0.3.1/src/abstractagent/adapters/codeact_runtime.py +1244 -0
  6. abstractagent-0.3.1/src/abstractagent/adapters/generation_params.py +82 -0
  7. abstractagent-0.3.1/src/abstractagent/adapters/media.py +45 -0
  8. abstractagent-0.3.1/src/abstractagent/adapters/memact_runtime.py +959 -0
  9. abstractagent-0.3.1/src/abstractagent/adapters/react_runtime.py +1612 -0
  10. {abstractagent-0.2.0 → abstractagent-0.3.1}/src/abstractagent/agents/__init__.py +4 -0
  11. {abstractagent-0.2.0 → abstractagent-0.3.1}/src/abstractagent/agents/base.py +89 -1
  12. {abstractagent-0.2.0 → abstractagent-0.3.1}/src/abstractagent/agents/codeact.py +125 -18
  13. abstractagent-0.3.1/src/abstractagent/agents/memact.py +280 -0
  14. {abstractagent-0.2.0 → abstractagent-0.3.1}/src/abstractagent/agents/react.py +129 -18
  15. {abstractagent-0.2.0 → abstractagent-0.3.1}/src/abstractagent/logic/__init__.py +2 -0
  16. abstractagent-0.3.1/src/abstractagent/logic/builtins.py +294 -0
  17. abstractagent-0.3.1/src/abstractagent/logic/codeact.py +176 -0
  18. abstractagent-0.3.1/src/abstractagent/logic/memact.py +128 -0
  19. abstractagent-0.3.1/src/abstractagent/logic/react.py +167 -0
  20. abstractagent-0.3.1/src/abstractagent/repl.py +34 -0
  21. abstractagent-0.3.1/src/abstractagent/scripts/__init__.py +5 -0
  22. abstractagent-0.3.1/src/abstractagent/scripts/lmstudio_tool_eval.py +426 -0
  23. {abstractagent-0.2.0 → abstractagent-0.3.1}/src/abstractagent/tools/__init__.py +9 -0
  24. abstractagent-0.3.1/src/abstractagent.egg-info/PKG-INFO +112 -0
  25. abstractagent-0.3.1/src/abstractagent.egg-info/SOURCES.txt +65 -0
  26. {abstractagent-0.2.0 → abstractagent-0.3.1}/src/abstractagent.egg-info/requires.txt +1 -1
  27. abstractagent-0.3.1/tests/test_active_context_policy_adoption.py +95 -0
  28. abstractagent-0.3.1/tests/test_agent_plan_review_modes.py +103 -0
  29. abstractagent-0.3.1/tests/test_agents_integration_llm.py +366 -0
  30. abstractagent-0.3.1/tests/test_base_agent_trace_accessors.py +76 -0
  31. abstractagent-0.3.1/tests/test_builtin_tool_specs_optional_defaults.py +22 -0
  32. abstractagent-0.3.1/tests/test_codeact_logic.py +44 -0
  33. abstractagent-0.3.1/tests/test_codeact_runtime_verifier_policy.py +49 -0
  34. abstractagent-0.3.1/tests/test_generation_params_media_policies.py +28 -0
  35. abstractagent-0.3.1/tests/test_llm_call_payload_requires_prompt_or_messages.py +84 -0
  36. abstractagent-0.3.1/tests/test_memact_session_memory.py +25 -0
  37. abstractagent-0.3.1/tests/test_memact_workflow.py +93 -0
  38. abstractagent-0.3.1/tests/test_memory_recall_tool.py +336 -0
  39. abstractagent-0.3.1/tests/test_open_attachment_tool_available.py +29 -0
  40. abstractagent-0.3.1/tests/test_react_active_attachments_disable_tools_first_iteration.py +144 -0
  41. abstractagent-0.3.1/tests/test_react_adapter_forwards_context_attachments_media.py +46 -0
  42. abstractagent-0.3.1/tests/test_react_delegate_agent_tool.py +85 -0
  43. abstractagent-0.3.1/tests/test_react_logic.py +94 -0
  44. abstractagent-0.3.1/tests/test_react_loop_context_transcript_levels.py +281 -0
  45. abstractagent-0.3.1/tests/test_react_loop_followthrough_retry.py +99 -0
  46. abstractagent-0.3.1/tests/test_react_loop_side_effect_dedupe_comms.py +77 -0
  47. abstractagent-0.3.1/tests/test_react_loop_truncated_output_retry.py +209 -0
  48. abstractagent-0.3.1/tests/test_react_max_iterations_concludes.py +186 -0
  49. abstractagent-0.3.1/tests/test_react_planish_heuristic.py +29 -0
  50. abstractagent-0.3.1/tests/test_react_workflow_system_prompt_and_tools_override.py +163 -0
  51. abstractagent-0.3.1/tests/test_react_workflow_toolset_refresh.py +73 -0
  52. abstractagent-0.3.1/tests/test_run_start_seeds_runtime_provider_model.py +49 -0
  53. abstractagent-0.3.1/tests/test_tool_observe_emits_result_for_tui.py +103 -0
  54. {abstractagent-0.2.0 → abstractagent-0.3.1}/tests/test_tools_editing.py +1 -3
  55. abstractagent-0.2.0/PKG-INFO +0 -134
  56. abstractagent-0.2.0/README.md +0 -121
  57. abstractagent-0.2.0/src/abstractagent/adapters/codeact_runtime.py +0 -397
  58. abstractagent-0.2.0/src/abstractagent/adapters/react_runtime.py +0 -390
  59. abstractagent-0.2.0/src/abstractagent/logic/builtins.py +0 -29
  60. abstractagent-0.2.0/src/abstractagent/logic/codeact.py +0 -166
  61. abstractagent-0.2.0/src/abstractagent/logic/react.py +0 -126
  62. abstractagent-0.2.0/src/abstractagent/repl.py +0 -457
  63. abstractagent-0.2.0/src/abstractagent/ui/__init__.py +0 -5
  64. abstractagent-0.2.0/src/abstractagent/ui/question.py +0 -197
  65. abstractagent-0.2.0/src/abstractagent.egg-info/PKG-INFO +0 -134
  66. abstractagent-0.2.0/src/abstractagent.egg-info/SOURCES.txt +0 -33
  67. {abstractagent-0.2.0 → abstractagent-0.3.1}/LICENSE +0 -0
  68. {abstractagent-0.2.0 → abstractagent-0.3.1}/setup.cfg +0 -0
  69. {abstractagent-0.2.0 → abstractagent-0.3.1}/src/abstractagent/__init__.py +0 -0
  70. {abstractagent-0.2.0 → abstractagent-0.3.1}/src/abstractagent/logic/types.py +0 -0
  71. {abstractagent-0.2.0 → abstractagent-0.3.1}/src/abstractagent/sandbox/__init__.py +0 -0
  72. {abstractagent-0.2.0 → abstractagent-0.3.1}/src/abstractagent/sandbox/interface.py +0 -0
  73. {abstractagent-0.2.0 → abstractagent-0.3.1}/src/abstractagent/sandbox/local.py +0 -0
  74. {abstractagent-0.2.0 → abstractagent-0.3.1}/src/abstractagent/tools/code_execution.py +0 -0
  75. {abstractagent-0.2.0 → abstractagent-0.3.1}/src/abstractagent/tools/self_improve.py +0 -0
  76. {abstractagent-0.2.0 → abstractagent-0.3.1}/src/abstractagent.egg-info/dependency_links.txt +0 -0
  77. {abstractagent-0.2.0 → abstractagent-0.3.1}/src/abstractagent.egg-info/entry_points.txt +0 -0
  78. {abstractagent-0.2.0 → abstractagent-0.3.1}/src/abstractagent.egg-info/top_level.txt +0 -0
  79. {abstractagent-0.2.0 → abstractagent-0.3.1}/tests/test_session_memory.py +0 -0
@@ -0,0 +1,112 @@
1
+ Metadata-Version: 2.4
2
+ Name: abstractagent
3
+ Version: 0.3.1
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]
9
+ Requires-Dist: abstractruntime
10
+ Provides-Extra: dev
11
+ Requires-Dist: pytest>=7.0; extra == "dev"
12
+ Dynamic: license-file
13
+
14
+ # AbstractAgent
15
+
16
+ Agent patterns (ReAct / CodeAct / MemAct) built on **AbstractRuntime** (durable execution) and **AbstractCore** (tools + LLM integration).
17
+
18
+ Start here: [`docs/getting-started.md`](docs/getting-started.md) (then [`docs/README.md`](docs/README.md) for the full index)
19
+
20
+ ## Documentation
21
+
22
+ - Getting started: [`docs/getting-started.md`](docs/getting-started.md)
23
+ - API reference: [`docs/api.md`](docs/api.md)
24
+ - FAQ / troubleshooting: [`docs/faq.md`](docs/faq.md)
25
+ - Architecture (diagrams): [`docs/architecture.md`](docs/architecture.md)
26
+ - Changelog: [`CHANGELOG.md`](CHANGELOG.md)
27
+ - Contributing: [`CONTRIBUTING.md`](CONTRIBUTING.md)
28
+ - Security: [`SECURITY.md`](SECURITY.md)
29
+ - Acknowledgements: [`ACKNOWLEDMENTS.md`](ACKNOWLEDMENTS.md)
30
+
31
+ ## What you get
32
+
33
+ - **ReAct**: tool-first Reason → Act → Observe loop
34
+ - **CodeAct**: executes Python (tool call or fenced ` ```python``` ` blocks)
35
+ - **MemAct**: memory-enhanced agent using runtime-owned Active Memory
36
+ - **Durable runs**: pause/resume via `run_id` + runtime stores
37
+ - **Tool control**: explicit tool bundles + per-run allowlists
38
+ - **Observability**: durable ledger of LLM calls, tool calls, and waits
39
+
40
+ ## Installation
41
+
42
+ From source (development):
43
+
44
+ ```bash
45
+ pip install -e .
46
+ ```
47
+
48
+ With dev dependencies:
49
+
50
+ ```bash
51
+ pip install -e ".[dev]"
52
+ ```
53
+
54
+ From PyPI:
55
+
56
+ ```bash
57
+ pip install abstractagent
58
+ ```
59
+
60
+ Note: the repository may be ahead of the latest published PyPI release. To verify what you installed:
61
+
62
+ ```bash
63
+ python -c "import importlib.metadata as md; print(md.version('abstractagent'))"
64
+ ```
65
+
66
+ ## Quick start (ReAct)
67
+
68
+ ```python
69
+ from abstractagent import create_react_agent
70
+
71
+ agent = create_react_agent(provider="ollama", model="qwen3:1.7b-q4_K_M")
72
+ agent.start("List the files in the current directory")
73
+ state = agent.run_to_completion()
74
+ print(state.output["answer"])
75
+ ```
76
+
77
+ ## Persistence (resume across restarts)
78
+
79
+ By default, the factory helpers use an in-memory runtime store. For resume across process restarts,
80
+ pass a persistent `RunStore`/`LedgerStore` (example below uses JSON files).
81
+
82
+ ```python
83
+ from abstractagent import create_react_agent
84
+ from abstractruntime.storage.json_files import JsonFileRunStore, JsonlLedgerStore
85
+
86
+ run_store = JsonFileRunStore(".runs")
87
+ ledger_store = JsonlLedgerStore(".runs")
88
+
89
+ agent = create_react_agent(run_store=run_store, ledger_store=ledger_store)
90
+ agent.start("Long running task")
91
+ agent.save_state("agent_state.json")
92
+
93
+ # ... later / after restart ...
94
+
95
+ agent2 = create_react_agent(run_store=run_store, ledger_store=ledger_store)
96
+ agent2.load_state("agent_state.json")
97
+ state = agent2.run_to_completion()
98
+ print(state.output["answer"])
99
+ ```
100
+
101
+ More details: [`docs/persistence.md`](docs/persistence.md)
102
+
103
+ ## CLI
104
+
105
+ This repository still installs a `react-agent` entrypoint, but it is **deprecated** and only prints a migration hint
106
+ (see `src/abstractagent/repl.py` and `pyproject.toml`).
107
+
108
+ Interactive UX lives in **AbstractCode**.
109
+
110
+ ## License
111
+
112
+ MIT (see `LICENSE`).
@@ -0,0 +1,99 @@
1
+ # AbstractAgent
2
+
3
+ Agent patterns (ReAct / CodeAct / MemAct) built on **AbstractRuntime** (durable execution) and **AbstractCore** (tools + LLM integration).
4
+
5
+ Start here: [`docs/getting-started.md`](docs/getting-started.md) (then [`docs/README.md`](docs/README.md) for the full index)
6
+
7
+ ## Documentation
8
+
9
+ - Getting started: [`docs/getting-started.md`](docs/getting-started.md)
10
+ - API reference: [`docs/api.md`](docs/api.md)
11
+ - FAQ / troubleshooting: [`docs/faq.md`](docs/faq.md)
12
+ - Architecture (diagrams): [`docs/architecture.md`](docs/architecture.md)
13
+ - Changelog: [`CHANGELOG.md`](CHANGELOG.md)
14
+ - Contributing: [`CONTRIBUTING.md`](CONTRIBUTING.md)
15
+ - Security: [`SECURITY.md`](SECURITY.md)
16
+ - Acknowledgements: [`ACKNOWLEDMENTS.md`](ACKNOWLEDMENTS.md)
17
+
18
+ ## What you get
19
+
20
+ - **ReAct**: tool-first Reason → Act → Observe loop
21
+ - **CodeAct**: executes Python (tool call or fenced ` ```python``` ` blocks)
22
+ - **MemAct**: memory-enhanced agent using runtime-owned Active Memory
23
+ - **Durable runs**: pause/resume via `run_id` + runtime stores
24
+ - **Tool control**: explicit tool bundles + per-run allowlists
25
+ - **Observability**: durable ledger of LLM calls, tool calls, and waits
26
+
27
+ ## Installation
28
+
29
+ From source (development):
30
+
31
+ ```bash
32
+ pip install -e .
33
+ ```
34
+
35
+ With dev dependencies:
36
+
37
+ ```bash
38
+ pip install -e ".[dev]"
39
+ ```
40
+
41
+ From PyPI:
42
+
43
+ ```bash
44
+ pip install abstractagent
45
+ ```
46
+
47
+ Note: the repository may be ahead of the latest published PyPI release. To verify what you installed:
48
+
49
+ ```bash
50
+ python -c "import importlib.metadata as md; print(md.version('abstractagent'))"
51
+ ```
52
+
53
+ ## Quick start (ReAct)
54
+
55
+ ```python
56
+ from abstractagent import create_react_agent
57
+
58
+ agent = create_react_agent(provider="ollama", model="qwen3:1.7b-q4_K_M")
59
+ agent.start("List the files in the current directory")
60
+ state = agent.run_to_completion()
61
+ print(state.output["answer"])
62
+ ```
63
+
64
+ ## Persistence (resume across restarts)
65
+
66
+ By default, the factory helpers use an in-memory runtime store. For resume across process restarts,
67
+ pass a persistent `RunStore`/`LedgerStore` (example below uses JSON files).
68
+
69
+ ```python
70
+ from abstractagent import create_react_agent
71
+ from abstractruntime.storage.json_files import JsonFileRunStore, JsonlLedgerStore
72
+
73
+ run_store = JsonFileRunStore(".runs")
74
+ ledger_store = JsonlLedgerStore(".runs")
75
+
76
+ agent = create_react_agent(run_store=run_store, ledger_store=ledger_store)
77
+ agent.start("Long running task")
78
+ agent.save_state("agent_state.json")
79
+
80
+ # ... later / after restart ...
81
+
82
+ agent2 = create_react_agent(run_store=run_store, ledger_store=ledger_store)
83
+ agent2.load_state("agent_state.json")
84
+ state = agent2.run_to_completion()
85
+ print(state.output["answer"])
86
+ ```
87
+
88
+ More details: [`docs/persistence.md`](docs/persistence.md)
89
+
90
+ ## CLI
91
+
92
+ This repository still installs a `react-agent` entrypoint, but it is **deprecated** and only prints a migration hint
93
+ (see `src/abstractagent/repl.py` and `pyproject.toml`).
94
+
95
+ Interactive UX lives in **AbstractCode**.
96
+
97
+ ## License
98
+
99
+ MIT (see `LICENSE`).
@@ -4,12 +4,12 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "abstractagent"
7
- version = "0.2.0"
7
+ version = "0.3.1"
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",
12
+ "abstractcore[tools]",
13
13
  "abstractruntime",
14
14
  ]
15
15
 
@@ -23,3 +23,10 @@ where = ["src"]
23
23
 
24
24
  [project.scripts]
25
25
  react-agent = "abstractagent.repl:main"
26
+
27
+ [tool.pytest.ini_options]
28
+ markers = [
29
+ "basic: Level A (contract/unit) tests",
30
+ "integration: Level B (integration/local) tests",
31
+ "e2e: Level C (end-to-end/real infra) tests (opt-in)",
32
+ ]
@@ -2,5 +2,6 @@
2
2
 
3
3
  from .codeact_runtime import create_codeact_workflow
4
4
  from .react_runtime import create_react_workflow
5
+ from .memact_runtime import create_memact_workflow
5
6
 
6
- __all__ = ["create_react_workflow", "create_codeact_workflow"]
7
+ __all__ = ["create_react_workflow", "create_codeact_workflow", "create_memact_workflow"]