gpt-computer-agent icon indicating copy to clipboard operation
gpt-computer-agent copied to clipboard

fix: issue and latest version pre-release

Open FortiShield opened this issue 2 months ago • 6 comments

User description

Category:

One of: Bugfix / Feature / Code style update / Refactoring Only / Build related changes / Documentation / Other (please specify)

Overview

Briefly outline your new changes...

Issue Number (if applicable) #00

New Vars (if applicable)

If you've added any new build scripts, environmental variables, config file options, dependency or devDependency, please outline here

Screenshot (if applicable)

If you've introduced any significant UI changes, please include a screenshot

Code Quality Checklist (Please complete)

  • [ ] All changes are backwards compatible
  • [ ] All lint checks and tests are passing
  • [ ] There are no (new) build warnings or errors
  • [ ] (If a new config option is added) Attribute is outlined in the schema and documented
  • [ ] (If a new dependency is added) Package is essential, and has been checked out for security or performance
  • [ ] (If significant change) Bumps version in package.json

PR Type

Enhancement, Documentation


Description

Major architectural refactoring: Renamed "assistant" to "agent" throughout the entire codebase for consistency • Complete web interface: Added FastAPI-based REST API with WebSocket support, authentication, and modern HTML/CSS/JS frontend • Comprehensive authentication system: Implemented JWT-based authentication with role-based access control and user management • Persistent storage: Added SQLite-based conversation and message storage with Alembic migrations • Tool system architecture: Created extensible tool registry with automatic parameter generation from type hints • Core agent framework: Implemented base agent classes with OpenAI integration and conversation management • Modern project structure: Added pyproject.toml, streamlined dependencies, and comprehensive documentation • Database infrastructure: Added SQLAlchemy models, migration scripts, and initialization utilities • Enhanced examples: Updated workday summarizer and added interactive usage examples


Diagram Walkthrough

flowchart LR
  A["Legacy Assistant"] --> B["Core Agent System"]
  B --> C["FastAPI Web Interface"]
  B --> D["Tool Registry"]
  B --> E["SQLite Storage"]
  C --> F["JWT Authentication"]
  C --> G["WebSocket Chat"]
  E --> H["Alembic Migrations"]
  F --> I["User Management"]
  G --> J["Modern Web UI"]

File Walkthrough

Relevant files
Enhancement
18 files
app.py
Add FastAPI web interface for agent interactions                 

src/gpt_computer_agent/api/app.py

• Created a complete FastAPI web application with conversation
management
• Implemented REST API endpoints for conversations,
messages, and WebSocket support
• Added authentication dependencies
and CORS middleware configuration
• Integrated with storage system and
agent for real-time chat functionality

+305/-0 
storage.py
Add SQLite-based conversation storage system                         

src/gpt_computer_agent/utils/storage.py

• Created persistent storage system using SQLite for conversations and
messages
• Implemented Message, Conversation, and Storage classes with
full CRUD operations
• Added database schema initialization and
conversation management methods

+301/-0 
common.py
Add common utility functions for configuration and operations

src/gpt_computer_agent/utils/common.py

• Added comprehensive utility functions for configuration, logging,
and file operations
• Implemented functions for timestamp generation,
URL validation, and checksum calculation
• Created environment
information gathering and directory management utilities

+246/-0 
tools.py
Add comprehensive tool system for agent capabilities         

src/gpt_computer_agent/core/tools.py

• Created tool system with Tool class and ToolRegistry for agent
capabilities
• Implemented automatic parameter generation from
function type hints
• Added tool validation, execution, and OpenAI API
format conversion

+208/-0 
agent.py
Add core agent architecture with OpenAI integration           

src/gpt_computer_agent/core/agent.py

• Created base agent architecture with BaseAgent and GPTChatAgent
classes
• Implemented OpenAI integration with tool calling and
conversation management
• Added agent configuration, state
saving/loading, and async execution support

+142/-0 
users.py
Add user management API routes with authentication             

src/gpt_computer_agent/api/routers/users.py

• Created comprehensive user management API routes with CRUD
operations
• Implemented authentication-protected endpoints with
role-based access control
• Added user creation, updating, deletion,
and profile management functionality

+152/-0 
security.py
Add JWT authentication and security utilities                       

src/gpt_computer_agent/core/security.py

• Implemented JWT-based authentication with access and refresh tokens

• Added password hashing, token creation/validation, and user
authentication
• Created FastAPI dependencies for current user and
active user retrieval

+115/-0 
logging.py
Add comprehensive logging configuration with loguru           

src/gpt_computer_agent/config/logging.py

• Created logging configuration system using loguru
• Implemented file
and console logging with rotation and retention
• Added interceptor
for standard library logging redirection

+108/-0 
user.py
Add user service layer for database operations                     

src/gpt_computer_agent/services/user.py

