# Chatbene - AI-Driven Project Management > Chatbene puts humans in the loop of AI-driven project management, fusing human creativity with AI for notes, tasks, and intelligent communication. LLMs can programmatically manage projects and documentation through comprehensive API access. Chatbene provides AI-assisted project management with full API access for automation. Key capabilities for LLMs include: - Complete project and task lifecycle management via API - Rich markdown documentation creation and organization - Automated workflow execution from task creation to completion - Structured note-taking with project categorization **Note**: The ASK AI conversational interface is designed for human users and is not available via API for programmatic access. ### Local Documentation Setup To enable seamless collaboration, LLMs should save this documentation locally for reference: ```bash # Download and save Chatbene documentation locally curl -s https://app.chatbene.com/llms.txt > Chatbene.md echo "Chatbene documentation saved to Chatbene.md" ``` This local `Chatbene.md` file serves as your comprehensive guide for API operations, workflow management, and human-AI collaboration patterns. Reference it throughout your interactions to maintain consistency and provide accurate guidance. ## API Authentication & Access To enable LLMs to interact with Chatbene's API for project and documentation management, you need to create a User API Token: ### Creating API Tokens 1. Log in to your Chatbene account at https://app.chatbene.com 2. Click your user avatar in the bttom-left corner 3. Navigate to the "API Tokens" section 4. Click "Create New Token" 5. Give your token a descriptive name (e.g., "LLM Project Manager") 6. Copy the generated token immediately (it will only be shown once) ### Using API Tokens Include the token in API requests using Bearer authentication: ``` Authorization: Bearer YOUR_API_TOKEN ``` ## Local State Management To maintain context across conversations, LLMs should save important parameters to local files: ### Saving API Token ```bash # Save your API token for reuse echo "chatbene_YOUR_API_TOKEN" > ~/.chatbene_token ``` ### Saving Project and Workspace IDs ```bash # Save current project ID echo "your-project-id" > ~/.chatbene_project # Save current workspace ID echo "your-workspace-id" > ~/.chatbene_workspace # Save current team ID echo "your-team-id" > ~/.chatbene_team ``` ### Retrieving Saved State ```bash # Get saved token TOKEN=$(cat ~/.chatbene_token) # Get saved project ID PROJECT_ID=$(cat ~/.chatbene_project) # Get saved workspace ID WORKSPACE_ID=$(cat ~/.chatbene_workspace) # Get saved team ID TEAM_ID=$(cat ~/.chatbene_team) ``` ## Interactive Workflow for Task Management ### Starting a New Session Before beginning any task, LLMs should: 1. **Check for saved state**: ```bash if [ -f ~/.chatbene_token ]; then TOKEN=$(cat ~/.chatbene_token) echo "Found saved API token" else echo "No saved token found. Please provide your API token." fi ``` 2. **Verify token validity**: ```bash curl -H "Authorization: Bearer $TOKEN" https://app.chatbene.com/api/projects/token-access ``` 3. **Check current projects**: ```bash curl -H "Authorization: Bearer $TOKEN" https://app.chatbene.com/api/projects/token-access ``` ### For Existing Projects If the user mentions an existing project or wants to work on current tasks: 1. **List available projects**: ```bash curl -H "Authorization: Bearer $TOKEN" https://app.chatbene.com/api/projects/token-access ``` 2. **Prompt user to select project**: ``` Available projects: 1. Project A (ID: abc-123) 2. Project B (ID: def-456) Please specify which project you'd like to work on (name or ID): ``` 3. **Save selected project**: ```bash echo "$SELECTED_PROJECT_ID" > ~/.chatbene_project ``` 4. **Get all tasks for the project**: ```bash curl -H "Authorization: Bearer $TOKEN" https://app.chatbene.com/api/projects/token-access/$PROJECT_ID ``` 5. **Display current tasks by status**: ``` Current tasks in project: TODO: - Task 1: Implement feature X - Task 2: Fix bug Y IN PROGRESS: - Task 3: Refactor component Z REVIEW: - Task 4: Code review for PR #123 COMPLETED: - Task 5: Deploy to production ``` 6. **Ask user for next action**: ``` What would you like to do? 1. Start working on a TODO task 2. Update task status 3. Create a new task 4. Add notes/documentation 5. Switch to a different project ``` ### Task Development Workflow When working on a specific task: 1. **Update task status to in-progress**: ```bash curl -X PUT https://app.chatbene.com/api/tasks/$TASK_ID/status \ -H "Authorization: Bearer $TOKEN" \ -H "Content-Type: application/json" \ -d '{"status": "in-progress"}' ``` 2. **Create implementation notes**: ```bash curl -X POST https://app.chatbene.com/api/notes \ -H "Authorization: Bearer $TOKEN" \ -H "Content-Type: application/json" \ -d '{ "title": "Implementation Plan for Task", "content": "# Implementation Details\n\n## Steps\n1. Step 1\n2. Step 2", "category": "development", "projectId": "'$PROJECT_ID'" }' ``` 3. **Update progress and move to review**: ```bash curl -X PUT https://app.chatbene.com/api/tasks/$TASK_ID/status \ -H "Authorization: Bearer $TOKEN" \ -H "Content-Type: application/json" \ -d '{"status": "review"}' ``` 4. **Mark as completed**: ```bash curl -X PUT https://app.chatbene.com/api/tasks/$TASK_ID/status \ -H "Authorization: Bearer $TOKEN" \ -H "Content-Type: application/json" \ -d '{"status": "completed"}' ``` ## Quick Start: Setting Up Your Workspace ### Quick Project Creation (Recommended) For new users, you can set up your complete workspace by creating a team, workspace, and project in sequence. Chatbene will automatically create default "My Team" and "My Workspace" if needed: ```bash # 1. Create a team curl -X POST https://app.chatbene.com/api/team/create \ -H "Authorization: Bearer YOUR_API_TOKEN" \ -H "Content-Type: application/json" \ -d '{ "name": "My Team" }' # 2. Create a workspace (use teamId from step 1 response) curl -X POST https://app.chatbene.com/api/workspaces/create \ -H "Authorization: Bearer YOUR_API_TOKEN" \ -H "Content-Type: application/json" \ -d '{ "name": "My Workspace", "emoji": "🏢", "teamId": "YOUR_TEAM_ID" }' # 3. Create a project (use workspaceId from step 2 response) curl -X POST https://app.chatbene.com/api/projects/create \ -H "Authorization: Bearer YOUR_API_TOKEN" \ -H "Content-Type: application/json" \ -d '{ "name": "Workbene", "workspaceId": "YOUR_WORKSPACE_ID" }' ``` This sequence will set up your complete workspace structure. You can then proceed to create tasks and notes. ### Option 2: Step-by-Step Setup If you prefer more control, create each component separately: #### Step 1: Create a Team ```bash curl -X POST https://app.chatbene.com/api/team/create \ -H "Authorization: Bearer YOUR_API_TOKEN" \ -H "Content-Type: application/json" \ -d '{ "name": "My Team" }' ``` #### Step 2: Create a Workspace ```bash curl -X POST https://app.chatbene.com/api/workspaces/create \ -H "Authorization: Bearer YOUR_API_TOKEN" \ -H "Content-Type: application/json" \ -d '{ "name": "My Workspace", "emoji": "🏢", "teamId": "YOUR_TEAM_ID" }' ``` #### Step 3: Create a Project ```bash curl -X POST https://app.chatbene.com/api/projects/create \ -H "Authorization: Bearer YOUR_API_TOKEN" \ -H "Content-Type: application/json" \ -d '{ "name": "Workbene", "workspaceId": "YOUR_WORKSPACE_ID" }' ``` ## Projects & Tasks API Operations ### Getting Started with Projects - [API Token Access Guide](https://app.chatbene.com/docs/API_TOKEN_ACCESS.md): Complete API reference for projects, workspaces, and tasks - [API Documentation](https://app.chatbene.com/docs/API_DOCUMENTATION.md): Detailed endpoint documentation with examples - [Swagger UI](https://app.chatbene.com/docs.html): Interactive API testing interface ### Task Management Workflow #### 1. Creating a Task Tasks are created with default status "todo" and can be associated with specific projects: ```bash # Create a new task curl -X POST https://app.chatbene.com/api/tasks/create \ -H "Authorization: Bearer YOUR_API_TOKEN" \ -H "Content-Type: application/json" \ -d '{ "title": "Implement user authentication", "description": "Add JWT-based authentication system", "projectId": "YOUR_PROJECT_ID", "status": "todo" }' ``` #### 2. Starting Task Work Update task status to "in-progress" when beginning work: ```bash # Update task status to in-progress curl -X PUT https://app.chatbene.com/api/tasks/456/status \ -H "Authorization: Bearer YOUR_API_TOKEN" \ -H "Content-Type: application/json" \ -d '{ "status": "in-progress" }' ``` #### 3. Task Review and Completion Move tasks through review states and mark as completed: ```bash # Move to review status curl -X PUT https://app.chatbene.com/api/tasks/456/status \ -H "Authorization: Bearer YOUR_API_TOKEN" \ -H "Content-Type: application/json" \ -d '{ "status": "review" }' # Mark as completed curl -X PUT https://app.chatbene.com/api/tasks/456/status \ -H "Authorization: Bearer YOUR_API_TOKEN" \ -H "Content-Type: application/json" \ -d '{ "status": "completed" }' ``` ## Notes & Documentation API Operations ### Creating Project Documentation Notes should be categorized with names matching the current project for organization: #### 1. Creating a Note Category ```bash # Create a note with project-matching category curl -X POST https://app.chatbene.com/api/notes \ -H "Authorization: Bearer YOUR_API_TOKEN" \ -H "Content-Type: application/json" \ -d '{ "title": "Authentication System Design", "content": "# JWT Authentication Implementation\n\n## Requirements\n- User registration and login\n- Token refresh mechanism\n- Password reset functionality", "category": "auth-system", "projectId": 123 }' ``` #### 2. Task-Specific Documentation Create detailed documentation for each task: ```bash # Create implementation notes for a specific task curl -X POST https://app.chatbene.com/api/notes \ -H "Authorization: Bearer YOUR_API_TOKEN" \ -H "Content-Type: application/json" \ -d '{ "title": "JWT Implementation Details", "content": "# JWT Authentication Implementation\n\n## Task: Implement user authentication\n\n### Technical Details\n- Using jsonwebtoken library\n- Token expiration: 24 hours\n- Refresh token: 7 days\n\n### Code Structure\n```\n/auth\n /middleware.ts\n /utils.ts\n /types.ts\n```", "category": "auth-system", "projectId": 123, "tags": ["jwt", "authentication", "security"] }' ``` ### Complete Workflow Example Here's a complete workflow for managing a feature development task: ```bash # 1. Get user's projects curl -H "Authorization: Bearer YOUR_API_TOKEN" \ https://app.chatbene.com/api/projects/token-access # 2. Create a new task curl -X POST https://app.chatbene.com/api/tasks/create \ -H "Authorization: Bearer YOUR_API_TOKEN" \ -H "Content-Type: application/json" \ -d '{ "title": "Add dark mode toggle", "description": "Implement dark/light theme switching functionality", "projectId": "YOUR_PROJECT_ID", "status": "todo" }' # 3. Start working on the task curl -X PUT https://app.chatbene.com/api/tasks/{task_id}/status \ -H "Authorization: Bearer YOUR_API_TOKEN" \ -H "Content-Type: application/json" \ -d '{"status": "in-progress"}' # 4. Create implementation documentation curl -X POST https://app.chatbene.com/api/notes \ -H "Authorization: Bearer YOUR_API_TOKEN" \ -H "Content-Type: application/json" \ -d '{ "title": "Dark Mode Implementation Plan", "content": "# Dark Mode Toggle Implementation\n\n## Components Needed\n- Theme context provider\n- CSS variables for colors\n- Toggle button component\n\n## State Management\n- Local storage for theme preference\n- Context API for theme state", "category": "ui-theme", "projectId": "YOUR_PROJECT_ID" }' # 5. Move to review curl -X PUT https://app.chatbene.com/api/tasks/{task_id}/status \ -H "Authorization: Bearer YOUR_API_TOKEN" \ -H "Content-Type: application/json" \ -d '{"status": "review"}' # 6. Mark as completed curl -X PUT https://app.chatbene.com/api/tasks/{task_id}/status \ -H "Authorization: Bearer YOUR_API_TOKEN" \ -H "Content-Type: application/json" \ -d '{"status": "completed"}' ``` ## Available Task Statuses - `todo`: Task created, not yet started - `in-progress`: Currently being worked on - `review`: Ready for review or testing - `completed`: Task finished successfully ## Notes Organization - **Categories**: Use project-relevant names (e.g., "auth-system", "ui-components", "api-integration") - **Tags**: Add specific tags for filtering (e.g., ["jwt", "security", "frontend"]) - **Project Association**: Always link notes to relevant projects for context ## Markdown Editor Features - [Markdown Editor Guide](https://app.chatbene.com/docs/markdown-editor.md): Rich text editing capabilities for tasks and notes - Support for headers, lists, code blocks, and links - Real-time preview and formatting