crp.frontend¶
Auto-generated reference for the crp.frontend subpackage.
frontend¶
crp.frontend ¶
Frontend components for the CRP Agent SDK.
agent_console_html(*, title='CRP Agent Console', stream_url='/v1/chat/stream', chat_url='/v1/chat/completions', session_id=None) ¶
Return a self-contained HTML/JS agent console.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
title | str | Page title. | 'CRP Agent Console' |
stream_url | str | SSE endpoint for the transparency stream. | '/v1/chat/stream' |
chat_url | str | HTTP endpoint to POST chat requests. | '/v1/chat/completions' |
session_id | str | None | Optional fixed session id. | None |
Returns:
| Type | Description |
|---|---|
str | A complete HTML document as a string. |
mount_fastapi(app, *, path='/crp/console') ¶
Mount the agent console on a FastAPI app at path.
frontend.console¶
crp.frontend.console ¶
Pre-built frontend components for the CRP Agent SDK.
Provides a drop-in HTML chat console with depth selection and a live AG-UI-compatible event panel. This lets developers ship a governed agent UI without building their own streaming components.
agent_console_html(*, title='CRP Agent Console', stream_url='/v1/chat/stream', chat_url='/v1/chat/completions', session_id=None) ¶
Return a self-contained HTML/JS agent console.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
title | str | Page title. | 'CRP Agent Console' |
stream_url | str | SSE endpoint for the transparency stream. | '/v1/chat/stream' |
chat_url | str | HTTP endpoint to POST chat requests. | '/v1/chat/completions' |
session_id | str | None | Optional fixed session id. | None |
Returns:
| Type | Description |
|---|---|
str | A complete HTML document as a string. |
mount_fastapi(app, *, path='/crp/console') ¶
Mount the agent console on a FastAPI app at path.