From a21fafddd73d9665065038cec0d54c03f8406174 Mon Sep 17 00:00:00 2001 From: BrunoV21 Date: Tue, 26 Aug 2025 19:36:18 +0100 Subject: [PATCH 1/7] updated .gitginore --- .gitignore | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.gitignore b/.gitignore index d652275..713d2f4 100644 --- a/.gitignore +++ b/.gitignore @@ -183,3 +183,5 @@ config/ codetide/agents/tide/ui/assets/ examples/hf_demo_space/.chainlit/* examples/hf_demo_space/chainlit.md + +examples/hf_demo_space/public/ From 0a65b7cdd94fb488367749e9c70af2d6e4a1deb6 Mon Sep 17 00:00:00 2001 From: BrunoV21 Date: Tue, 26 Aug 2025 19:37:01 +0100 Subject: [PATCH 2/7] updated hf_demo requirements --- examples/hf_demo_space/requirements.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/examples/hf_demo_space/requirements.txt b/examples/hf_demo_space/requirements.txt index 2e16027..702f9c8 100644 --- a/examples/hf_demo_space/requirements.txt +++ b/examples/hf_demo_space/requirements.txt @@ -1 +1,2 @@ -codetide @ git+https://github.com/BrunoV21/codetide.git#egg=codetide[agents-ui] \ No newline at end of file +codetide @ git+https://github.com/BrunoV21/codetide.git#egg=codetide[agents-ui] +fastapi==0.115.7 \ No newline at end of file From 833b96620b4bbacd1a316add9cdeeb359b0d3010 Mon Sep 17 00:00:00 2001 From: BrunoV21 Date: Tue, 26 Aug 2025 19:37:27 +0100 Subject: [PATCH 3/7] removed initial msg with img from demo --- examples/hf_demo_space/app.py | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/examples/hf_demo_space/app.py b/examples/hf_demo_space/app.py index bc206b6..9a390f5 100644 --- a/examples/hf_demo_space/app.py +++ b/examples/hf_demo_space/app.py @@ -40,17 +40,7 @@ async def start_chatr(): cl.user_session.set("session_id", session_id) await cl.context.emitter.set_commands(AgentTideUi.commands) cl.user_session.set("chat_history", []) - - await cl.Message( - content="", - elements=[ - cl.Image( - path=os.getenv("AGENT_TIDE_LOGO_PATH"), - size="large" - ) - ] - ).send() - + exception = True while exception: try: From c6114c95fddadc7d1093cf57463e9ad1a35aec3e Mon Sep 17 00:00:00 2001 From: BrunoV21 Date: Tue, 26 Aug 2025 19:39:15 +0100 Subject: [PATCH 4/7] wrapped chainlit app in fastapi to include landing page --- examples/hf_demo_space/api.py | 54 ++ .../hf_demo_space/static/landing_page.html | 672 ++++++++++++++++++ 2 files changed, 726 insertions(+) create mode 100644 examples/hf_demo_space/api.py create mode 100644 examples/hf_demo_space/static/landing_page.html diff --git a/examples/hf_demo_space/api.py b/examples/hf_demo_space/api.py new file mode 100644 index 0000000..23aef67 --- /dev/null +++ b/examples/hf_demo_space/api.py @@ -0,0 +1,54 @@ +from fastapi.responses import HTMLResponse, FileResponse +from fastapi.templating import Jinja2Templates +from fastapi.staticfiles import StaticFiles +from fastapi import FastAPI, Request +from chainlit.utils import mount_chainlit +from pathlib import Path +import os + +ROOT_PATH = os.getenv("API_ROOT_PATH", "./") +app = FastAPI(title="AgentTide", description="Precision-Driven Software Engineering Agent") + +# Mount static files directory for assets (logo, CSS, JS, etc.) +app.mount("/static", StaticFiles(directory=F"{ROOT_PATH}/public"), name="static") + +templates = Jinja2Templates(directory=F"{ROOT_PATH}/static") + +@app.get("/", response_class=HTMLResponse) +async def landing_page(request: Request): + """Serve the AgentTide landing page""" + return templates.TemplateResponse("landing_page.html", {"request": request}) + +@app.get("/health") +async def health_check(): + """Health check endpoint""" + return {"status": "healthy", "service": "AgentTide"} + +@app.get("/favicon.ico", include_in_schema=False) +async def favicon(): + """Serve favicon""" + favicon_path = Path(F"{ROOT_PATH}/public/favicon.ico") + if favicon_path.exists(): + return FileResponse(favicon_path) + else: + # Return 204 No Content if favicon doesn't exist + return HTMLResponse(status_code=204) + +@app.get("/logo_dark.png", include_in_schema=False) +async def logo_dark(): + """Serve favicon""" + favicon_path = Path(F"{ROOT_PATH}/public/logo_dark.png") + if favicon_path.exists(): + return FileResponse(favicon_path) + else: + # Return 204 No Content if favicon doesn't exist + return HTMLResponse(status_code=204) + +mount_chainlit(app=app, target=F"{ROOT_PATH}/app.py", path="/tide") + +if __name__ == "__main__": + from dotenv import load_dotenv + import uvicorn + + load_dotenv() + uvicorn.run(app, host="0.0.0.0", port=7860) diff --git a/examples/hf_demo_space/static/landing_page.html b/examples/hf_demo_space/static/landing_page.html new file mode 100644 index 0000000..2f855ba --- /dev/null +++ b/examples/hf_demo_space/static/landing_page.html @@ -0,0 +1,672 @@ + + + + + + AgentTide - Precision-Driven Software Engineering Agent + + + + +
+
function analyzeCode() { return insights; }
+
const agent = new AgentTide();
+
// Precision-driven refactoring
+
import { structuralAnalysis } from 'codetide';
+
+ + + +
+
+ +
+
+ +
+
+

AI Agents for Smarter Codebases

+

+ The next-generation, precision-driven software engineering agent built on top of CodeTide. + Experience intelligent code generation with full structural understanding of your codebase. +

+ + + +
+ $ uvx --from codetide[agents-ui] agent-tide-ui +
+
+
+ +
+
+
+
+ 🧠 +

Understands Your Codebase

+

Deep structural analysis of your entire project for context-aware modifications

+
+ +
+ +

Intelligent Refactoring

+

Automated code improvements that maintain functionality while enhancing quality

+
+ +
+ 🔗 +

Seamless GitHub Integration

+

Direct repository analysis and patch generation with full version control support

+
+ +
+ 🌊 +

CodeTide MCP Support

+

Empower AI agents and tools with dynamic codebase interaction while keeping your data secure.

+
+
+
+
+ +
+ +
+
+

Why Choose AgentTide?

+

Experience the power of context-aware, privacy-first software engineering

+ +
+
+
🔒
+

Local-First & Private

+

All code analysis and patching is performed locally. Your code never leaves your machine, ensuring complete privacy and security.

+
+ +
+
👁️
+

Transparent & Stepwise

+

See every plan and patch before it's applied. Edit, reorder, or approve steps-you're always in control of the process.

+
+ +
+
🧠
+

Context-Aware

+

AgentTide loads only the relevant code identifiers and dependencies for your request, making it fast and precise.

+
+ +
+
🤝
+

Human-in-the-Loop

+

After each step, review the patch, provide feedback, or continue-no black-box agent behavior.

+
+ +
+
+

Patch-Based Editing

+

All changes are atomic diffs, not full file rewrites, for maximum clarity and efficiency.

+
+ +
+
🎯
+

Precision-Driven

+

Built on CodeTide's symbolic code understanding for accurate, context-aware code modifications.

+
+
+
+
+ +
+
+
+

Getting Started

+

+ To use AgentTide, you'll need to provide a GitHub repository URL to give the agent context about your codebase. + You can use one of our pre-configured free LLM providers or bring your own model. + We do not persist any data regarding Git repositories or API keys - everything stays local and private. +

+
+ +

© 2025 AgentTide. Built with CodeTide. Licensed under Apache 2.0.

+
+
+ + + + \ No newline at end of file From f76247a04eb13eb80a66ab1573857db9561da637 Mon Sep 17 00:00:00 2001 From: BrunoV21 Date: Tue, 26 Aug 2025 20:29:45 +0100 Subject: [PATCH 5/7] updated landing page --- examples/hf_demo_space/static/landing_page.html | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/examples/hf_demo_space/static/landing_page.html b/examples/hf_demo_space/static/landing_page.html index 2f855ba..3667023 100644 --- a/examples/hf_demo_space/static/landing_page.html +++ b/examples/hf_demo_space/static/landing_page.html @@ -515,6 +515,17 @@ display: none; } } + /* Style for Try Now button in disclaimer */ + .disclaimer .cta-button { + font-size: 1rem; + padding: 0.7rem 2rem !important; + margin: 0.5rem auto 1rem auto; + display: inline-block; + box-shadow: 0 2px 8px hsl(var(--primary) / 0.10); + } + .disclaimer div { + text-align: center; + } @@ -639,6 +650,8 @@

