Features
- ReAct agent pattern with LlamaIndex
- Custom function tools for task management
- Duration analysis and productivity tracking
- Task estimation capabilities
- Easy-to-extend architecture
Prerequisites
- Python 3.10 or higher
- Nebius API key from Nebius Token Factory
Installation
Implementation
Custom Function Tools
Create function tools for task management:main.py
ReAct Agent Setup
main.py
Usage Example
main.py
Usage
Run the agent:Example Queries
Try these queries with your task management assistant:- “If I worked from 09:00 to 17:00 and completed 8 tasks, what was my productivity rate?”
- “How long will it take to complete 3 tasks that each take 45 minutes?”
- “Calculate the duration between 09:00 and 17:00”
- “I need to complete 10 tasks, each taking 30 minutes. How long will it take?”
Technical Details
ReAct Pattern
The agent uses LlamaIndex’s ReAct (Reasoning and Acting) pattern:- Reason: Analyze the user’s query
- Act: Select and execute appropriate tools
- Observe: Process tool results
- Repeat: Continue until task is complete
LlamaIndex
Agent framework with ReAct pattern
Nebius AI
Qwen/Qwen3-235B-A22B model
Function Tools
Custom task management functions
Python datetime
Time calculations and formatting
Extending the Agent
Add New Tools
Create additional function tools:Customize LLM Settings
Add Structured Output
Architecture
Best Practices
Tool Design
Tool Design
- Keep tools focused on single responsibilities
- Provide clear docstrings for tool functions
- Include input validation and error handling
- Return structured, parseable results
Agent Configuration
Agent Configuration
- Use verbose mode during development
- Choose appropriate models for your use case
- Set reasonable temperature and token limits
- Test with various query types
Error Handling
Error Handling
- Validate input formats in tool functions
- Provide helpful error messages
- Handle edge cases (zero values, negative numbers)
- Log errors for debugging
Next Steps
RAG with LlamaIndex
Build retrieval-augmented generation apps
Multi-Agent Systems
Create complex agent workflows