Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
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
3 changes: 2 additions & 1 deletion .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,5 @@ AGENT_BASE_URL=http://127.0.0.1:3500
AGENT_BEARER_TOKEN=

# KV-store is hitting Agentuity Service API, this can be found in `agent-docs` after running `agentuity dev`
AGENTUITY_API_KEY=
AGENTUITY_SDK_KEY=
AGENTUITY_REGION=use
4 changes: 2 additions & 2 deletions .github/workflows/sync-docs-full.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:
workflow_dispatch:

jobs:
sync:
full-sync:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
Expand All @@ -24,4 +24,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