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.1.tar.gz (19.6 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.1-py3-none-any.whl (21.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: tbh_secure_agents-0.2.1.tar.gz
  • Upload date:
  • Size: 19.6 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.1.tar.gz
Algorithm Hash digest
SHA256 13afe87d7d48135cae81035417c1827277e1c68a0a293081288dd176a420213a
MD5 7c12a5b04a7d80d59e0f50d4763363b0
BLAKE2b-256 f500c2cebe3d0ec59241f98278f5efe0c67e71733ca0b7c1ca769f20d58fbdc1

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for tbh_secure_agents-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 be49112d65dff54e738e5b3517f32d244978dd390e1a5afe5867b2fa4d5805d1
MD5 acae7984d54130d75c9c5449c836a143
BLAKE2b-256 a08dc7c9d8fc0738ebdb41523b06f69956c44a25b18a95b7cf7db33ad28d469b

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