> For the complete documentation index, see [llms.txt](https://rwapact.gitbook.io/whitepaper/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://rwapact.gitbook.io/whitepaper/pact-execution/session-validation.md).

# Session Validation

## Session Validation

An Agent may have permission to trade without having unlimited or permanent authority. KSO, the **Session Oracle**, verifies that the proposed Trade Intent fits an active session.

This check connects a request to the authority available at that moment. It prevents the Pact from assuming every action from an existing Agent is authorized.

### Session context

A session defines the scope in which an Agent may act. It includes:

* Session ID, Agent ID, and owner
* Start time, end time, and session status
* Budget, amount spent, asset scope, and maximum trade size

Together, these values define the authority delegated for the session. They do not determine whether a trade is safe or policy-compliant.

### What KSO verifies

KSO establishes that the session is active and has not expired or been revoked. It confirms that the requesting Agent matches the expected Agent.

It also checks that the proposed asset is in scope, the amount stays within the maximum trade size, and the session budget is not exceeded. A valid result means the session can authorize this Agent to request this action now.

### Identity, authorization, and execution

These concepts remain separate:

* **Identity** establishes which Agent submitted the Trade Intent.
* **Session authorization** establishes whether that Agent may act within this delegated scope.
* **Transaction execution** happens only after the complete Pact decision authorizes the trade.

This distinction is important for autonomous systems. An Agent can remain known to the protocol while its session expires, reaches its budget, falls outside asset scope, or is revoked.

KSO answers whether the Agent may act in the current session. [Policy Enforcement](/whitepaper/pact-execution/policy-enforcement.md) answers whether the particular trade complies with the configured rules.

***


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://rwapact.gitbook.io/whitepaper/pact-execution/session-validation.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
