A secure multi-agent framework by TBH.AI with enhanced security features, guardrails, and protection against AI attacks.
Project description
TBH Secure Agents
A secure multi-agent framework by TBH.AI with enhanced security features, guardrails, and protection against AI attacks.
Key Features
- Enhanced Security: Built-in protection against prompt injection, data leakage, and other AI security threats
- Guardrails: Dynamic control of expert behavior through template variables and conditional formatting
- Security Profiles: Predefined security configurations for different use cases
- Multi-Agent Collaboration: Coordinate multiple AI experts to solve complex problems
- Structured Outputs: Ensure consistent and reliable results
Installation
pip install tbh-secure-agents
Documentation
Full documentation, including installation instructions, usage guides, and details on the security features, can be found in the docs/ directory:
Quick Start
from tbh_secure_agents import Expert, Operation, Squad
import os
# Set your API key
api_key = os.environ.get('GOOGLE_API_KEY')
# Create experts with security profiles
researcher = Expert(
specialty="Research Expert specializing in {topic_area}",
objective="Research and analyze information about {specific_topic}",
background="You have extensive knowledge in {topic_area} research.",
security_profile="high_security",
api_key=api_key
)
writer = Expert(
specialty="Content Writer",
objective="Create engaging content based on research findings",
background="You excel at creating clear, concise content.",
security_profile="medium_security",
api_key=api_key
)
# Create operations with template variables
research_operation = Operation(
instructions="""
Research the topic of {specific_topic} within the field of {topic_area}.
Focus on recent developments and key concepts.
{depth, select,
basic:Provide a high-level overview suitable for beginners.|
intermediate:Include more detailed information for those with some knowledge.|
advanced:Provide in-depth analysis for experts in the field.
}
""",
output_format="A comprehensive research summary with key findings",
expert=researcher
)
writing_operation = Operation(
instructions="""
Based on the research findings, create a {content_type} about {specific_topic}.
{tone, select,
formal:Use a professional, academic tone.|
conversational:Use a friendly, approachable tone.|
technical:Use precise technical language.
}
The content should be suitable for a {audience_level} audience.
""",
output_format="A well-structured {content_type} with clear sections",
expert=writer
)
# Create a squad with the experts and operations
research_squad = Squad(
experts=[researcher, writer],
operations=[research_operation, writing_operation],
process="sequential",
security_level="high"
)
# Define guardrail inputs
guardrail_inputs = {
"topic_area": "artificial intelligence",
"specific_topic": "large language models",
"depth": "intermediate",
"content_type": "blog post",
"tone": "conversational",
"audience_level": "general"
}
# Deploy the squad with guardrails
result = research_squad.deploy(guardrails=guardrail_inputs)
print(result)
Contributing
Contributions are welcome! Please see the CONTRIBUTING.md file (to be created) and refer to the documentation in the docs/ directory for project structure and goals.
License
This project is licensed under the Apache License 2.0 - see the LICENSE file for details.
Contact
TBH.AI Saish - saish.shinde15@gmail.com
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 tbh_secure_agents-0.2.2.tar.gz.
File metadata
- Download URL: tbh_secure_agents-0.2.2.tar.gz
- Upload date:
- Size: 20.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b8ffd8cbde4bc1a0c7f246adb70b72fbd38d716d58146a4558ad653d183646d1
|
|
| MD5 |
7e0559b2363f30ab214dd1cb68f9c41b
|
|
| BLAKE2b-256 |
fbc4772daf7bced34e3932e02cdb80e0286e00570f6c604b0bbe9aadca1ec43b
|
File details
Details for the file tbh_secure_agents-0.2.2-py3-none-any.whl.
File metadata
- Download URL: tbh_secure_agents-0.2.2-py3-none-any.whl
- Upload date:
- Size: 22.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f9e1c377dbffe84a78c487250386410af5ec762f704ebed2fdd32e6e55ea1e94
|
|
| MD5 |
450b34e40941840422ecdcb2fcbf8354
|
|
| BLAKE2b-256 |
25c503913c5b5a8288528a868c8a79762f6975d86523c0822392f51252f24973
|