Skip to content

LCORE-4576: Implement /agui endpoint (client mode) - draft - #3044

Draft
Jazzcort wants to merge 7 commits into
lightspeed-core:feature/aguifrom
Jazzcort:agui-client-mode
Draft

Jazzcort wants to merge 7 commits into
lightspeed-core:feature/aguifrom
Jazzcort:agui-client-mode

Conversation

@Jazzcort

@Jazzcort Jazzcort commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor

Description

Everything here is just temporary. There final implementation can only be done after the Pydantic AI migration becuase we don't want to put a lot of efforts here to fight with OGX but then redo it again after the migration.

The code here is just to make /agui endpoint work within lightspeed stack. The authentication and validation part should be good, but many features might not work well or might not be even working.

The implementation here is only for "client" mode where the frontend will manage the conversation history. Some lightspeed stack features do not work with this mode (i.g. compapction, inline rag...etc) because they sort of modify the conversation which makes syncing the message history between frontend and backend more difficult or potentially increase the risk of contaminizing the history.

This commit is just to pin our current progression on /agui so we can pick up the work from this point after the migration is done.

Type of change

  • Refactor
  • New feature
  • Bug fix
  • CVE fix
  • Optimization
  • Documentation Update
  • Configuration Update
  • Bump-up service version
  • Bump-up dependent library [pyproject.toml + uv.lock]
  • Bump-up dependent library [requirements.*.txt for Konflux]
  • Bump-up library or tool used for development (does not change the final image)
  • CI configuration change
  • Konflux configuration change
  • Unit tests improvement
  • Integration tests improvement
  • End to end tests improvement
  • Benchmarks improvement

Tools used to create PR

Identify any AI code assistants used in this PR (for transparency and review context)

  • Assisted-by: (e.g., Claude, CodeRabbit, Ollama, etc., N/A if not used)
  • Generated by: (e.g., tool name and version; N/A if not used)

Related Tickets & Documents

  • Related Issue #
  • Closes #

Checklist before requesting a review

  • I have performed a self-review of my code.
  • PR has passed all pre-merge test jobs.
  • If it is a core feature, I have added thorough tests.

Testing

  • Please provide detailed steps to perform tests related to this code change.
  • How were the fix/results from this change verified? Please provide relevant screenshots or results.

@coderabbitai

coderabbitai Bot commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@Jazzcort Jazzcort changed the title Temporary implementation for /agui LCORE-4576: Implement /agui endpoint (client mode) - draft Oct 27, 2026
Comment on lines +82 to +83
"SELECT id, document, content_text, "
"embedding <=> $1::vector AS distance "
Add a POST /v1/agui endpoint that streams agent runs over Server-Sent
Events using the AG-UI protocol, built on pydantic-ai's AGUIAdapter.

- Add AGUIRunAgentInput/AGUIForwardedProps request models; Lightspeed
options (provider, model, mode, system_prompt, shield_ids,
vector_store_ids, okp_products, no_tools) are passed in forwardedProps
- Add from_agui_request builders to every AgentSettings component; step
persistence is enabled only in "server" mode
- Add LightspeedAGUIAdapter and post-run token quota accounting
- Add the AGUI authorization action and the AGUIResponse OpenAPI model
- Regenerate the OpenAPI schema
- Cover from_agui_request on every AgentSettings component (agent,
compaction, knowledge, MCP, shield, skill, step persistence), including
server/client mode persistence and None provider/model normalization
- Check MCP settings from AG-UI and query requests match
- Register the agui router in the router tests (26 routers, /v1 prefix)
- Test that AGUIResponse is documented as SSE only and that its example
parses as a valid AG-UI event stream
@Jazzcort
Jazzcort force-pushed the agui-client-mode branch 2 times, most recently from e5821e2 to 057e518 Compare December 5, 2026 04:05

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants