Skip to content

feat: agentic loop with OGX vector search and conversation persistence#34

Draft
franciscojavierarceo wants to merge 9 commits into
mainfrom
feat/axum-ogx-integration-v2
Draft

feat: agentic loop with OGX vector search and conversation persistence#34
franciscojavierarceo wants to merge 9 commits into
mainfrom
feat/axum-ogx-integration-v2

Conversation

@franciscojavierarceo

@franciscojavierarceo franciscojavierarceo commented May 28, 2026

Copy link
Copy Markdown
Collaborator

Summary

Adds the agentic loop to the gateway, integrating OGX for vector search (file_search tool) and wiring up conversation/response persistence from the storage CRUD layer (#33, #45).

  • Agentic loop in handler.rs: multi-turn tool-call loop that proxies /v1/responses through vLLM, executes file_search tool calls via OGX, and feeds results back until the model completes or hits max_iterations
  • VectorSearch trait in agentic-core: async trait with OGX implementation that calls the OGX vector search API
  • Conversation persistence: stores conversation turns and response metadata via ConversationStore/ResponseStore on each loop iteration
  • AppState refactor: unified shared state (ProxyState + stores + vector search + config) behind Arc<AppState>
  • Integration test harness: mock vLLM and OGX servers for testing passthrough, single/multi-turn tool calls, max iteration limits, and conversation state hydration
  • Recorded file_search cassette: replays real vLLM openai/gpt-oss-20b Responses API output for the file_search loop while still exercising live OGX search in make integration-test
  • CI integration job: installs OGX and runs make integration-test
  • Architecture docs: docs/architecture/index.md describing the gateway layers
  • File search hardening: validates file_search call arguments, rejects empty vector_store_ids, forwards filters/max_num_results/ranking_options to OGX, rejects mixed file_search plus user function calls until that loop supports them explicitly, and accepts vLLM function calls with status: null

Test Plan

  • cargo test
  • cargo clippy --all-targets -- -D warnings
  • cargo fmt -- --check
  • SKIP=no-commit-to-branch /Users/farceo/.local/bin/uvx pre-commit run --all-files
  • PATH=/Users/farceo/.local/bin:$PATH OGX_CMD='/Users/farceo/.local/bin/uv run --project /Users/farceo/dev/ogx --python 3.12 --extra starter ogx' make integration-test
  • New integration tests cover:
    • Passthrough (no tools)
    • Single file_search tool call
    • Multi-turn tool call loop
    • Max iteration limit enforcement
    • Conversation state hydration across turns
    • Previous response chaining
    • Missing or empty file_search query arguments
    • Empty vector_store_ids
    • Forwarding file_search search options to OGX
    • Mixed file_search and user function call rejection
    • Replaying recorded vLLM file_search tool-call/final responses against live OGX search

@ashwing

ashwing commented Jun 10, 2026

Copy link
Copy Markdown
Collaborator

@franciscojavierarceo Is this still in-progress or ready for review? Happy to take a look when you're ready — especially interested in how the OGX VectorSearch trait maps to the dispatch interface we're building.

@franciscojavierarceo

Copy link
Copy Markdown
Collaborator Author

@ashwing I'm waiting for #46 to land to incorporate it and then mark as ready for review as I need the agentic loop and to update the Responses structs.

franciscojavierarceo and others added 2 commits June 11, 2026 09:48
Add trait-based store backend (ResponseStore, VectorSearch) in
agentic-core with OGx as the first implementation. The gateway handler
detects file_search tool calls and runs an agentic loop: send to vLLM
with file_search converted to a function tool, execute vector search
via OGx, feed results back, repeat until no more tool calls or max
iterations reached. State hydration prepends previous conversation
history when previous_response_id is set.

- agentic-core: types, store traits, OGx impl, error expansion
- agentic-server: handler with agentic loop, state hydration, proxy
- 22 new tests: proxy, agentic loop, state hydration, integration
- CI: integration job with OGx vector search

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: Francisco Javier Arceo <farceo@redhat.com>
Signed-off-by: Francisco Javier Arceo <farceo@redhat.com>
@franciscojavierarceo franciscojavierarceo force-pushed the feat/axum-ogx-integration-v2 branch from 0ef5f75 to cc71bb1 Compare June 11, 2026 14:01
@franciscojavierarceo franciscojavierarceo changed the title feat: add OGX integration with agentic loop and state hydration feat: agentic loop with OGX vector search and conversation persistence Jun 12, 2026
Signed-off-by: Francisco Javier Arceo <farceo@redhat.com>
Signed-off-by: Francisco Javier Arceo <farceo@redhat.com>
Signed-off-by: Francisco Javier Arceo <farceo@redhat.com>
Signed-off-by: Francisco Javier Arceo <farceo@redhat.com>
…tion-v2

Signed-off-by: Francisco Javier Arceo <farceo@redhat.com>
Signed-off-by: Francisco Javier Arceo <farceo@redhat.com>
…tion-v2

Signed-off-by: Francisco Javier Arceo <farceo@redhat.com>

# Conflicts:
#	crates/agentic-core/src/storage/types/item.rs
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