• Created user service layer with database operations for user
management
• Implemented user CRUD operations, authentication, and
first superuser creation
• Added password hashing and user validation
functionality

+103/-0 
user.py
Add Pydantic schemas for user data validation                       

src/gpt_computer_agent/schemas/user.py

• Created Pydantic schemas for user data validation and serialization

• Implemented user creation, update, authentication, and token schemas

• Added password strength validation and email validation

+94/-0   
__init__.py
Add authentication module with JWT and user management     

src/gpt_computer_agent/auth/init.py

• Created authentication module with JWT token handling
• Implemented
password hashing, token creation, and user authentication
• Added fake
user database for demonstration purposes

+106/-0 
initial_migration.py
Add initial database migration for user tables                     

alembic/versions/initial_migration.py

• Created initial database migration for users and refresh_tokens
tables
• Implemented table creation with proper indexes and foreign
key constraints
• Added upgrade and downgrade functions for database
schema management

+63/-0   
auth.py
Add authentication API routes for login and registration 

src/gpt_computer_agent/api/routers/auth.py

• Created authentication API routes for login and user registration

Implemented OAuth2-compatible token endpoint and user profile access

Added JWT token generation and user creation functionality

+82/-0   
env.py
Add Alembic migration environment configuration                   

alembic/env.py

• Created Alembic environment configuration for database migrations

Implemented offline and online migration modes with proper database
connection
• Added model imports and metadata configuration for
autogenerate support

+87/-0   
user.py
Add SQLAlchemy models for user authentication                       

src/gpt_computer_agent/models/user.py

• Created SQLAlchemy User and RefreshToken models for database storage

• Implemented user authentication properties and token management

Added proper table relationships and database constraints

+64/-0   
init_db.py
Add database initialization script with admin user creation

scripts/init_db.py

• Created database initialization script for setting up tables and
admin user
• Implemented automatic admin user creation with
configurable credentials
• Added error handling and database session
management

+60/-0   
index.html
Complete web interface implementation for GPT Computer Agent

src/gpt_computer_agent/api/templates/index.html

• Added complete HTML template for GPT Computer Agent web interface

Implemented responsive chat UI with sidebar for conversation
management
• Added JavaScript functionality for real-time messaging
and API integration
• Included Tailwind CSS styling and Font Awesome
icons for modern UI

+484/-0 
workday_summerizer.md
Enhanced workday summarizer with comprehensive monitoring features

example_use_cases/workday_summerizer.md

• Updated references from "GPT Computer Assistant" to "GPT Computer
Agent"
• Enhanced workday monitoring script with comprehensive
activity tracking
• Added JSON data storage and human-readable summary
generation
• Improved error handling and structured data collection

+154/-21
Refactoring
6 files
process.py
Rename assistant references to agent throughout processing

src/gpt_computer_agent/agent/process.py

• Renamed import from assistant to agent module
• Updated function
calls from assistant() to agent()
• Changed signal handler references
from assistant_response_ to agent_response_

+17/-17 
api.py
Update imports to use relative package references               

src/gpt_computer_agent/api.py

• Updated import statements to use relative imports instead of
absolute paths
• Changed references from gpt_computer_agent module to
current package imports

+18/-18 
button.py
Update GUI button signals from assistant to agent terminology

src/gpt_computer_agent/gui/button.py

• Updated signal handler connections from assistant_ to agent_
naming
• Changed method names and signal emissions to use agent
terminology

+14/-14 
chat_history.py
Rename Assistant class to Agent in chat history                   

src/gpt_computer_agent/utils/chat_history.py

• Renamed Assistant class to Agent and updated related references

Changed message type from "assistant" to "agent" throughout the
codebase
• Updated chat history processing to use agent terminology

+8/-8     
gpt_computer_agent.py
Update main application to use agent terminology                 

src/gpt_computer_agent/gpt_computer_agent.py

• Updated imports from assistant to agent_executor module
• Changed
variable names from assistant_stopped to agent_stopped
• Updated state
management to use agent terminology

+8/-8     
start.py
Update startup script with agent terminology and GitHub URL

src/gpt_computer_agent/start.py

• Updated docstring references from "computer assistant" to "computer
agent"
• Changed GitHub URL from khulnasoft to khulnasoft-lab
organization
• Updated import statements to use relative imports

+5/-5     
Documentation
5 files
basic_usage.py
Add basic usage example with interactive agent demo           

examples/basic_usage.py

• Created example script demonstrating agent usage with custom tools

Implemented sample tools for web search, calculator, and weather
functions
• Added interactive conversation loop for testing agent
capabilities

+133/-0 
README_NEW.md
New comprehensive README with modern documentation             

README_NEW.md

• Created new comprehensive README with modern project structure

Added detailed installation and usage instructions
• Included API
documentation and custom tool integration examples
• Added project
structure overview and contribution guidelines

