CRUD tools and structured-IO for HACS
Project description
HACS Tools
CRUD tools and protocol adapters for Healthcare Agent Communication Standard (HACS).
Overview
hacs-tools provides essential tools for working with HACS data, including CRUD operations, protocol adapters, and integration utilities for various agent frameworks and healthcare systems.
Key Components
CRUD Operations
- Create, Read, Update, Delete operations for all HACS models
- Bulk operations for efficient data processing
- Transaction support and rollback capabilities
- Data validation and integrity checks
Protocol Adapters
- MCP Adapter: Model Context Protocol integration
- A2A Adapter: Agent-to-Agent communication
- AG-UI Adapter: Agent-UI interface integration
- LangGraph Adapter: LangGraph workflow integration
- CrewAI Adapter: CrewAI framework integration
Search and Retrieval
- Semantic search capabilities
- Structured query interface
- Full-text search with medical terminology
- Faceted search and filtering
Memory Management
- Persistent memory storage
- Memory retrieval and querying
- Cross-agent memory sharing
- Memory lifecycle management
Installation
pip install hacs-tools
Quick Start
from hacs_tools import HACScrud, MCPAdapter, SemanticSearch
from hacs_models import Patient, Observation
# CRUD operations
crud = HACScrud()
# Create a patient
patient = Patient(display_name="Alice Johnson")
patient_id = crud.create_patient(patient)
# Read patient
retrieved_patient = crud.get_patient(patient_id)
# Update patient
retrieved_patient.display_name = "Alice Johnson-Smith"
crud.update_patient(retrieved_patient)
# Search functionality
search = SemanticSearch()
results = search.find_patients(query="hypertension", limit=10)
# Protocol adapter usage
mcp_adapter = MCPAdapter()
mcp_adapter.register_tool("get_patient", crud.get_patient)
mcp_adapter.start_server()
Protocol Adapters
MCP Adapter
from hacs_tools.adapters import MCPAdapter
adapter = MCPAdapter()
adapter.register_tool("search_patients", search.find_patients)
adapter.register_tool("get_observations", crud.get_observations)
adapter.start_server(port=8080)
LangGraph Adapter
from hacs_tools.adapters import LangGraphAdapter
adapter = LangGraphAdapter()
workflow = adapter.create_clinical_workflow()
result = workflow.run(patient_data=patient)
CrewAI Adapter
from hacs_tools.adapters import CrewAIAdapter
adapter = CrewAIAdapter()
crew = adapter.create_medical_crew()
result = crew.kickoff(inputs={"patient": patient})
Advanced Features
Bulk Operations
# Bulk create patients
patients = [Patient(display_name=f"Patient {i}") for i in range(100)]
patient_ids = crud.bulk_create_patients(patients)
# Bulk update observations
observations = crud.get_observations(patient_ids=patient_ids)
crud.bulk_update_observations(observations)
Memory Management
from hacs_tools import MemoryManager
memory = MemoryManager()
memory.store("patient_history", patient_data)
history = memory.retrieve("patient_history")
Documentation
For complete documentation, see the HACS Documentation.
License
Licensed under the Apache License, Version 2.0. See LICENSE for details.
Contributing
See Contributing Guidelines for information on how to contribute to HACS Tools.
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 hacs_tools-0.1.0.tar.gz.
File metadata
- Download URL: hacs_tools-0.1.0.tar.gz
- Upload date:
- Size: 42.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
dd160eccf5bdbe7210bda1cedb4a988e75cc179236a139e309fb475c8aaa0677
|
|
| MD5 |
d4820d2f656b8feb48b9303970c4a9fe
|
|
| BLAKE2b-256 |
c9ddc85f654678530189e512bc9d655bba56618e9281594e31bb50974fb80205
|
File details
Details for the file hacs_tools-0.1.0-py3-none-any.whl.
File metadata
- Download URL: hacs_tools-0.1.0-py3-none-any.whl
- Upload date:
- Size: 53.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
620ea79e8fa131b5a8f1b2abf640ed980491dd2ace8748b7707d26f1a5cbab3a
|
|
| MD5 |
6eb67521b2a888bf9bb46ea10d169fa0
|
|
| BLAKE2b-256 |
4a23d15f3453574a1d58fcccd1607afcf6ea2a4e89f718c2757c20b9a33a68d5
|