Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
Symbi Agent Runtime System
A high-performance, secure runtime system for managing autonomous agents in the Symbi platform. Built in Rust with comprehensive security, context management, knowledge systems, and secure external tool integration.
Overview
The Symbi Agent Runtime System provides a complete infrastructure for executing and managing autonomous agents with:
- Multi-tier Security: Tier1 (Docker), Tier2 (gVisor), Tier3 (Firecracker) sandboxing
- Resource Management: Memory, CPU, disk I/O, and network bandwidth allocation and monitoring
- Priority-based Scheduling: Efficient task scheduling with load balancing
- Encrypted Communication: Secure inter-agent messaging with Ed25519 signatures and AES-256-GCM encryption
- Error Recovery: Circuit breakers, retry strategies, and automatic recovery mechanisms
- Audit Trail: Cryptographic audit logging for compliance and debugging
- Context Management: Persistent agent memory and knowledge storage
- RAG Engine: Retrieval-augmented generation with semantic search
- Vector Database: Qdrant integration for embedding storage and similarity search
- Secure MCP Integration: Cryptographically verified external tool access
- SchemaPin Security: Tool verification with Trust-On-First-Use (TOFU)
- AI Tool Review: Automated security analysis and signing workflow
- Policy Engine: Resource access control with YAML-based policies
- Basic Secrets Management: Local encrypted file storage for secure configurations
- Cryptographic CLI: Tool for encrypting/decrypting secret files locally
- Optional HTTP API: RESTful API interface for external system integration (feature-gated)
Architecture
┌───────────────────────────────────────────────────────────────────────────────┐
│ Agent Runtime System │
├─────────────────┬─────────────────┬─────────────────┬─────────────────────────┤
│ Scheduler │ Lifecycle │ Resource Manager│ Context Manager │
│ │ Controller │ │ │
├─────────────────┼─────────────────┼─────────────────┼─────────────────────────┤
│ Communication │ Error Handler │ RAG Engine │ Vector Database │
│ Bus │ │ │ │
├─────────────────┼─────────────────┼─────────────────┼─────────────────────────┤
│ MCP Client │ SchemaPin │ Tool Review │ Policy Engine │
│ │ Integration │ Workflow │ │
├─────────────────┼─────────────────┼─────────────────┼─────────────────────────┤
│ HTTP API Server │ HTTP-Input │ │ (Optional) │
│ (Optional) │ (Optional) │ │ │
└─────────────────┴─────────────────┴─────────────────┴─────────────────────────┘
Quick Start
Installation
Add to your Cargo.toml:
[]
= "0.6.0"
= { = "1.0", = ["full"] }
Basic Usage
use *;
use Duration;
async
Core Components
1. Agent Lifecycle Management
Manages agent states and transitions:
use *;
let config = LifecycleConfig ;
let lifecycle_controller = new.await?;
Agent States:
Created→Initializing→Ready→RunningSuspended,Waiting,Failed,Terminating,Terminated
2. Resource Management
Tracks and enforces resource limits with policy integration:
use *;
let config = ResourceManagerConfig ;
let resource_manager = new.await?;
// Allocate resources with policy checks
let allocation = resource_manager.allocate_resources.await?;
3. Context Management
Persistent agent memory and knowledge:
use *;
let config = ContextManagerConfig ;
let context_manager = new.await?;
// Store agent context
let context = AgentContext ;
context_manager.store_context.await?;
// Add knowledge
context_manager.add_knowledge_item.await?;
4. RAG Engine
Retrieval-augmented generation capabilities:
use *;
let config = RAGConfig ;
let rag_engine = new.await?;
// Process query with RAG
let request = RAGRequest ;
let response = rag_engine.process_query.await?;
println!;
5. Vector Database Integration
Semantic search with Qdrant:
use *;
let config = VectorDbConfig ;
let vector_db = new.await?;
// Store knowledge with embeddings
vector_db.store_knowledge_item.await?;
// Semantic search
let results = vector_db.semantic_search.await?;
6. Secure MCP Integration
Cryptographically verified external tools:
use *;
use *;
// Initialize SchemaPin for tool verification
let schemapin_config = SchemaPinConfig ;
let schemapin = new.await?;
// Initialize key store for TOFU
let key_store_config = KeyStoreConfig ;
let key_store = new.await?;
// Create secure MCP client
let mcp_config = McpClientConfig ;
let mcp_client = new.await?;
// Discover and verify tools
let tools = mcp_client.discover_tools.await?;
for tool in tools
7. AI Tool Review Workflow
Automated security analysis and signing:
use *;
let review_config = ToolReviewConfig ;
let orchestrator = new.await?;
// Submit tool for review
let review_request = ToolReviewRequest ;
let review_id = orchestrator.submit_for_review.await?;
// Check review status
let status = orchestrator.get_review_status.await?;
match status.state
8. Policy Engine
Resource access control:
use *;
// Load policies from YAML
let policy_config = PolicyEnforcementConfig ;
let policy_engine = new.await?;
// Check resource access
let access_request = ResourceAccessRequest ;
let decision = policy_engine.evaluate_access.await?;
match decision.decision
### 9. Basic Secrets Management
Local encrypted file storage for secure configuration data:
```rust
use *;
use *;
// Configure encrypted file storage
let file_config = FileBackendConfig ;
let crypto = new;
let key_utils = new;
let master_key = key_utils.get_or_create_key?;
let file_backend = new.await?;
// Store encrypted secret
let secret = new
.with_metadata;
file_backend.store_secret.await?;
// Retrieve a secret
let retrieved = file_backend.get_secret.await?;
println!;
CLI Usage
Encrypt and decrypt secret files:
# Encrypt a JSON configuration file
# Decrypt and view
# Edit encrypted file in-place
### 10. Optional HTTP API
When enabled with the `http-api` feature, the runtime exposes a RESTful API:
```rust
#[cfg(feature = "http-api")]
use symbi_runtime::api::{HttpApiServer, HttpApiConfig};
// Configure HTTP API server
let api_config = HttpApiConfig {
bind_address: "127.0.0.1".to_string(),
port: 8080,
enable_cors: true,
enable_tracing: true,
};
// Create and start API server
let api_server = HttpApiServer::new(api_config);
api_server.start().await?;
Available Endpoints
GET /api/v1/health- System health checkGET /api/v1/agents- List all active agents (requires authentication)GET /api/v1/agents/{id}/status- Get specific agent status (requires authentication)POST /api/v1/agents- Create a new agent (requires authentication)PUT /api/v1/agents/{id}- Update an agent (requires authentication)DELETE /api/v1/agents/{id}- Delete an agent (requires authentication)POST /api/v1/agents/{id}/execute- Execute an agent (requires authentication)GET /api/v1/agents/{id}/history- Get agent execution history (requires authentication)POST /api/v1/workflows/execute- Execute workflowsGET /api/v1/metrics- System performance metrics
Note: All
/api/v1/agents*endpoints require Bearer token authentication. Set theAPI_AUTH_TOKENenvironment variable and use the header:Authorization: Bearer <your-token>
Example Usage
# Check system health
# List all agents
# Execute a workflow
Enable HTTP API
Add to your Cargo.toml:
[]
= { = "0.6.0", = ["http-api"] }
Or build with feature flag:
Security Features
Sandboxing
- Tier 1 (Docker): Container isolation with resource limits and security hardening
- Enhanced Isolation: Additional tiers available in Enterprise edition
SchemaPin Cryptographic Security
- Tool Verification: ECDSA P-256 signatures for all external tools
- Trust-On-First-Use: Key pinning prevents man-in-the-middle attacks
- Automated Review: AI-driven security analysis of tool schemas
- Human Oversight: Configurable human review for high-risk tools
Encryption
- Message Encryption: AES-256-GCM for message payloads
- Digital Signatures: Ed25519 for message authentication
- Key Management: Secure key generation, storage, and rotation
- Schema Signing: ECDSA P-256 for tool schema verification
Policy-Based Access Control
- YAML Configuration: Human-readable policy definitions
- Resource Types: File, network, database, API access control
- Dynamic Enforcement: Real-time policy evaluation
- Audit Logging: Complete access decision tracking
Audit Trail
All operations are logged with cryptographic integrity:
use *;
let audit_trail = new.await?;
// Record an event
let event = AuditEvent ;
audit_trail.record_event.await?;
Configuration
Environment Variables
SYMBI_LOG_LEVEL: Set logging level (debug, info, warn, error)SYMBI_MAX_AGENTS: Maximum number of concurrent agentsSYMBI_RESOURCE_ENFORCEMENT: Enable/disable resource enforcementSYMBI_QDRANT_URL: Qdrant vector database URLSYMBI_SCHEMAPIN_PATH: Path to SchemaPin CLI binary
Configuration Files
Create runtime_config.toml:
[]
= "60s"
= "30s"
= 100
[]
= 8589934592 # 8GB
= 8
= true
[]
= "./agent_contexts"
= true
= 100
[]
= "http://localhost:6333"
= "agent_knowledge"
= 384
[]
= true
= "30s"
= 10
[]
= "/usr/local/bin/schemapin-cli"
= "30s"
[]
= "access_policies.yaml"
= true
= "300s"
[]
= 100
= "ResourceBased"
[]
= true
= 1048576 # 1MB
[]
= true
= 3
# Optional HTTP API configuration (only used if http-api feature is enabled)
[]
= "127.0.0.1"
= 8080
= true
= true
Create access_policies.yaml:
version: "1.0"
policies:
- name: "default_file_access"
priority: 100
conditions:
- resource_type: "File"
- agent_security_level: "standard"
effect: "Allow"
resources:
- "/tmp/**"
- "/workspace/**"
operations:
- name: "network_restrictions"
priority: 200
conditions:
- resource_type: "Network"
effect: "Deny"
resources:
- "127.0.0.1/**"
- "localhost/**"
operations:
Testing
Run all tests:
Run specific test suites:
# Unit tests only
# Integration tests
# Specific module tests
Performance
Benchmarks
- Agent Creation: ~1ms per agent
- Message Throughput: 10,000+ messages/second
- Resource Allocation: ~100μs per allocation
- State Transitions: ~50μs per transition
- Context Retrieval: <50ms average
- Vector Search: <100ms for 1M+ embeddings
- RAG Pipeline: <500ms end-to-end
- Schema Verification: <100ms per tool
- Policy Evaluation: <1ms per access check
Memory Usage
- Base Runtime: ~10MB
- Per Agent: ~1-5MB (depending on configuration)
- Context Manager: ~256MB per agent (peak)
- Vector Database: Configurable with compression
- Security Components: ~2MB overhead per agent
- Message Buffers: Configurable (default 1MB per agent)
Error Codes
| Code | Description |
|---|---|
AGENT_001 |
Agent not found |
RESOURCE_001 |
Insufficient resources |
COMM_001 |
Message delivery failed |
SCHED_001 |
Task scheduling failed |
SEC_001 |
Security violation |
CTX_001 |
Context storage error |
RAG_001 |
RAG processing error |
VDB_001 |
Vector database error |
MCP_001 |
MCP connection error |
SCHEMA_001 |
Schema verification failed |
POLICY_001 |
Policy violation |
Examples
Context and RAG Example
Persistence Testing
Full System Example
Contributing
- Fork the repository
- Create a feature branch
- Add tests for new functionality
- Ensure all tests pass:
cargo test - Update documentation
- Submit a pull request
License
Licensed under the MIT License. See LICENSE file for details.
Support
For issues and questions:
- GitHub Issues: symbiont-runtime/issues
- Documentation: docs.symbiont.dev
Roadmap
✅ Phase 1: Core Infrastructure (COMPLETED)
- Agent Runtime Scheduler
- Agent Lifecycle Controller
- Resource Manager
- Communication Bus
- Error Handler
✅ Phase 2: Advanced Features (COMPLETED)
- Multi-tier security integration
- Policy enforcement hooks
- Comprehensive testing
- Performance optimization
✅ Phase 3: Production Readiness (COMPLETED)
- Complete audit trail integration
- Advanced monitoring
- Security hardening
- Documentation
✅ Phase 4: Context & Knowledge Systems (COMPLETED)
- Agent Context Manager with persistent storage
- Vector Database integration (Qdrant)
- RAG Engine implementation
- Knowledge persistence and sharing
- Semantic search capabilities
✅ Phase 5: Secure MCP Integration (COMPLETED)
- SchemaPin cryptographic verification
- Trust-On-First-Use (TOFU) key management
- Secure MCP Client implementation
- AI-driven tool review and signing workflow
- Tool invocation security enforcement
- Resource access management with policy engine
- Complete end-to-end security framework
✅ Phase 6: Basic Secrets Management (COMPLETED)
- Encrypted file backend with AES-256-GCM encryption
- CLI tools for secret encryption/decryption operations
- Cross-platform file-based secret storage
- Integration with existing runtime components
🚧 Phase 7: Advanced Intelligence (PLANNED)
- Multi-modal RAG support (images, audio, structured data)
- Cross-agent knowledge synthesis with knowledge graphs
- Intelligent context management with adaptive pruning
- Advanced learning capabilities with federated learning
- Performance optimization and intelligent caching
Architecture Achievements
The Symbi Agent Runtime System now represents a complete, production-ready platform for secure, intelligent agent deployment with:
Security Excellence
- Zero-Trust Architecture: All external tools cryptographically verified
- Defense in Depth: Multiple security layers from sandboxing to policy enforcement
- Audit Compliance: Complete cryptographic audit trails for all operations
- Attack Prevention: SchemaPin prevents tool substitution and supply chain attacks
Intelligence Capabilities
- Semantic Understanding: Vector-based knowledge storage and retrieval
- Context Awareness: Persistent agent memory across sessions
- Knowledge Synthesis: RAG-powered intelligent responses
- Learning Systems: Knowledge sharing between agents
Enterprise Ready
- Scalable Architecture: Support for thousands of concurrent agents
- Policy Governance: Fine-grained access control with YAML policies
- Integration Ready: Secure external tool and service integration
- Performance Optimized: Sub-millisecond operation latencies
The platform successfully bridges the gap between secure execution and intelligent operation, creating a foundation for next-generation AI agent systems that are both powerful and trustworthy.