python toolset to secure AI agents with secret provisioning, authentication, call monitoring and authorization
Project description
AI Security Toolset - A toolset repository for AI agents
Overview
This toolset is intended for AI agents builders, to simplify your work, and reduce the level of boilerplate code you need to write.
Features
Secured environment variables provisioning
This toolset can populate API keys and secrets as environment variables. The secrets are stored in your secret management of choice and are provisioned at runtime into your process memory.
The secrets can be populated and depopulated, for a specific context: Agent, Tool, HTTP call.
Currently supported secret providers:
- AWS Secret Manager
- CyberArk Conjur
- Local
.envfile (for development purposes)
However, this functionality is extensible, by implementing a SecretsProvider interface.
Example
For full, runnable examples, please see the examples directory.
...
from secure_ai_toolset.secrets.aws_secrets_manager_provider import AWSSecretsProvider
from secure_ai_toolset.secrets.environment_manager import EnvironmentVariablesManager
# Populate the environment variables from AWS Secrets Manager
@EnvironmentVariablesManager.set_env_vars(AWSSecretsProvider())
async def main() -> None:
runtime = SingleThreadedAgentRuntime()
tools: List[Tool] = [
FunctionTool(get_stock_price, description='Get the stock price.')
]
await ToolAgent.register(runtime, 'tool_executor_agent',
lambda: ToolAgent('tool executor agent', tools))
await ToolUseAgent.register(
runtime,
'tool_use_agent',
lambda: ToolUseAgent(
AzureOpenAIChatCompletionClient(
model='gpt-4o',
azure_endpoint=os.getenv('AZURE_OPENAI_ENDPOINT'),
azure_deployment='gpt-4o',
api_version='2024-02-01',
api_key=os.getenv('AZURE_OPENAI_KEY')),
[tool.schema for tool in tools], 'tool_executor_agent'),
)
...
Getting Started
pip
pip3 install secure-ai-toolset
poetry
poetry add secure-ai-toolset
Note: Please ensure you are using Poetry version >=2.1.1.
Contribution
Please make sure to read the CONTRIBUTING.md file if you want to contribute to this project.
Contact
Feel free to contact us via github issues. If there are any feature requests or issues in the project you may contact me through linkedin: Gil Adda
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 secure_ai_toolset-0.1.1.tar.gz.
File metadata
- Download URL: secure_ai_toolset-0.1.1.tar.gz
- Upload date:
- Size: 14.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
531837cf85b5676ee3623c37de6120145c4c9908aecc8dc093d66add3d9b761a
|
|
| MD5 |
7678a7127e61b1adb27455ed64192fea
|
|
| BLAKE2b-256 |
42bb12db3bb745427a678d460d48593a0a7839a685797edd3aa13741aa11f028
|
File details
Details for the file secure_ai_toolset-0.1.1-py3-none-any.whl.
File metadata
- Download URL: secure_ai_toolset-0.1.1-py3-none-any.whl
- Upload date:
- Size: 20.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
352ede7d9cdb042b861e19cc6ea408b4851d643f7669f2590ad4382ca00f194c
|
|
| MD5 |
8d5f29c5e6f3fc28583e472ac0307313
|
|
| BLAKE2b-256 |
f39abd86a516530ca4cf185fc2706f937c553f7d6c48037589e5f0f233243334
|