Demo: Full-featured agent with all capabilities.
()
| 22 | |
| 23 | |
| 24 | async def demo_full_agent(): |
| 25 | """Demo: Full-featured agent with all capabilities.""" |
| 26 | print("\n" + "=" * 60) |
| 27 | print("Full Mini Agent - All Features Enabled") |
| 28 | print("=" * 60) |
| 29 | |
| 30 | # Load configuration |
| 31 | config_path = Path("mini_agent/config/config.yaml") |
| 32 | if not config_path.exists(): |
| 33 | print("❌ config.yaml not found. Please run:") |
| 34 | print(" cp mini_agent/config/config-example.yaml mini_agent/config/config.yaml") |
| 35 | return |
| 36 | |
| 37 | config = Config.from_yaml(config_path) |
| 38 | |
| 39 | # Check API key |
| 40 | if not config.llm.api_key or config.llm.api_key.startswith("YOUR_"): |
| 41 | print("❌ API key not configured in config.yaml") |
| 42 | return |
| 43 | |
| 44 | # Create workspace |
| 45 | with tempfile.TemporaryDirectory() as workspace_dir: |
| 46 | print(f"📁 Workspace: {workspace_dir}") |
| 47 | |
| 48 | # Load system prompt (Agent will auto-inject workspace info) |
| 49 | system_prompt_path = Path("mini_agent/config/system_prompt.md") |
| 50 | if system_prompt_path.exists(): |
| 51 | system_prompt = system_prompt_path.read_text(encoding="utf-8") |
| 52 | else: |
| 53 | system_prompt = "You are a helpful AI assistant." |
| 54 | |
| 55 | # Add Session Note instructions |
| 56 | note_instructions = """ |
| 57 | |
| 58 | IMPORTANT - Session Memory: |
| 59 | You have record_note and recall_notes tools. Use them to: |
| 60 | - Save important facts, decisions, and context |
| 61 | - Recall previous information across conversations |
| 62 | """ |
| 63 | system_prompt += note_instructions |
| 64 | |
| 65 | # Initialize LLM |
| 66 | llm_client = LLMClient( |
| 67 | api_key=config.llm.api_key, |
| 68 | api_base=config.llm.api_base, |
| 69 | model=config.llm.model, |
| 70 | ) |
| 71 | |
| 72 | # Initialize basic tools |
| 73 | tools = [ |
| 74 | ReadTool(workspace_dir=workspace_dir), |
| 75 | WriteTool(workspace_dir=workspace_dir), |
| 76 | EditTool(workspace_dir=workspace_dir), |
| 77 | BashTool(), |
| 78 | ] |
| 79 | print("✓ Loaded 4 basic tools") |
| 80 | |
| 81 | # Add Session Note tools |
no test coverage detected