> ## Documentation Index
> Fetch the complete documentation index at: https://docs.agno.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Middleware

> Examples for `middleware` in AgentOS.

| Example                                                                                                        | Description                                                                                                                     |
| -------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------- |
| [Agent Os With Custom Middleware](/examples/agent-os/middleware/agent-os-with-custom-middleware)               | We add two middleware: - Rate Limiting: Limits requests per IP address - Request/Response Logging: Logs requests and responses. |
| [Agent Os With Jwt Middleware](/examples/agent-os/middleware/agent-os-with-jwt-middleware)                     | The middleware extracts JWT claims and stores them in request.state for easy access.                                            |
| [Agent Os With Jwt Middleware Cookies](/examples/agent-os/middleware/agent-os-with-jwt-middleware-cookies)     | This is useful for web applications that prefer to store JWT tokens in HTTP-only cookies for security.                          |
| [Custom Fastapi App With Jwt Middleware](/examples/agent-os/middleware/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 Middleware](/examples/agent-os/middleware/extract-content-middleware)                         | This example middleware can extract content from both streaming and non-streaming responses.                                    |
| [Guardrails Demo](/examples/agent-os/middleware/guardrails-demo)                                               | The AgentOS UI will show an error when the guardrail is triggered.                                                              |
