$npx -y skills add claude-office-skills/skills --skill ai-agent-builderBuild AI agents with tools, memory, and multi-step reasoning - ChatGPT, Claude, Gemini integration patterns
| 1 | # AI Agent Builder |
| 2 | |
| 3 | Design and build AI agents with tools, memory, and multi-step reasoning capabilities. Covers ChatGPT, Claude, Gemini integration patterns based on n8n's 5,000+ AI workflow templates. |
| 4 | |
| 5 | ## Overview |
| 6 | |
| 7 | This skill covers: |
| 8 | - AI agent architecture design |
| 9 | - Tool/function calling patterns |
| 10 | - Memory and context management |
| 11 | - Multi-step reasoning workflows |
| 12 | - Platform integrations (Slack, Telegram, Web) |
| 13 | |
| 14 | --- |
| 15 | |
| 16 | ## AI Agent Architecture |
| 17 | |
| 18 | ### Core Components |
| 19 | |
| 20 | ``` |
| 21 | ┌─────────────────────────────────────────────────────────────────┐ |
| 22 | │ AI AGENT ARCHITECTURE │ |
| 23 | ├─────────────────────────────────────────────────────────────────┤ |
| 24 | │ │ |
| 25 | │ ┌─────────────┐ ┌─────────────┐ ┌─────────────┐ │ |
| 26 | │ │ Input │────▶│ Agent │────▶│ Output │ │ |
| 27 | │ │ (Query) │ │ (LLM) │ │ (Response) │ │ |
| 28 | │ └─────────────┘ └──────┬──────┘ └─────────────┘ │ |
| 29 | │ │ │ |
| 30 | │ ┌───────────────────┼───────────────────┐ │ |
| 31 | │ │ │ │ │ |
| 32 | │ ▼ ▼ ▼ │ |
| 33 | │ ┌─────────────┐ ┌─────────────┐ ┌─────────────┐ │ |
| 34 | │ │ Tools │ │ Memory │ │ Knowledge │ │ |
| 35 | │ │ (Functions) │ │ (Context) │ │ (RAG) │ │ |
| 36 | │ └─────────────┘ └─────────────┘ └─────────────┘ │ |
| 37 | │ │ |
| 38 | └─────────────────────────────────────────────────────────────────┘ |
| 39 | ``` |
| 40 | |
| 41 | ### Agent Types |
| 42 | |
| 43 | ```yaml |
| 44 | agent_types: |
| 45 | reactive_agent: |
| 46 | description: "Single-turn response, no memory" |
| 47 | use_case: simple_qa, classification |
| 48 | complexity: low |
| 49 | |
| 50 | conversational_agent: |
| 51 | description: "Multi-turn with conversation memory" |
| 52 | use_case: chatbots, support |
| 53 | complexity: medium |
| 54 | |
| 55 | tool_using_agent: |
| 56 | description: "Can call external tools/APIs" |
| 57 | use_case: data_lookup, actions |
| 58 | complexity: medium |
| 59 | |
| 60 | reasoning_agent: |
| 61 | description: "Multi-step planning and execution" |
| 62 | use_case: complex_tasks, research |
| 63 | complexity: high |
| 64 | |
| 65 | multi_agent: |
| 66 | description: "Multiple specialized agents collaborating" |
| 67 | use_case: complex_workflows |
| 68 | complexity: very_high |
| 69 | ``` |
| 70 | |
| 71 | --- |
| 72 | |
| 73 | ## Tool Calling Pattern |
| 74 | |
| 75 | ### Tool Definition |
| 76 | |
| 77 | ```yaml |
| 78 | tool_definition: |
| 79 | name: "get_weather" |
| 80 | description: "Get current weather for a location" |
| 81 | parameters: |
| 82 | type: object |
| 83 | properties: |
| 84 | location: |
| 85 | type: string |
| 86 | description: "City name or coordinates" |
| 87 | units: |
| 88 | type: string |
| 89 | enum: ["celsius", "fahrenheit"] |
| 90 | default: "celsius" |
| 91 | required: ["location"] |
| 92 | |
| 93 | implementation: |
| 94 | type: api_call |
| 95 | endpoint: "https://api.weather.com/v1/current" |
| 96 | method: GET |
| 97 | params: |
| 98 | q: "{location}" |
| 99 | units: "{units}" |
| 100 | ``` |
| 101 | |
| 102 | ### Common Tool Categories |
| 103 | |
| 104 | ```yaml |
| 105 | tool_categories: |
| 106 | data_retrieval: |
| 107 | - web_search: search the internet |
| 108 | - database_query: query SQL/NoSQL |
| 109 | - api_lookup: call external APIs |
| 110 | - file_read: read documents |
| 111 | |
| 112 | actions: |
| 113 | - send_email: send emails |
| 114 | - create_calendar: schedule events |
| 115 | - update_crm: modify CRM records |
| 116 | - post_slack: send Slack messages |
| 117 | |
| 118 | computation: |
| 119 | - calculator: math operations |
| 120 | - code_interpreter: run Python |
| 121 | - data_analysis: analyze datasets |
| 122 | |
| 123 | generation: |
| 124 | - image_generation: create images |
| 125 | - document_creation: generate docs |
| 126 | - chart_creation: create visualizations |
| 127 | ``` |
| 128 | |
| 129 | ### n8n Tool Integration |
| 130 | |
| 131 | ```yaml |
| 132 | n8n_agent_workflow: |
| 133 | nodes: |
| 134 | - trigger: |
| 135 | type: webhook |
| 136 | path: "/ai-agent" |
| 137 | |
| 138 | - ai_agent: |
| 139 | type: "@n8n/n8n-nodes-langchain.agent" |
| 140 | model: openai_gpt4 |
| 141 | system_prompt: | |
| 142 | You are a helpful assistant that can: |
| 143 | 1. Search the web for information |
| 144 | 2. Query our customer database |
| 145 | 3. Send emails on behalf of the user |
| 146 | |
| 147 | tools: |
| 148 | - web_search |
| 149 | - database_query |
| 150 | - send_email |
| 151 | |
| 152 | - respond: |
| 153 | type: respond_to_webhook |
| 154 | data: "{{ $json.output }}" |
| 155 | ``` |
| 156 | |
| 157 | --- |
| 158 | |
| 159 | ## Memory Patterns |
| 160 | |
| 161 | ### Memory Types |
| 162 | |
| 163 | ```yaml |
| 164 | memory_types: |
| 165 | buffer_memory: |
| 166 | description: "Store last N messages" |
| 167 | im |