Repository: Agent_Builder_v2
A real-time voice-agent orchestration prototype combining REST-based agent configuration, document ingestion, local FAISS retrieval, WebSocket audio streaming, speech-to-text, LLM reasoning, and text-to-speech.
The original concept was an agent-builder platform where users could configure multiple agents with text and voice capabilities. The current repository is best understood as the real-time voice + RAG orchestration layer of that broader concept.
Project status: Independent MVP/prototype. It is not presented as a production-scale multi-user platform.
- bidirectional WebSocket audio
- authenticated streaming connections
- STT → retrieval → LLM → TTS orchestration
- per-agent knowledge ingestion
- semantic chunking and embeddings
- local FAISS retrieval
- REST APIs for agent/chat configuration
- separation between controllers and services
User Microphone
|
| audio chunks
v
+-----------------------+
| WebSocket Gateway |
| connection auth |
+-----------+-----------+
|
v
+-----------------------+
| Speech-to-Text |
| streaming transcript |
+-----------+-----------+
|
v
+-----------------------+
| Agent Controller |
| context + retrieval |
+-----+-------------+---+
| |
| v
| +-------------+
| | FAISS Index |
| | vector RAG |
| +-------------+
| |
+------+------+
|
v
+-----------+
| LLM |
+-----+-----+
|
v
+-----------+
| TTS |
+-----+-----+
|
v
Audio to Client
PDF / Text Document
|
v
Document Upload
|
v
Parsing / Normalization
|
v
Chunking
|
v
Embeddings
|
v
FAISS Index
|
+----> Runtime retrieval
- Client establishes a WebSocket connection.
- Connection is authenticated before audio buffering.
- Audio chunks are streamed to the backend.
- STT converts speech into text.
- Agent controller combines conversation context with retrieved knowledge.
- LLM generates the response.
- TTS converts the response back into audio.
- Audio is streamed back to the client.
For the MVP, local FAISS keeps retrieval simple and avoids adding a managed vector-database dependency.
That trade-off also creates a clear scaling boundary: in-memory indexes are straightforward for a small number of agents but increasingly expensive as the number and size of knowledge bases grow.
The system is designed around real-time interaction rather than ordinary request/response chat.
The repository reports an under-800ms pipeline measurement/target for its configured path. This is an environment-specific prototype figure, not a production SLA.
WebSocket authentication is performed before audio buffering.
WebSocket Upgrade
|
v
Authentication
|
+---- invalid ----> reject
|
v
Audio streaming
Continuous bidirectional audio requires persistent streaming transport rather than independent HTTP requests.
Uploaded knowledge is retrieved at runtime and supplied as context rather than being treated as model memory.
Controllers are separated from STT, TTS, FAISS, and agent services, making individual pipeline components replaceable.
Distributed infrastructure was intentionally avoided while experimenting with the core voice orchestration problem.
- Runtime is centered around a single Node.js server.
- FAISS indexes are local/in-memory.
- Heavy concurrent audio processing can pressure the Node.js process.
- Third-party STT, TTS, and LLM latency affects end-to-end response time.
- No distributed session management is demonstrated.
- No production-scale traffic is claimed.
A production-scale version could introduce managed/distributed vector storage, worker processes, distributed WebSocket/session infrastructure, durable agent configuration, provider fallback, tenant isolation, rate limiting, latency/cost telemetry, and automated voice/retrieval evaluations.
Real-time voice AI is not simply an LLM application with a microphone attached. Transport, buffering, provider latency, retrieval, state management, and failure handling all affect whether the conversation actually feels real-time.
The most precise description of this repository is:
A real-time voice-agent orchestration engine with RAG capabilities, built as the core of a broader agent-builder concept.
The repository includes examples/voice-chat-client.html for initiating a local voice session with a configured agent.