Skip to content

Agent#328

Draft
thokra-nav wants to merge 7 commits intomainfrom
agent
Draft

Agent#328
thokra-nav wants to merge 7 commits intomainfrom
agent

Conversation

@thokra-nav
Copy link
Contributor

No description provided.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR introduces an AI agent service with Model Context Protocol (MCP) integration for the Nais platform. The agent provides GraphQL schema exploration tools and chat capabilities with retrieval-augmented generation (RAG) support.

Changes:

  • New pkg/mcp package implementing MCP tools for GraphQL schema exploration and query execution
  • New internal/agent package providing AI chat orchestration with tool calling, RAG document search, and conversation management
  • RAG index generator tool that processes documentation into DuckDB embeddings for semantic search
  • Database schema for storing agent conversations and messages
  • Configuration for Vertex AI integration and agent features

Reviewed changes

Copilot reviewed 54 out of 57 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
pkg/mcp/tools/*.go MCP tool definitions, registry, and execution handlers for schema exploration and GraphQL operations
pkg/mcp/server.go MCP server implementation with stdio/HTTP/SSE transports
pkg/mcp/executor.go Direct tool executor without MCP protocol overhead for hosted agents
internal/agent/*.go Agent orchestrator, conversation management, MCP integration, and HTTP handlers
internal/agent/chat/*.go Chat client interfaces and streaming implementations
internal/agent/rag/*.go RAG document search with DuckDB and embedding support
internal/cmd/gen_rag_index/*.go Tool to generate DuckDB index from MkDocs search index
internal/database/migrations/0057_agent_conversations.sql Database schema for agent conversations and messages
internal/cmd/api/api.go Integration of agent service into main API server
go.mod New dependencies for DuckDB, Vertex AI, and MCP

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

EmbeddingModel: cfg.VertexAI.EmbeddingModel,
}, log.WithField("client", "duckdb-rag"))
if err != nil {
chatClient.Close()
Copy link

Copilot AI Feb 5, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This expression has no effect.

Suggested change
chatClient.Close()
if cerr := chatClient.Close(); cerr != nil {
log.WithError(cerr).Warn("closing chat client")
}

Copilot uses AI. Check for mistakes.
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.

1 participant