Lightweight core primitives and builders for assembling agent workflows with langchain and langgraph.
This package provides Node implementations, state types, builders, and a small factory pattern to compose StateGraph-based agents used by the broader assistant projects.
Requirements: Python 3.12 and Poetry.
Clone and install (including dev dependencies):
git clone git@github.com:your-org/assistant_core.git
cd assistant_core
poetry installRun tests:
make test
# or
poetry run pytestInstall and run pre-commit hooks (pre-commit hooks call the Poetry-installed tools):
make pre-commitSee CONTRIBUTING.md for full contributor guidance. Common developer commands:
- Install dependencies:
make install - Format code:
make format - Lint checks:
make lint - Run tests:
make test - Install and run pre-commit hooks:
make pre-commit
Notes
- Pre-commit hooks in this repo are configured to call the Poetry-installed tools (black, isort, flake8). Make sure to run
make installbeforemake pre-commit.
assistant_core/— main packagenodes/— Node implementations and mixinsbuilder.py— Director/Builder for StateGraph compositionfactories.py— BaseAgentFactory (extension point)models.py— model adapter loaderstate.py— typed state classes used by nodes
Extension points
- Implement a subclass of
BaseAgentFactoryto provide a model and tools. - Add new Node types under
assistant_core/nodes/.
- If pre-commit or hooks report missing commands, run
make installto ensure dev dependencies are available.
This project is licensed under the MIT License — see LICENSE for details.