DeepSecure: Secure your AI agent and agentic AI application ecosystem with DeepSecure.
Project description
Give every AI agent a cryptographic identity and authenticated ephemeral credentials. Handle auth, delegation, policy enforcement, and secure proxying automatically. Effortlessly add identity and auth to any AI agent -- regardless of any platform, any framework, and any model.
๐ฏ Why DeepSecure?
The Problem: AI Agents Are Security Nightmares
# โ Current state: Security chaos
# ๐ API keys scattered everywhere
os.environ["OPENAI_API_KEY"] = "sk-..." # Same key shared across all agents
# ๐ค No agent identity - who did what? which actions?
agent1 = YourFavoriteFramework() # Anonymous agent
agent2 = AnotherFramework() # Another anonymous agent
# ๐ซ All-or-nothing permissions
agent.call_internal_api() # Full admin access to everything
agent.call_external_api() # Full admin access to everything
# No delegation, no policy enforcement, no audit trail
# Result: One breach = Complete system compromise
The Solution: Comprehensive Zero-Trust for AI Agents
# โ
With DeepSecure: Complete security transformation
# ๐ Cryptographic identity per agent
client = deepsecure.Client()
agent = client.agent("financial-analyst", auto_create=True) # Ed25519 identity
# ๐ Fine-grained policy enforcement happens automatically
# When agent fetches secrets, gateway validates JWT claims and enforces policy
secret = client.get_secret(
agent_id=agent.id,
secret_name="openai-api",
path="/v1/chat/completions"
)
# Gateway enforces: Does agent have OpenAI access? Rate limits? Business hours?
# Policy controls which agents can access which APIs, when, and how often
# ๐ Secure delegation between agents
delegation_token = client.delegate_access(
delegator_agent_id=agent.id,
target_agent_id="data-processor",
resource="financial-data",
permissions=["read"],
ttl_seconds=1800)
# ๐ Complete audit trail + policy enforcement
# Every action logged, every access controlled, every delegation tracked
# Result: Zero-trust security with full visibility and control
๐ฅ From Security Nightmare to Zero-Trust Security
| Without DeepSecure | With DeepSecure |
|---|---|
| ๐ Shared API keys | ๐ก๏ธ AI Agents don't have access to API keys |
| ๐ค No Agent Identity | ๐ AI Agents get Ed25519 Cryptographic Identity |
| ๐ซ No Access Control | ๐ AI Agents with Fine-Grained Policies |
| ๐ No delegation and tracking | ๐ AI Agents with crypotographic delegation and audit trail |
| ๐ญ Production Blockers | ๐ Enterprise-Ready |
โ๏ธ Getting Started
Get fully set up with DeepSecure in under 5 minutesโsecure your AI agents instantly!
Prerequisites
- Python 3.9+
- pip (Python package installer)
- Access to an OS keyring (macOS Keychain, Windows Credential Store, or Linux keyring) for secure agent private key storage
- Docker and Docker Compose for running the backend services
1. Install DeepSecure
pip install deepsecure
2. Backend Services Setup
DeepSecure uses a dual-service architecture:
deeptrail-control- Control Plane (manages agents, policies, credentials)deeptrail-gateway- Data Plane (enforces policies, injects secrets)
Quick Start with Docker Compose
# Clone the repository
git clone https://github.com/DeepTrail/deepsecure.git
cd deepsecure
# Start both services
docker-compose up -d
# Verify services are running
docker-compose ps
This will start:
- Control Plane at
http://localhost:8000 - Gateway at
http://localhost:8001 - PostgreSQL database for persistent storage
3. Configure DeepSecure CLI
# Set the control plane URL
deepsecure configure set-url http://localhost:8000
# Verify connection
deepsecure health
4. Verify Installation
# Check version
deepsecure --version
# Test agent creation
deepsecure agent create --name "test-agent"
๐ You're all set! Your secure AI agent infrastructure is now running.
Next Steps:
- Try the 30-second quickstart below
- Explore our examples for real-world use cases
- Read the Architecture Guide to understand the system
โก 30-Second Quickstart
# 1. Install DeepSecure
pip install deepsecure
# 2. Connect to your security control plane
# For local development:
deepsecure configure set-url http://localhost:8001
# For production (your deployed instance):
# deepsecure configure set-url https://deepsecure.yourcompany.com
# 3. Create your first AI agent identity
deepsecure agent create --name "my-ai-agent"
# 4. Use in your AI code
import deepsecure
client = deepsecure.Client()
agent = client.agent("my-ai-agent", auto_create=True)
secret = client.get_secret(name="openai-api", agent_name=agent.name)
# That's it! Your agent now has secure, audited access to OpenAI
๐ฏ What you just achieved:
- โ Centralized Security: All your AI agents use one security control plane
- โ Zero Hardcoded Secrets: Agents get ephemeral credentials automatically
- โ Unique Identity: Each agent has cryptographic identity (Ed25519)
- โ Complete Audit Trail: Every action is logged for compliance and debugging
- ๐ก๏ธ Policy Enforcement Ready: Fine-grained access control available via
deepsecure policycommands
๐๏ธ Architecture: Control Plane + Data Plane
DeepSecure implements a dual-service architecture designed for production scale:
๐ง Control Plane (deeptrail-control)
- Agent Identity Management: Ed25519 cryptographic identities
- Policy Engine: Fine-grained RBAC with delegation support
- Credential Issuance: Ephemeral, time-bound access tokens
- Audit Logging: Immutable security event tracking
๐ Data Plane (deeptrail-gateway)
- Secret Injection: Automatic API key insertion at runtime
- Policy Enforcement: Real-time access control decisions
- Split-Key Security: Client/backend key reassembly for ultimate protection
- Request Proxying: Transparent handling of all agent tool calls
graph TB
A[AI Agent/Developer] --> B[DeepSecure SDK]
%% Management Flow - Direct to Control
B -->|Management Operations<br/>Agent/Policy CRUD| D[Control Plane<br/>deeptrail-control]
%% Runtime Flow - Through Gateway
B -->|Runtime Operations<br/>Tool Calls| C[Gateway<br/>deeptrail-gateway]
C --> D
C --> E[External APIs<br/>OpenAI, AWS, etc.]
D --> F[Policy Engine]
D --> G[Split-Key Store]
D --> H[Audit Log]
%% Labels for clarity
B -.->|"deepsecure agent create<br/>deepsecure policy create"| D
B -.->|"agent.call_openai()<br/>with secret injection"| C
style A fill:#e1f5fe
style C fill:#f3e5f5
style D fill:#e8f5e8
style E fill:#fff3e0
๐ฌ Examples
Explore our comprehensive example collection:
| Example | Description | Framework |
|---|---|---|
| Basic Agent Creation | Create your first secure agent | Core SDK |
| LangChain Integration | Secure LangChain agents | LangChain |
| CrewAI Team Security | Multi-agent crew with delegation | CrewAI |
| Gateway Injection | Automatic secret injection | Core SDK |
| Advanced Delegation | Complex delegation workflows | Core SDK |
| Platform Bootstrap | Kubernetes/AWS agent bootstrapping | Infrastructure |
๐ What's Next?
You've now seen the core workflow! Ready to dive deeper?
๐ Documentation
| Resource | Description |
|---|---|
| ๐ Getting Started | Complete setup guide with examples |
| ๐ง CLI Reference | All commands and options |
| ๐ SDK Documentation | Python SDK with full API reference |
| ๐๏ธ Architecture Guide | Deep dive into system design |
| ๐ Security Model | Cryptographic foundations |
| ๐ Deployment Guide | Production deployment patterns |
For hands-on examples, explore our examples/ directory with LangChain, CrewAI, and multi-agent patterns.
๐ค Contributing
DeepSecure is open source, and your contributions are vital! Help us build the future of AI agent security.
๐ Star our GitHub Repository!
๐ Report Bugs or Feature Requests: Use GitHub Issues.
๐ก Suggest Features: Share ideas on GitHub Issues or GitHub Discussions.
๐ Improve Documentation: Help us make our guides clearer.
๐ป Write Code: Tackle bugs, add features, improve integrations.
For details on how to set up your development environment and contribute, please see our Contributing Guide.
๐ซ Community & Support
GitHub Discussions: The primary forum for questions, sharing use cases, brainstorming ideas, and general discussions about DeepSecure and AI agent security. This is where we want to build our community!
GitHub Issues: For bug reports and specific, actionable feature requests.
We're committed to fostering an open and welcoming community.
๐ License
This project is licensed under the terms of the Apache 2.0 License.
โญ Star us on GitHub if DeepSecure helps secure your AI agents!
๐ Get Started โข ๐ Documentation โข ๐ฌ Join Discord
Built with โค๏ธ for the AI agent developer community
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 deepsecure-0.1.11.tar.gz.
File metadata
- Download URL: deepsecure-0.1.11.tar.gz
- Upload date:
- Size: 366.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7e13c6aeb0cc1da78a41fe581e2c05d886081564fa96d8a2f8205af6ad852c3c
|
|
| MD5 |
ed6a3d02e76adec646cd62d7d90bdf76
|
|
| BLAKE2b-256 |
04c449560de6d9b181bbf6564452798853360f11e4db0156c85b93dae33f1853
|
File details
Details for the file deepsecure-0.1.11-py3-none-any.whl.
File metadata
- Download URL: deepsecure-0.1.11-py3-none-any.whl
- Upload date:
- Size: 321.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
21080393fed145a24be1aaf851d318ad7d796d1cd3884e7a7f1fb5b50e8527b8
|
|
| MD5 |
b47a4bd8f7d0a98926135cb608019512
|
|
| BLAKE2b-256 |
5b8352b3b35ba19a2f1eca10f039d18bfb53c18e537517a6b8a5123ffcc55e5b
|