@iqai/adk 0.0.15 → 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,23 @@
1
1
  # @iqai/adk
2
2
 
3
+ ## 0.1.1
4
+
5
+ ### Patch Changes
6
+
7
+ - 8b45e2b: Adds agent builder to create agents with minimal boiler plate
8
+
9
+ ## 0.1.0
10
+
11
+ ### Minor Changes
12
+
13
+ - 481e0da: Rewrites common interfaces to match more close to adk-python
14
+
15
+ ### Patch Changes
16
+
17
+ - 1741097: Fixes openai models not getting system message
18
+ - 75309a1: postgres-session-service: new fromConnectionString() factory method. fix minor duplication bug
19
+ - 33b1887: added planners
20
+
3
21
  ## 0.0.15
4
22
 
5
23
  ### Patch Changes
package/README.md CHANGED
@@ -68,7 +68,7 @@ dotenv.config();
68
68
  // Instantiate the agent
69
69
  const myAgent = new Agent({
70
70
  name: "simple_query_assistant",
71
- model: "gemini-2.5-flash-preview-05-20", // Or "gpt-4-turbo", "claude-3-opus"
71
+ model: "gemini-2.5-flash", // Or "gpt-4-turbo", "claude-3-opus"
72
72
  description: "A basic assistant to answer questions.",
73
73
  instructions: "You are a helpful AI. Respond clearly and concisely."
74
74
  });
@@ -92,6 +92,68 @@ async function runQuery() {
92
92
  runQuery();
93
93
  ```
94
94
 
95
+ ## 🎯 AgentBuilder - Simplified Agent Creation
96
+
97
+ The `AgentBuilder` provides a fluent interface for creating agents with minimal boilerplate. It's perfect for rapid prototyping and reduces the complexity of agent setup.
98
+
99
+ ```typescript
100
+ import { AgentBuilder } from '@iqai/adk';
101
+ import dotenv from 'dotenv';
102
+
103
+ dotenv.config();
104
+
105
+ // Simple agent creation and execution in one fluent chain
106
+ async function quickQuery() {
107
+ const response = await AgentBuilder
108
+ .create("query_assistant")
109
+ .withModel("gemini-2.5-flash")
110
+ .withInstruction("You are a helpful AI. Respond clearly and concisely.")
111
+ .withQuickSession("my-app", "user-123")
112
+ .ask("What is the capital of France?");
113
+
114
+ console.log(response);
115
+ }
116
+
117
+ // For more complex scenarios, build the agent and get full control
118
+ async function advancedSetup() {
119
+ const { agent, runner, session } = await AgentBuilder
120
+ .create("research_assistant")
121
+ .withModel("gpt-4-turbo")
122
+ .withDescription("An advanced research assistant")
123
+ .withInstruction("You are a research assistant with access to various tools")
124
+ .withTools(new GoogleSearchTool(), new FileOperationsTool())
125
+ .withQuickSession("research-app", "researcher-456")
126
+ .build();
127
+
128
+ // Now you have full access to agent, runner, and session for advanced usage
129
+ console.log(`Created agent: ${agent.name}`);
130
+ }
131
+
132
+ // Specialized agent types for orchestration
133
+ async function createWorkflowAgent() {
134
+ // Sequential execution of multiple agents
135
+ const workflow = await AgentBuilder
136
+ .create("data_pipeline")
137
+ .asSequential([dataCollector, dataProcessor, dataAnalyzer])
138
+ .withQuickSession("pipeline-app", "admin")
139
+ .build();
140
+
141
+ // Parallel execution for concurrent tasks
142
+ const parallelAnalysis = await AgentBuilder
143
+ .create("multi_analysis")
144
+ .asParallel([sentimentAnalyzer, topicExtractor, summaryGenerator])
145
+ .build();
146
+ }
147
+ ```
148
+
149
+ **Benefits of AgentBuilder:**
150
+ - **Reduced Boilerplate**: ~80% less setup code compared to manual configuration
151
+ - **Fluent Interface**: Readable, chainable method calls
152
+ - **Automatic Management**: Handles session and runner creation automatically
153
+ - **Quick Execution**: Built-in `ask()` method for immediate responses
154
+ - **Flexible**: Supports all agent types (LLM, Sequential, Parallel, Loop, LangGraph)
155
+ - **Backward Compatible**: Works alongside existing ADK patterns
156
+
95
157
  ## 🛠️ Using Tools with an Agent
96
158
 
97
159
  Extend your agent's capabilities by defining and integrating custom tools.