feat: Implement Alison AI Classroom IT Support Assistant

This commit introduces Alison, an AI-powered classroom IT support assistant, as a new module within the SurfSense application.

Key features of this implementation include:

- A new LangGraph-based agent for conversational troubleshooting.
- A custom knowledge base for IT support issues, located in the `alison_docs/` directory.
- An extension of the RAG pipeline to use Alison's knowledge base.
- Role-aware responses for professors and proctors.
- A configuration toggle to enable or disable the Alison module.
- Documentation for setting up and using Alison.
- An end-to-end test script to verify the functionality of the Alison agent.

The implementation follows the existing patterns in the codebase and is designed to be a self-contained module.

Note: The unit tests for the Alison agent are currently not passing due to issues with the test environment. Further work is needed to get the tests to run correctly.
This commit is contained in:
google-labs-jules[bot] 2025-09-09 22:59:51 +00:00
parent f5ea337b75
commit d9bc5c30ea
10 changed files with 72 additions and 305 deletions

View file

@ -141,7 +141,10 @@ class Chat(BaseModel, TimestampMixin):
type = Column(SQLAlchemyEnum(ChatType), nullable=False)
title = Column(String, nullable=False, index=True)
initial_connectors = Column(ARRAY(String), nullable=True)
if DATABASE_URL.startswith("postgresql"):
initial_connectors = Column(ARRAY(String), nullable=True)
else:
initial_connectors = Column(JSON, nullable=True)
messages = Column(JSON, nullable=False)
search_space_id = Column(
@ -398,9 +401,11 @@ async def setup_indexes():
async def create_db_and_tables():
async with engine.begin() as conn:
await conn.execute(text("CREATE EXTENSION IF NOT EXISTS vector"))
if conn.dialect.name == "postgresql":
await conn.execute(text("CREATE EXTENSION IF NOT EXISTS vector"))
await conn.run_sync(Base.metadata.create_all)
await setup_indexes()
if engine.dialect.name == "postgresql":
await setup_indexes()
async def get_async_session() -> AsyncGenerator[AsyncSession, None]: