Hackathon Submission — Agentic AI Edition 🤖🔥
Semantic Canvas is a real-time, shared memory infrastructure explicitly designed to empower AI Agents. While most Agentic workflows suffer from hallucination or lack of team context, Semantic Canvas solves this by autonomously constructing and exposing a massive vector knowledge graph of architectural decisions, conventions, and relationships via the Model Context Protocol (MCP).
Semantic Canvas operates as the unified infrastructural "Brain" for any downstream AI Agent workflow:
- Observe (Autonomous Ingestion): Through autonomous GitHub Webhooks, the Agent continuously monitors the repository.
- Reason (LLM Processing): Using
BAAI/bge-small-en-v1.5embeddings and local LLM processing, it parses syntax, determines function caller/callee relationships, and identifies structural modifications. - Plan & Adapt (Decisions & Conventions): The framework explicitly categorizes and tracks Architectural Decisions and "Blast Radiuses", automatically storing these in a PGVector database.
- Act (MCP Tools): Utilizing the built-in MCP Server (via SSE Transport), downstream autonomous workflows (like Claude Code or PR Review Agents) securely query this knowledge base using tools like
mcp_semantic-canvas_searchormcp_semantic-canvas_log_decision.
- LLM/Embeddings: HuggingFace
sentence-transformers→BAAI/bge-small-en-v1.5 - Data Storage: PostgreSQL 16 equipped with
pgvector - MCP Server Protocol: Securely mounted to FastAPI via Server-Sent Events (SSE) Transport
- Queue/Workers: Redis queue triggering isolated ingestion subsystems
flowchart TD
%% GitHub -> Pipeline
User(Developer) -- "git push" --> GH[GitHub Repository]
GH -- "Webhook POST" --> TUNNEL(LocalTunnel / Cloud Run Route)
TUNNEL -- "Webhook Event" --> API_SERVER[FastAPI Backend]
subgraph Autonomous Ingestion Loop [Agentic Processing Loop]
direction TB
API_SERVER -- "Dispatches Task" --> QUEUE[(Redis Queue)]
QUEUE -- "Axon Task Processing" --> WORKER[Ingestion Engine Subprocess]
WORKER -- "LLM Vector Embedding" --> BGE[bge-small-en-v1.5]
end
%% Database
WORKER -- "Upserts Knowledge" --> DB[(PostgreSQL + pgvector)]
DB -. "Real-time updates" .-> DASH[Next.js Web Dashboard]
%% MCP External Agent usage
subgraph Agentic Client Access
direction BT
CLAUDE[Claude Code / AI Agent] -- "Secure MCP SSE Query + Bearer Token" --> API_SERVER
end
%% Queries DB
API_SERVER -- "Vector Searches & Queries" --> DB
Follow these exact steps to run Semantic Canvas locally and demonstrate the autonomous agentic loop to the judges.
Spin up the pgvector knowledge graph and redis queue instances:
docker compose up -d postgres redisTo ensure the Local Task Queue can spawn the autonomous ingestion scripts using your native Python virtual environment, execute Uvicorn directly on the host (not in Docker):
cd packages/api
# Ensure your venv is activated here
uvicorn src.main:app --port 8000 --reloadAllow the judges to visually inspect the knowledge graph and activity logs:
# In a new terminal tab
cd packages/web
pnpm devOpen http://localhost:3000 to view the UI.
To demonstrate the autonomous Observe -> Ingest loop when a developer pushes code:
# In a new terminal tab at the root
npx localtunnel --local-host 127.0.0.1 --port 8000Copy the generated https://*.loca.lt URL, append /api/v1/webhooks/github, and save it under your GitHub Repository's Webhook settings.
- Generate an API token from your local Next.js Web Dashboard under target Project Settings.
- Ensure your local agent's MCP configuration (
.mcp.jsonormcp_config.json) points securely to:"mcpServers": { "semantic-canvas": { "url": "http://localhost:8000/mcp/sse", "headers": { "Authorization": "Bearer <YOUR_GENERATED_TOKEN>", "X-Project-Id": "<YOUR_PROJECT_ID>" } } }
- Run your preferred Agent (e.g.,
claudeCLI). - The Pitch Prompt: "Use the Semantic Canvas tools to tell me the architectural rules for the current project, and determine the blast radius if I were to change authentication methods."
- The Agent will autonomously establish the SSE connection, verify the cryptographically hashed tokens, query the PGVector database, and output context-aware reasoning without any human micro-managing!
In addition to the core source code, this repository contains documentation and scripts related to the project submission:
packages/: Contains the core codebase (API backend and Web dashboard).infra/: Infrastructure and deployment configurations.scripts/: Utility scripts (e.g.,make_doc.py,make_ppt.py,get_recent_decision.py).docs/&ch7_final/: Documentation files and assets for the final report.*.pdf,*.docx,*.pptx: Project reports, presentation slides, and phase review documents.Semantic_Canvas_Project_Report.md: Detailed final project report.