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

# Middleware Registry • AI Agent SDK

> Middleware Registry for managing runtime-scoped tool result middleware.

# middleware\_registry

<Badge color="blue">AI Agent</Badge>

Middleware Registry for managing runtime-scoped tool result middleware.

Provides a global registry where plugin harnesses can register their
middleware implementations and the core tool execution system can
look up the appropriate middleware for a given runtime.

## Import

```python theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
from praisonaiagents.runtime import middleware_registry
```

## Classes

<CardGroup cols={2}>
  <Card title="MiddlewareRegistry" icon="brackets-curly" href="../classes/MiddlewareRegistry">
    Registry for runtime-scoped tool result middleware.
  </Card>
</CardGroup>

## Functions

<CardGroup cols={2}>
  <Card title="get_default_middleware_registry()" icon="function" href="../functions/get_default_middleware_registry">
    Get the global default middleware registry.
  </Card>

  <Card title="register_middleware()" icon="function" href="../functions/register_middleware">
    Register middleware in the global registry.
  </Card>

  <Card title="get_middleware()" icon="function" href="../functions/get_middleware">
    Get middleware from the global registry.
  </Card>
</CardGroup>

***

## Related Documentation

<CardGroup cols={2}>
  <Card title="Middleware Feature" icon="layer-group" href="/docs/docs/features/middleware" />
</CardGroup>
