Agent implementations using AbstractRuntime and AbstractCore
Project description
AbstractAgent
Agent patterns (ReAct / CodeAct / MemAct) built on AbstractRuntime (durable execution) and AbstractCore (tools + LLM integration).
Start here: docs/getting-started.md (then docs/README.md for the full index)
Documentation
- Getting started:
docs/getting-started.md - API reference:
docs/api.md - FAQ / troubleshooting:
docs/faq.md - Architecture (diagrams):
docs/architecture.md - Changelog:
CHANGELOG.md - Contributing:
CONTRIBUTING.md - Security:
SECURITY.md - Acknowledgements:
ACKNOWLEDMENTS.md
What you get
- ReAct: tool-first Reason → Act → Observe loop
- CodeAct: executes Python (tool call or fenced
```python```blocks) - MemAct: memory-enhanced agent using runtime-owned Active Memory
- Durable runs: pause/resume via
run_id+ runtime stores - Tool control: explicit tool bundles + per-run allowlists
- Observability: durable ledger of LLM calls, tool calls, and waits
Installation
From source (development):
pip install -e .
With dev dependencies:
pip install -e ".[dev]"
From PyPI:
pip install abstractagent
Note: the repository may be ahead of the latest published PyPI release. To verify what you installed:
python -c "import importlib.metadata as md; print(md.version('abstractagent'))"
Quick start (ReAct)
from abstractagent import create_react_agent
agent = create_react_agent(provider="ollama", model="qwen3:1.7b-q4_K_M")
agent.start("List the files in the current directory")
state = agent.run_to_completion()
print(state.output["answer"])
Persistence (resume across restarts)
By default, the factory helpers use an in-memory runtime store. For resume across process restarts,
pass a persistent RunStore/LedgerStore (example below uses JSON files).
from abstractagent import create_react_agent
from abstractruntime.storage.json_files import JsonFileRunStore, JsonlLedgerStore
run_store = JsonFileRunStore(".runs")
ledger_store = JsonlLedgerStore(".runs")
agent = create_react_agent(run_store=run_store, ledger_store=ledger_store)
agent.start("Long running task")
agent.save_state("agent_state.json")
# ... later / after restart ...
agent2 = create_react_agent(run_store=run_store, ledger_store=ledger_store)
agent2.load_state("agent_state.json")
state = agent2.run_to_completion()
print(state.output["answer"])
More details: docs/persistence.md
CLI
This repository still installs a react-agent entrypoint, but it is deprecated and only prints a migration hint
(see src/abstractagent/repl.py and pyproject.toml).
Interactive UX lives in AbstractCode.
License
MIT (see LICENSE).
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file abstractagent-0.3.1.tar.gz.
File metadata
- Download URL: abstractagent-0.3.1.tar.gz
- Upload date:
- Size: 82.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
63e1396219c98bae0057f1ab2865ca4f95a496b1cf966dc4dfb39c652a53989c
|
|
| MD5 |
d9c3249e0485069cece34ae19c11b9cf
|
|
| BLAKE2b-256 |
5da811aea9226efe157366b2e1f5d8a60a03ec557e88b6b39d91a44eebd14caf
|
File details
Details for the file abstractagent-0.3.1-py3-none-any.whl.
File metadata
- Download URL: abstractagent-0.3.1-py3-none-any.whl
- Upload date:
- Size: 78.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9c24bebb6665228ad0369eae46235356eb1263cdbc9cd35fa51e09b39235c19a
|
|
| MD5 |
a04c4b19b4db132b71ddeeb662475ab1
|
|
| BLAKE2b-256 |
b7ed4500488bd2e8e02fd152ce5c32bf0c2da254555f07643b7ec24e8885bac9
|