> ## 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.

# Invocation Context • AI Agent SDK

> InvocationContext: Context passed through middleware chain.

# InvocationContext

> Defined in the [**middleware**](https://praison.ai/docs/sdk/reference/praisonaiagents/modules/middleware.md) module.

AI Agent

Context passed through middleware chain.

Contains identifiers for multi-agent safety and optional metadata.

## Properties

**agent\_id** `str`

No description available.

**run\_id** `str`

No description available.

**session\_id** `str`

No description available.

**tool\_name** `Optional[str]`

No description available.

**model\_name** `Optional[str]`

No description available.

**metadata** `Dict[str, Any]`

No description available.

**cancel\_event** `Optional`

No description available.

## Source

> [card] [View on GitHub](https://github.com/MervinPraison/PraisonAI/blob/main/src/praisonai-agents/praisonaiagents/hooks/middleware.py#L44)
>
> `praisonaiagents/hooks/middleware.py` at line 44

***

## Related Documentation

> [card] [Context Concept](https://praison.ai/docs/docs/concepts/context)

> [card] [Context Management](https://praison.ai/docs/docs/features/context-management)

> [card] [Context Strategies](https://praison.ai/docs/docs/features/context-strategies)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.