Grasp Agents Library
Project description
grasp_agents
Overview
grasp-agents is a modular Python framework for building agentic AI pipelines and applications. It provides reusable agent classes, message handling, LLM integration, memory, and orchestration utilities. The framework is designed for flexibility, composability, and clarity, enabling rapid prototyping and robust development of multi-agent systems.
Features
- Modular agent base classes
- Message and memory management
- LLM and tool orchestration
- Logging and usage tracking
- Extensible architecture
Project Structure
src/grasp_agents/— Core framework modulesbase_agent.py,llm_agent.py,comm_agent.py: Agent classesagent_message.py,agent_message_pool.py: Messagingmemory.py: Memory managementcloud_llm.py,llm.py: LLM integrationtool_orchestrator.py: Tool orchestrationusage_tracker.py,grasp_logging.py: Usage and loggingdata_retrieval/,openai/,typing/,workflow/: Extensions and utilities
configs/— Configuration filesdata/— Logs and datasets
Quickstart & Installation Variants
Option 1: UV Package Manager Project
1. Prerequisites
Install the UV Package Manager:
curl -LsSf https://astral.sh/uv/install.sh | sh
2. Create Project & Install Dependencies
mkdir my-test-uv-app
cd my-test-uv-app
uv init .
Create and activate a virtual environment:
uv venv
source .venv/bin/activate
Add and sync dependencies:
uv add grasp_agents
uv sync
3. Example Usage
Create a file, e.g., hello.py:
from grasp_agents.llm_agent import LLMAgent
from grasp_agents.base_agent import BaseAgentConfig
agent = LLMAgent(
config=BaseAgentConfig(
model="gpt-4o-mini",
memory=None, # or your memory implementation
)
)
response = agent.run("Hello, agent!")
print(response)
Run your script:
python hello.py
Option 2: PIP-only (requirements.txt-based) Project
1. Create Project Folder
mkdir my-test-pip-app
cd my-test-pip-app
2. Install Python 3.11.9 (Recommended)
If using pyenv:
brew install pyenv
pyenv install 3.11.9
pyenv local 3.11.9
Open a new terminal after setting the Python version.
3. Create & Activate Virtual Environment
python -m venv .venv
source .venv/bin/activate
If you see ModuleNotFoundError: No module named 'yaml', run:
pip install pyyaml
4. Install Grasp Agents SDK
If you have a requirements.txt:
pip install -r requirements.txt
Or install directly:
pip install grasp-agents
5. Example Usage
Create a file, e.g., hello.py, and use the same code as above.
6. Run the App
python hello.py
License
MIT License. See LICENSE for details.
Development
To develop and test the library locally, follow these steps:
1. Install UV Package Manager
Make sure UV is installed on your system:
curl -LsSf https://astral.sh/uv/install.sh | sh
2. Install Dependencies
Create a new virtual environment and install dependencies:
uv venv
source .venv/bin/activate
uv sync
3. Test Example
- Install the Jupyter Notebook extension for VS Code.
- Open
src/grasp_agents/examples/notebooks/agents_demo.ipynbin VS Code. - Ensure you have a
.envfile with your OpenAI and Google AI Studio API keys set (see.env.example).
You're now ready to run and experiment with the example notebook.
Project details
Release history Release notifications | RSS feed
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 grasp_agents-0.1.7.tar.gz.
File metadata
- Download URL: grasp_agents-0.1.7.tar.gz
- Upload date:
- Size: 31.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.7.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e1be61c9ec0fb4fbcb0a2d930daae5f8dc8e242c9383caea4160d3f472d209fb
|
|
| MD5 |
7517838d0b569cbac7f5e7b705611a25
|
|
| BLAKE2b-256 |
02c38a598b7b83ba1278eff3a1834e354ecdc47337ec23c6d1e5dd1abe159ad5
|
File details
Details for the file grasp_agents-0.1.7-py3-none-any.whl.
File metadata
- Download URL: grasp_agents-0.1.7-py3-none-any.whl
- Upload date:
- Size: 46.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.7.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3c7610f0579329ba16430e3ff28b8d8c0bb1bb8d724ba91bf205d2c6edc7721c
|
|
| MD5 |
e78c3666d7c8c4ec31ad6780c59c6cf1
|
|
| BLAKE2b-256 |
f3eff9756a2db2517557b1472b01fb62d900bc9be7d6053b3dc4fb04998f871d
|