+174/-0 
AUTHENTICATION.md
Authentication system documentation and implementation guide

AUTHENTICATION.md

• Added comprehensive authentication system documentation
• Included
JWT-based authentication with role-based access control
• Provided API
endpoint documentation and usage examples
• Added security
considerations and testing instructions

+119/-0 
README.md
Updated terminology from assistant to agent throughout README

README.md

• Updated Product Hunt badge URL from "assistant" to "agent"
• Changed
terminology from "assistant" to "agent" throughout documentation

Updated developer persona reference to use "agent" terminology
• Fixed
roadmap table references to use consistent "Agent" naming

+5/-5     
README.TR.md
Turkish README terminology update to use agent instead of assistant

README.TR.md

• Updated title from "GPT Computer Assistant" to "GPT Computer Agent"

• Changed image alt text references from "Assistant" to "Agent"

Updated terminology to maintain consistency with main README

+3/-3     
Configuration changes
4 files
settings.py
Add comprehensive application settings and configuration 

src/gpt_computer_agent/config/settings.py

• Created comprehensive settings management using Pydantic
BaseSettings
• Added configuration for API, authentication, database,
and platform-specific settings
• Implemented logging configuration and
environment variable support

+113/-0 
alembic.ini
Database migration configuration with Alembic setup           

alembic.ini

• Added Alembic configuration file for database migrations

Configured SQLite database connection string
• Set up logging
configuration for migration operations
• Included standard Alembic
settings and hooks

+111/-0 
pyproject.toml
Modern Python project configuration with pyproject.toml   

pyproject.toml

• Added modern Python project configuration file
• Defined project
metadata, dependencies, and build system
• Included development
dependencies and tool configurations
• Added command-line script entry
point for computeragent

+52/-0   
script.py.mako
Alembic migration script template for database versioning

alembic/script.py.mako

• Added Alembic migration script template
• Included standard revision
tracking and metadata
• Provided upgrade and downgrade function
templates
• Set up proper imports and revision identifiers

+24/-0   
Dependencies
1 files
requirements.txt
Modernized dependencies for web framework and development

requirements.txt

• Streamlined dependencies by removing legacy packages
• Added modern
web framework dependencies (FastAPI, uvicorn)
• Included database
support with SQLAlchemy and Alembic
• Added development tools for
testing and code quality

+37/-50 
Additional files
62 files
release_generation.yml +1/-1     
README.zh_CN.md +0/-160 
README.zh_TW.md +0/-208 
build_macos.sh +132/-0 
macos_build.sh +132/-30
Dockerfile +29/-0   
entrypoint.sh +7/-0     
mcp_langchain.ipynb +0/-272 
setup.sh +42/-0   
__init__.py [link]   
__init__.py +1/-1     
agent_executor.py +1/-1     
agent_tools.py [link]   
assistant.py +2/-2     
background.py [link]   
chat_history.py [link]   
agentic.py [link]   
__init__.py [link]   
input_box.py [link]   
record.py +3/-3     
stt.py [link]   
openai.py [link]   
openai_whisper_local.py [link]   
tts.py [link]   
microsoft_local.py [link]   
openai.py [link]   
wake_word.py [link]   
character.py +2/-2     
classes.py [link]   
ask_anthropic.py [link]   
base.py [link]   
computer.py [link]   
run.py [link]   
custom_callback.py +1/-1     
session.py +46/-0   
display_tools.py +4/-2     
__init__.py [link]   
llmsettings.py +1/-1     
settings.py +2/-2     
signal.py +6/-6     
llm.py [link]   
llm_settings.py [link]   
tool.py [link]   
__init__.py +6/-0     
remote.py [link]   
__init__.py [link]   
shot.py +2/-2     
standard_tools.py [link]   
teams.py [link]   
tooler.py +1/-1     
top_bar_wrapper.py +1/-1     
tracing.py [link]   
db.py [link]   
folder.py [link]   
function.py [link]   
kot_db.py [link]   
icon.icns [link]   
pypi.py [link]   
telemetry.py [link]   
train.py [link]   
user_id.py [link]   
version.py [link]   

Summary by CodeRabbit

  • New Features

    • Aideck rebrand and agent platform: direct/graph workflows, RAG knowledge base, caching, wide embedding provider support, tools, canvas, JWT auth, centralized settings, structured logging, Docker image and entrypoint, dev/run helpers.
  • Documentation

    • README rebranded; adds DEVELOPMENT, TESTING, CLAUDE guides, notebooks and examples; some localized READMEs removed.
  • Tests

    • Pytest config, test runner, basic smoke test, and CI test workflow added.
  • Chores

    • .env template, setup/dev scripts, pre-commit config, publish/TestPyPI workflows added; legacy release/build/refactor CI workflows removed.

FortiShield avatar Sep 26 '25 00:09 FortiShield