Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,6 @@
AGENT_BASE_URL=http://127.0.0.1:3500

# KV-store is hitting Agentuity Service API, this can be found in `agent-docs` after running `agentuity dev`
AGENTUITY_API_KEY=
AGENTUITY_SDK_KEY=
AGENT_BEARER_TOKEN=
AGENTUITY_REGION=use
3 changes: 2 additions & 1 deletion .github/workflows/sync-docs-full.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ name: Full Docs Sync to Vector Store

on:
workflow_dispatch:
pull_request:

jobs:
sync:
Expand All @@ -24,4 +25,4 @@ jobs:
set -euo pipefail
cat all-files.txt | \
./bin/build-payload.sh "${{ github.repository }}" full | \
./bin/send-webhook.sh "https://agentuity.ai/webhook/f61d5ce9d6ed85695cc992c55ccdc2a6" "Bearer $AGENTUITY_TOKEN"
./bin/send-webhook.sh "https://p0f83a312791b60ff.agentuity.run/api/process-docs" "Bearer $AGENTUITY_TOKEN"
2 changes: 1 addition & 1 deletion .github/workflows/sync-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,4 +67,4 @@ jobs:
set -euo pipefail
cat changed-files.txt | \
./bin/build-payload.sh "${{ github.repository }}" incremental | \
./bin/send-webhook.sh "https://agentuity.ai/webhook/f61d5ce9d6ed85695cc992c55ccdc2a6" "Bearer $AGENTUITY_TOKEN"
./bin/send-webhook.sh "https://p0f83a312791b60ff.agentuity.run/api/process-docs" "Bearer $AGENTUITY_TOKEN"
28 changes: 2 additions & 26 deletions app/api/rag-search/route.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { NextRequest } from 'next/server';
import { getAgentQaConfig } from '@/lib/env';
import { queryAgentQa } from '@/lib/api/services';
import { source } from '@/lib/source';

function documentPathToUrl(docPath: string): string {
Expand Down Expand Up @@ -93,31 +93,7 @@ export async function GET(request: NextRequest) {
}

try {
const agentConfig = getAgentQaConfig();

// Prepare headers
const headers: Record<string, string> = {
'Content-Type': 'application/json',
};

// Add bearer token if provided
if (agentConfig.bearerToken) {
headers['Authorization'] = `Bearer ${agentConfig.bearerToken}`;
}

const response = await fetch(agentConfig.url, {
method: 'POST',
headers,
body: JSON.stringify({ message: query }),
});

if (!response.ok) {
throw new Error(
`Agent API error: ${response.status} ${response.statusText}`
);
}

const data = await response.json();
const data = await queryAgentQa(query);
const results = [];

if (data?.answer?.trim()) {
Expand Down
Loading