Skip to main content
ExampleDescription
Agent Os With Custom MiddlewareWe add two middleware: - Rate Limiting: Limits requests per IP address - Request/Response Logging: Logs requests and responses.
Agent Os With Jwt MiddlewareThe middleware extracts JWT claims and stores them in request.state for easy access.
Agent Os With Jwt Middleware CookiesThis is useful for web applications that prefer to store JWT tokens in HTTP-only cookies for security.
Custom Fastapi App With Jwt Middleware# Note: This example won’t work with the AgentOS UI, because of the token validation mechanism in the JWT middleware.
Extract Content MiddlewareThis example middleware can extract content from both streaming and non-streaming responses.
Guardrails DemoThe AgentOS UI will show an error when the guardrail is triggered.