Projects
Projects are a powerful organizational feature in Agent Mesh that enable users to group related chat sessions, manage artifacts and maintain context across multiple conversations. They provide a workspace-like environment for managing AI interactions around specific topics, tasks, or domains.
Projects are organizational containers that group related chat sessions and knowledge artifacts together, enabling better context management and collaboration across multiple AI conversations.
Key Features
-
Session Organization: Group related chat sessions under a single project for better organization and context management.
-
Knowledge Management: Store and manage files, documents, and other artifacts that can be referenced across all sessions within a project.
-
Custom Instructions: Define project-specific instructions (system prompt) that apply to all chat sessions within the project, ensuring consistent AI behavior.
-
Default Agent Configuration: Set a default agent for the project, streamlining the chat creation process.
-
Soft Delete: Projects and sessions can be safely deleted with the ability to recover them if needed (logical delete).
-
Search Capabilities: Search chat titles within a project or across all projects to quickly find relevant conversations.
-
Session Mobility: Move chat sessions between projects to reorganize your work as needs evolve.
How Projects Work
Projects provide a hierarchical structure for organizing your AI interactions. Each project contains:
- Project Metadata: Name, description, system prompt, and default agent configuration
- Chat Sessions: Multiple conversation threads that inherit project settings
- Project Knowledge: Files and documents accessible across all sessions
Project Components
Project Metadata
Each project contains the following metadata:
- Name: A descriptive name for the project (required)
- Description: Optional detailed description of the project's purpose
- System Prompt: Custom instructions that apply to all chat sessions in the project
- Default Agent: The agent that will be used by default for new sessions in this project
- Created/Updated Timestamps: Automatic tracking of project creation and modification times
Chat Sessions
Projects can contain multiple chat sessions, each representing a separate conversation thread. Sessions within a project:
- Inherit the project's instructions (if defined)
- Use the project's default agent (if specified)
- Can access project-level artifacts
- Can be moved between projects
- Can be searched and filtered
Knowledge (Artifacts)
Projects support two types of knowledge artifacts:
- Project-Level Knowledge: Files attached to the project itself (shown in the "Knowledge" section), accessible by all sessions
- Session-Level Artifacts: Files attached to specific chat sessions within the project
Knowledge artifacts can include:
- Documents (PDF, DOCX, TXT, MD)
- Images (PNG, JPG, GIF)
- Code files
- Data files (JSON, CSV, YAML)
- Any other file type supported by the system
Configuration
Disabling Projects
Projects require SQL database persistence to function. Configure persistence in your shared_config.yaml:
session_service:
type: sql
database_url: "sqlite:///./data/sessions.db"
Projects are enabled by default when persistence is configured. To disable the feature:
# Disable projects explicitly
projects:
enabled: false
Feature Flag Control
You can also control projects via feature flags:
frontend_feature_enablement:
projects: false # Disable projects
taskLogging: true
The feature flag resolution follows this priority:
- Persistence Check: If persistence is disabled, projects are disabled (non-negotiable)
- Explicit Config:
projects.enabledsetting - Feature Flag:
frontend_feature_enablement.projectssetting - Default: Enabled (if persistence is enabled and no explicit disable)
Soft Delete Pattern
Projects and sessions use a soft delete pattern for data preservation:
- Deleted items are marked with
deleted_attimestamp - Deleted items are automatically filtered from queries
- Data remains in database for audit trails
- Can be recovered if needed
Best Practices
Project Organization
- Use Descriptive Names: Give projects clear, descriptive names that reflect their purpose
- Define Instructions: Set project-specific instructions (system prompts) to ensure consistent AI behavior
- Organize by Topic: Group related conversations under the same project
- Regular Cleanup: Periodically review and delete unused projects
Knowledge Management
- Upload Relevant Files: Only upload files that are relevant to the project in the Knowledge section
- Use Metadata: Add descriptions to knowledge artifacts for better organization
- File Naming: Use clear, descriptive filenames
- Size Considerations: Be mindful of file sizes for performance
Session Management
- Move Sessions: Reorganize sessions between projects as needs evolve
- Use Search: Leverage search to find relevant conversations quickly
- Delete Unused Sessions: Clean up old or irrelevant sessions
- Consistent Naming: Use clear session names for easier searching
Troubleshooting
Projects Not Visible
If projects are not showing up in the UI:
-
Check Persistence Configuration:
session_service:
type: sql # Must be 'sql', not 'memory' -
Check if Projects are Explicitly Disabled:
projects:
enabled: false # Remove this line or set to true -
Check Feature Flags:
frontend_feature_enablement:
projects: true # Should be true or omitted -
Verify Config Endpoint:
curl http://localhost:8000/api/v1/config | jq '.frontend_feature_enablement.projects'
API Returns 501 Error
When project endpoints return 501 Not Implemented:
- Persistence disabled: Configure
session_service.type: sql - Explicitly disabled: Remove
projects.enabled: falseor set totrue - Feature flag disabled: Set
frontend_feature_enablement.projects: true
Performance Considerations
Database Optimization
- Indexes: Projects use indexes on
user_id,deleted_at, and search columns - Eager Loading: Related data is loaded efficiently to prevent N+1 queries
- Pagination: Search results are paginated to handle large datasets
Artifact Storage
Project artifacts use the configured artifact store. See Configurations - Artifact Service for more details.
Security
Authorization
- All project operations validate user ownership
- Sessions can only be moved to projects owned by the user
- Knowledge artifacts are scoped to user and project/session context
Data Privacy
- Soft-deleted data remains in database (consider retention policies)
- User ID tracked for all operations
- Consider implementing hard delete for GDPR compliance