Skip to main content

A secure multi-agent framework by TBH.AI with enhanced security features, guardrails, and protection against AI attacks.

Project description

TBH Secure Agents

Main

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

tbh_secure_agents-0.2.0.tar.gz (17.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

tbh_secure_agents-0.2.0-py3-none-any.whl (19.2 kB view details)

Uploaded Python 3

File details

Details for the file tbh_secure_agents-0.2.0.tar.gz.

File metadata

  • Download URL: tbh_secure_agents-0.2.0.tar.gz
  • Upload date:
  • Size: 17.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.10

File hashes

Hashes for tbh_secure_agents-0.2.0.tar.gz
Algorithm Hash digest
SHA256 a544071843a8c3c751bad3bb15843c128329cdc8dd4c80b46e86b82cb38cff02
MD5 fb7dfb3f8c22ec39d786b1ff34b3ec6c
BLAKE2b-256 f1022f1427c6a5c0bcf15836a6a8c040369def1041d622c21bf56ebcafc08aec

See more details on using hashes here.

File details

Details for the file tbh_secure_agents-0.2.0-py3-none-any.whl.

File metadata

File hashes

Hashes for tbh_secure_agents-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 cf6063efce52f60a232033129db89393ad42a7c0f650ba25b3479dc63030e4ae
MD5 4bda3498f81e27059a0b333f2467045b
BLAKE2b-256 a8e2782f50858da8f85093ac3a5305dad45460a7d5a43e2f6f813cec6e7513e7

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page