Getting Started

You can use one of our pre-configured free LLM providers or bring your own model. We do not persist any data regarding Git repositories or API keys - everything stays local and private.

+

© 2025 AgentTide. Built with CodeTide. Licensed under Apache 2.0.

From 83bdb51a1b6b5f6befcd1a986fe292fcb1367181 Mon Sep 17 00:00:00 2001 From: BrunoV21 Date: Tue, 26 Aug 2025 20:32:27 +0100 Subject: [PATCH 6/7] added protection --- codetide/agents/tide/ui/app.py | 2 +- examples/hf_demo_space/app.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/codetide/agents/tide/ui/app.py b/codetide/agents/tide/ui/app.py index 16a71ef..8a78efc 100644 --- a/codetide/agents/tide/ui/app.py +++ b/codetide/agents/tide/ui/app.py @@ -146,7 +146,7 @@ async def loadAgentTideUi()->AgentTideUi: agent_tide_ui = AgentTideUi( os.getenv("AGENT_TIDE_PROJECT_PATH", "./"), history=cl.user_session.get("chat_history"), - llm_config=cl.user_session.get("settings") + llm_config=cl.user_session.get("settings") or None ) await agent_tide_ui.load() diff --git a/examples/hf_demo_space/app.py b/examples/hf_demo_space/app.py index 9a390f5..5a2b9cf 100644 --- a/examples/hf_demo_space/app.py +++ b/examples/hf_demo_space/app.py @@ -103,7 +103,7 @@ async def start_chatr(): agent_tide_ui = AgentTideUi( DEFAULT_SESSIONS_WORKSPACE / session_id, history=cl.user_session.get("chat_history"), - llm_config=cl.user_session.get("settings"), + llm_config=cl.user_session.get("settings") or None, session_id=session_id ) await agent_tide_ui.load() From 7a00d1adf8bdfef311e5351966325508cf821c86 Mon Sep 17 00:00:00 2001 From: BrunoV21 Date: Tue, 26 Aug 2025 20:39:47 +0100 Subject: [PATCH 7/7] updated DockerFile --- examples/hf_demo_space/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/hf_demo_space/Dockerfile b/examples/hf_demo_space/Dockerfile index 8ecd176..ae9ed28 100644 --- a/examples/hf_demo_space/Dockerfile +++ b/examples/hf_demo_space/Dockerfile @@ -28,4 +28,4 @@ RUN pip install --upgrade pip && \ EXPOSE 7860 -CMD python -m chainlit run app.py --host 0.0.0.0 --port 7860 \ No newline at end of file +CMD uvicorn api:app --host 0.0.0.0 --port 7860