Welcome to SafeAgent
SafeAgent is a minimal, flexible framework for orchestrating production-ready LLM agents. It provides pluggable components for retrieval, memory, and orchestration with enterprise-grade governance, reliability, and observability built-in from day one.
While many tools can help you build a prototype, SafeAgent is designed to build systems you can confidently run in production.
The SafeAgent Advantage: Beyond the Prototype
- Unparalleled Governance & Observability: Every action—from LLM calls to tool executions—is automatically audited with detailed logs for cost, latency, and data lineage. This isn't an add-on; it's part of the core framework.
- Production-Grade Reliability: Build resilient agents with built-in policies for caching (with TTL), automatic retries with exponential backoff, and circuit breakers to prevent cascading failures.
- Secure by Design: A declarative, role-based access control (RBAC) system for tools ensures that agents and users only have access to the functions they're authorized to use.
- Developer-First Experience: With features like automatic tool-schema generation, optional state validation, and a visual run tracer (via the audit log), SafeAgent is designed to maximize developer velocity and minimize debugging headaches.
Table of Contents
Getting Started
- Quickstart: A brief introduction to get you up and running.
- Tutorial: See the power of SafeAgent in a single, runnable script.
- Configuration: Learn how to configure SafeAgent for your environment.
Core Concepts
- Overview: A high-level look at the concepts in SafeAgent.
- Orchestrators: Learn about the components that drive the agent's logic.
- Tool Registry: Manage and secure your agent's tools.
- Retrievers: Provide external knowledge to your agents.
- Memory: Give your agents short-term and long-term memory.
- Governance: Understand the built-in security and observability features.
- Storage & Persistence: Learn how to save and load agent states.
- LLM Client: Interact with Language Models.
Advanced Guides
- Stateful Agents (ReAct): Build complex, cyclical agents.
- Production Policies: Dive deep into reliability and cost-management.
- Human-in-the-Loop: Add human oversight to your agents.
- Output Sinks: Automatically send tool outputs to other systems.
Examples
- Custom Tool Suite: See how to create and use your own tools.
- Database Integration: Connect your agent to a database.
- Multi-Tool ReAct Agent: Build an agent that can use multiple tools.
API Reference
- Overview: Start here for the API documentation.
- Reference: Detailed API reference.
- Core: Core components of the framework.
- Orchestrators: API for orchestration.
- Protocols: Data protocols and models.
- Sinks: API for output sinks.
- Tooling: Utilities and helpers for tool creation.
Other
- Comparison: How SafeAgent compares to other frameworks.