abstractagent 0.3.0__py3-none-any.whl → 0.3.1__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.
- abstractagent/adapters/codeact_runtime.py +86 -5
- abstractagent/adapters/generation_params.py +82 -0
- abstractagent/adapters/media.py +45 -0
- abstractagent/adapters/memact_runtime.py +248 -10
- abstractagent/adapters/react_runtime.py +1092 -917
- abstractagent/agents/base.py +31 -0
- abstractagent/agents/codeact.py +36 -0
- abstractagent/agents/memact.py +37 -1
- abstractagent/agents/react.py +44 -6
- abstractagent/logic/builtins.py +58 -0
- abstractagent/logic/codeact.py +4 -1
- abstractagent/logic/memact.py +2 -1
- abstractagent/logic/react.py +37 -56
- abstractagent/tools/__init__.py +6 -0
- abstractagent-0.3.1.dist-info/METADATA +112 -0
- abstractagent-0.3.1.dist-info/RECORD +33 -0
- {abstractagent-0.3.0.dist-info → abstractagent-0.3.1.dist-info}/WHEEL +1 -1
- abstractagent-0.3.0.dist-info/METADATA +0 -133
- abstractagent-0.3.0.dist-info/RECORD +0 -31
- {abstractagent-0.3.0.dist-info → abstractagent-0.3.1.dist-info}/entry_points.txt +0 -0
- {abstractagent-0.3.0.dist-info → abstractagent-0.3.1.dist-info}/licenses/LICENSE +0 -0
- {abstractagent-0.3.0.dist-info → abstractagent-0.3.1.dist-info}/top_level.txt +0 -0
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
abstractagent/__init__.py,sha256=-o1xKOyT3rhA67Iey2RCeZzU5SiFLB1mX4F2tAKH98Y,948
|
|
2
|
+
abstractagent/repl.py,sha256=6TWVxEYAAXLR5jjrc3FKmEy4Sm4xzdX5REQKx-lH35g,1089
|
|
3
|
+
abstractagent/adapters/__init__.py,sha256=k_7Lz8nOoMHmGeYrSbIMtLXIvmqJTzOo33g7v8C-qrM,284
|
|
4
|
+
abstractagent/adapters/codeact_runtime.py,sha256=wxFocTOIVAtHujnVH92hVjiPbsisq1AzQkyMzimzfao,52842
|
|
5
|
+
abstractagent/adapters/generation_params.py,sha256=hWAn13Nj30-hItL_3IjvoALX7q77TJ70U1qFj2a5Y7k,2958
|
|
6
|
+
abstractagent/adapters/media.py,sha256=BSNfLswkKIzy9C9d3FwfphHj3JsdAJlUVW3phC9mR44,1295
|
|
7
|
+
abstractagent/adapters/memact_runtime.py,sha256=g0yC4ZXU41lNxqju2OzVxMWz7PyvxdbRRuR0mazLqjc,40179
|
|
8
|
+
abstractagent/adapters/react_runtime.py,sha256=skt4jb9_LIFYUngWdWHItj-lpced5NCMOvWzfWDEx2w,67534
|
|
9
|
+
abstractagent/agents/__init__.py,sha256=9U15lIVgGBZVsmDCKtz4AyTJFTI3nUq4ej8Ugk8lvhM,548
|
|
10
|
+
abstractagent/agents/base.py,sha256=KnexFUCPBFNm7gBrlvDcCfCNigw4YdoQn5rowbk2ivs,18075
|
|
11
|
+
abstractagent/agents/codeact.py,sha256=knqr-ABRDrT4O9kJMJ_YjT36tqN7kWI6L8Fd3MUvT78,11112
|
|
12
|
+
abstractagent/agents/memact.py,sha256=6Z3h4tpFndInSci1_j0J7vo8LW_ENhc3Vmbg6WwPVpg,10082
|
|
13
|
+
abstractagent/agents/react.py,sha256=6sbVsRhXe696WhRXmQUQNou7f1zLBpg5b6PIXwDs9xI,11668
|
|
14
|
+
abstractagent/logic/__init__.py,sha256=QeUxFEyaoi4ymPVEwno1mirBpMP77EtWJa-pTHakY2g,524
|
|
15
|
+
abstractagent/logic/builtins.py,sha256=9gy6oiOjczCnmh5IHin-Oyeqm4D6egZWeFL-p0Ddbok,11296
|
|
16
|
+
abstractagent/logic/codeact.py,sha256=dnPCHXqxO1JajrBeq_AAC8IbrXKL-CrA4InETySTdNg,7075
|
|
17
|
+
abstractagent/logic/memact.py,sha256=xaPfbeVlEMTveDL5FU4HkBeehIGb3D_-a2SY_pXW2yI,5023
|
|
18
|
+
abstractagent/logic/react.py,sha256=AyNYCfingqlbzIXb8M5j6BBmajVHYO3yZqQepCORWpk,7805
|
|
19
|
+
abstractagent/logic/types.py,sha256=idLhxgBaN3LY7tDmwMNL9hgWCKM5P1BRNv5YYkXMy80,595
|
|
20
|
+
abstractagent/sandbox/__init__.py,sha256=Vay_BJzmfMcf-cAUoapDbckCyhHGQHFzObVR98x2j3g,186
|
|
21
|
+
abstractagent/sandbox/interface.py,sha256=DtL_RYaXgPojW-vUIgEPi_69sleSNQU-YCWrwZ_WSoI,462
|
|
22
|
+
abstractagent/sandbox/local.py,sha256=mFQzFgec0qgJ8VNbB0ZjeZi58BgrIE0frMFsasKe3iI,2143
|
|
23
|
+
abstractagent/scripts/__init__.py,sha256=paHuNvq6FzV1nVyGV-ixPW8K1rumoLpSvwcMIbP0y8U,130
|
|
24
|
+
abstractagent/scripts/lmstudio_tool_eval.py,sha256=FX_rvbLFY0KeT38i2e4p6htffzEiAR1mBXQhd6dK3zE,16568
|
|
25
|
+
abstractagent/tools/__init__.py,sha256=p0msxgQCB2p_eB5d5Jk0lnGyA2-BXmqozAY-Od0zDq4,1358
|
|
26
|
+
abstractagent/tools/code_execution.py,sha256=rQBJXfTGdCxVSr7SqTH17mQ9ylImNDcT5R7_bBIvygA,1417
|
|
27
|
+
abstractagent/tools/self_improve.py,sha256=yOtsa0iS5OxVPLpu3MN_fPxPTEMl3Qnm1GWYJHFsZe8,1732
|
|
28
|
+
abstractagent-0.3.1.dist-info/licenses/LICENSE,sha256=6rL4UIO5IdK59THf7fx0q6Hmxp5grSFi7-kWLcczseA,1083
|
|
29
|
+
abstractagent-0.3.1.dist-info/METADATA,sha256=O3LTdZj2V_xJm4PBoEoGPPEcexBezrI0OnQ5scX1kDo,3309
|
|
30
|
+
abstractagent-0.3.1.dist-info/WHEEL,sha256=wUyA8OaulRlbfwMtmQsvNngGrxQHAvkKcvRmdizlJi0,92
|
|
31
|
+
abstractagent-0.3.1.dist-info/entry_points.txt,sha256=tEaR0KtY-chcgRTd6ZVkvsqqaDpw2rvi-1RFktHGczU,56
|
|
32
|
+
abstractagent-0.3.1.dist-info/top_level.txt,sha256=cgtC3Vjz_piTAMmRkd73tbUxk2jPeG3IxMbo7JK3RTU,14
|
|
33
|
+
abstractagent-0.3.1.dist-info/RECORD,,
|
|
@@ -1,133 +0,0 @@
|
|
|
1
|
-
Metadata-Version: 2.4
|
|
2
|
-
Name: abstractagent
|
|
3
|
-
Version: 0.3.0
|
|
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 implementations using AbstractRuntime and AbstractCore.
|
|
17
|
-
|
|
18
|
-
## Features
|
|
19
|
-
|
|
20
|
-
- **ReAct Agent**: Reason-Act-Observe loop with tool calling
|
|
21
|
-
- **Host UX in AbstractCode**: the interactive terminal shell lives in **AbstractCode**; AbstractAgent stays focused on agent patterns/workflows
|
|
22
|
-
- **Pause/Resume**: Durable agent state with interrupt/resume capability
|
|
23
|
-
- **Ask User**: Agent can ask questions with multiple choice + free text
|
|
24
|
-
- **Ledger Recording**: All tool calls recorded for auditability
|
|
25
|
-
|
|
26
|
-
## Installation
|
|
27
|
-
|
|
28
|
-
```bash
|
|
29
|
-
pip install -e .
|
|
30
|
-
```
|
|
31
|
-
|
|
32
|
-
## Quick Start
|
|
33
|
-
|
|
34
|
-
### Simple (Factory)
|
|
35
|
-
|
|
36
|
-
```python
|
|
37
|
-
from abstractagent import create_react_agent
|
|
38
|
-
|
|
39
|
-
# One-liner agent creation
|
|
40
|
-
agent = create_react_agent()
|
|
41
|
-
agent.start("List the files in the current directory")
|
|
42
|
-
state = agent.run_to_completion()
|
|
43
|
-
print(state.output["answer"])
|
|
44
|
-
```
|
|
45
|
-
|
|
46
|
-
### With Custom Tools
|
|
47
|
-
|
|
48
|
-
```python
|
|
49
|
-
from abstractagent import create_react_agent
|
|
50
|
-
from abstractcore.tools import tool
|
|
51
|
-
|
|
52
|
-
@tool(name="my_tool", description="My custom tool")
|
|
53
|
-
def my_tool(query: str) -> str:
|
|
54
|
-
"""My custom tool."""
|
|
55
|
-
return f"Result for {query}"
|
|
56
|
-
|
|
57
|
-
agent = create_react_agent(tools=[my_tool])
|
|
58
|
-
```
|
|
59
|
-
|
|
60
|
-
### Full Control
|
|
61
|
-
|
|
62
|
-
```python
|
|
63
|
-
from abstractruntime.integrations.abstractcore import create_local_runtime
|
|
64
|
-
from abstractagent import ReactAgent, list_files, read_file
|
|
65
|
-
|
|
66
|
-
# Create runtime
|
|
67
|
-
runtime = create_local_runtime(
|
|
68
|
-
provider="ollama",
|
|
69
|
-
model="qwen3:4b-instruct-2507-q4_K_M",
|
|
70
|
-
)
|
|
71
|
-
|
|
72
|
-
# Create agent with specific tools
|
|
73
|
-
agent = ReactAgent(
|
|
74
|
-
runtime=runtime,
|
|
75
|
-
tools=[list_files, read_file],
|
|
76
|
-
)
|
|
77
|
-
|
|
78
|
-
agent.start("List the files in the current directory")
|
|
79
|
-
state = agent.run_to_completion()
|
|
80
|
-
print(state.output["answer"])
|
|
81
|
-
```
|
|
82
|
-
|
|
83
|
-
## State Persistence
|
|
84
|
-
|
|
85
|
-
Resume agents across process restarts:
|
|
86
|
-
|
|
87
|
-
```python
|
|
88
|
-
agent = create_react_agent()
|
|
89
|
-
agent.start("Long running task")
|
|
90
|
-
|
|
91
|
-
# Save state before exit
|
|
92
|
-
agent.save_state("agent_state.json")
|
|
93
|
-
|
|
94
|
-
# ... process restarts ...
|
|
95
|
-
|
|
96
|
-
# Load and resume
|
|
97
|
-
agent = create_react_agent()
|
|
98
|
-
agent.load_state("agent_state.json")
|
|
99
|
-
state = agent.run_to_completion()
|
|
100
|
-
|
|
101
|
-
# Cleanup
|
|
102
|
-
agent.clear_state("agent_state.json")
|
|
103
|
-
```
|
|
104
|
-
|
|
105
|
-
## Interactive Shell (AbstractCode)
|
|
106
|
-
|
|
107
|
-
```bash
|
|
108
|
-
# The interactive REPL moved to AbstractCode (host UX).
|
|
109
|
-
abstractcode --agent react --provider ollama --model qwen3:4b-instruct-2507-q4_K_M
|
|
110
|
-
```
|
|
111
|
-
|
|
112
|
-
## Architecture
|
|
113
|
-
|
|
114
|
-
```
|
|
115
|
-
AbstractAgent
|
|
116
|
-
│
|
|
117
|
-
├── Uses AbstractRuntime for durable execution
|
|
118
|
-
│ - Workflows survive crashes
|
|
119
|
-
│ - Pause/resume capability
|
|
120
|
-
│ - Ledger tracks all actions (LLM calls, tool calls)
|
|
121
|
-
│
|
|
122
|
-
└── Uses AbstractCore for LLM/tools
|
|
123
|
-
- Provider-agnostic LLM calls
|
|
124
|
-
- Tool registration and execution
|
|
125
|
-
- Tool call parsing for all model architectures
|
|
126
|
-
```
|
|
127
|
-
|
|
128
|
-
## Available Tools
|
|
129
|
-
|
|
130
|
-
- Default tool callables are re-exported from AbstractCore in `abstractagent.tools` (file ops, web tools, `execute_command`), plus:
|
|
131
|
-
- `execute_python(code, timeout_s=...)`
|
|
132
|
-
- `self_improve(suggestion, ...)`
|
|
133
|
-
- The agent also exposes schema-only built-ins (`ask_user`, `recall_memory`, `inspect_vars`, `remember`, `compact_memory`) which are translated into **Runtime effects** by the workflow adapters (durable; no callable persistence).
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
abstractagent/__init__.py,sha256=-o1xKOyT3rhA67Iey2RCeZzU5SiFLB1mX4F2tAKH98Y,948
|
|
2
|
-
abstractagent/repl.py,sha256=6TWVxEYAAXLR5jjrc3FKmEy4Sm4xzdX5REQKx-lH35g,1089
|
|
3
|
-
abstractagent/adapters/__init__.py,sha256=k_7Lz8nOoMHmGeYrSbIMtLXIvmqJTzOo33g7v8C-qrM,284
|
|
4
|
-
abstractagent/adapters/codeact_runtime.py,sha256=VkmU1LO-5kr6GtKl4S7IeOorbOtE1GUtc6wGmbPzVEk,48774
|
|
5
|
-
abstractagent/adapters/memact_runtime.py,sha256=o_IuAIZTK_Nafp0hNwWBiPBSuyfRzU7SqL9rCuKCekg,29567
|
|
6
|
-
abstractagent/adapters/react_runtime.py,sha256=XEJlAoh3E9cgLfF8D2bDVgdp2Ya0l8RxxM6AGJ4gS4E,63871
|
|
7
|
-
abstractagent/agents/__init__.py,sha256=9U15lIVgGBZVsmDCKtz4AyTJFTI3nUq4ej8Ugk8lvhM,548
|
|
8
|
-
abstractagent/agents/base.py,sha256=HfGvkD24lBCEDbhwjDf4vtmrxti_fyrhMW3AjP12eu0,16745
|
|
9
|
-
abstractagent/agents/codeact.py,sha256=lvt_kgT3DuqOHeOPEyKTzm7H3mbBEk6tiMwMzGcQjIg,9680
|
|
10
|
-
abstractagent/agents/memact.py,sha256=tHemdUSC7vZUFFUznZ0FEJMOnjRZQU9oIx-FiR7FGN8,8648
|
|
11
|
-
abstractagent/agents/react.py,sha256=vxS2vna_gANvGhrEzAUOIfWJljbHeFAZt5tE846Lvp4,10107
|
|
12
|
-
abstractagent/logic/__init__.py,sha256=QeUxFEyaoi4ymPVEwno1mirBpMP77EtWJa-pTHakY2g,524
|
|
13
|
-
abstractagent/logic/builtins.py,sha256=I2IMrTIZmy0j9xOJkuOxgpu4fUMy6cwvdyy545a_HRI,8605
|
|
14
|
-
abstractagent/logic/codeact.py,sha256=BphuRhGL4T0QCoD6fcVDhgx3TQG5Vl4c-L6iKfeI-9o,6480
|
|
15
|
-
abstractagent/logic/memact.py,sha256=v6v5vV79nJvALpvl8vXJJhRY_j0GaM22t6sJAGN661A,4753
|
|
16
|
-
abstractagent/logic/react.py,sha256=SHU1YUE8uT_uuvq7CH2zY51rozAtHtVutS4NICJvep0,8154
|
|
17
|
-
abstractagent/logic/types.py,sha256=idLhxgBaN3LY7tDmwMNL9hgWCKM5P1BRNv5YYkXMy80,595
|
|
18
|
-
abstractagent/sandbox/__init__.py,sha256=Vay_BJzmfMcf-cAUoapDbckCyhHGQHFzObVR98x2j3g,186
|
|
19
|
-
abstractagent/sandbox/interface.py,sha256=DtL_RYaXgPojW-vUIgEPi_69sleSNQU-YCWrwZ_WSoI,462
|
|
20
|
-
abstractagent/sandbox/local.py,sha256=mFQzFgec0qgJ8VNbB0ZjeZi58BgrIE0frMFsasKe3iI,2143
|
|
21
|
-
abstractagent/scripts/__init__.py,sha256=paHuNvq6FzV1nVyGV-ixPW8K1rumoLpSvwcMIbP0y8U,130
|
|
22
|
-
abstractagent/scripts/lmstudio_tool_eval.py,sha256=FX_rvbLFY0KeT38i2e4p6htffzEiAR1mBXQhd6dK3zE,16568
|
|
23
|
-
abstractagent/tools/__init__.py,sha256=wDoWaQ2XqvLChMuXhQspXrdb-RyFWtBp6HQbUM3gGMc,1252
|
|
24
|
-
abstractagent/tools/code_execution.py,sha256=rQBJXfTGdCxVSr7SqTH17mQ9ylImNDcT5R7_bBIvygA,1417
|
|
25
|
-
abstractagent/tools/self_improve.py,sha256=yOtsa0iS5OxVPLpu3MN_fPxPTEMl3Qnm1GWYJHFsZe8,1732
|
|
26
|
-
abstractagent-0.3.0.dist-info/licenses/LICENSE,sha256=6rL4UIO5IdK59THf7fx0q6Hmxp5grSFi7-kWLcczseA,1083
|
|
27
|
-
abstractagent-0.3.0.dist-info/METADATA,sha256=mgdP9LfNgeQ5HOqUVLx7RijgHBWNUzc2kjtHrrRDI8A,3513
|
|
28
|
-
abstractagent-0.3.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
29
|
-
abstractagent-0.3.0.dist-info/entry_points.txt,sha256=tEaR0KtY-chcgRTd6ZVkvsqqaDpw2rvi-1RFktHGczU,56
|
|
30
|
-
abstractagent-0.3.0.dist-info/top_level.txt,sha256=cgtC3Vjz_piTAMmRkd73tbUxk2jPeG3IxMbo7JK3RTU,14
|
|
31
|
-
abstractagent-0.3.0.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|