@agentforge/cli 0.3.4 → 0.3.5

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agentforge/cli",
3
- "version": "0.3.4",
3
+ "version": "0.3.5",
4
4
  "description": "CLI tool for AgentForge - scaffolding, development, and deployment",
5
5
  "type": "module",
6
6
  "bin": {
@@ -18,8 +18,6 @@ const agent = createReActAgent({
18
18
  systemPrompt: 'You are a helpful AI assistant API.',
19
19
  });
20
20
 
21
- const compiledAgent = agent.compile();
22
-
23
21
  // POST /api/agent/chat
24
22
  router.post('/chat', async (req, res) => {
25
23
  try {
@@ -31,7 +29,7 @@ router.post('/chat', async (req, res) => {
31
29
 
32
30
  logger.info('Processing chat request');
33
31
 
34
- const result = await compiledAgent.invoke({
32
+ const result = await agent.invoke({
35
33
  messages: [{ role: 'user', content: message }],
36
34
  });
37
35
 
@@ -30,10 +30,8 @@ export async function analyzeCommand(file: string, options: AnalyzeOptions) {
30
30
  systemPrompt: 'You are a code analysis expert. Analyze the provided file and give insights.',
31
31
  });
32
32
 
33
- const compiledAgent = agent.compile();
34
-
35
33
  // Analyze
36
- const result = await compiledAgent.invoke({
34
+ const result = await agent.invoke({
37
35
  messages: [
38
36
  {
39
37
  role: 'user',
@@ -23,7 +23,6 @@ export async function chatCommand(options: ChatOptions) {
23
23
  systemPrompt: 'You are a helpful AI assistant in a CLI chat session.',
24
24
  });
25
25
 
26
- const compiledAgent = agent.compile();
27
26
  const messages: any[] = [];
28
27
 
29
28
  while (true) {
@@ -49,7 +48,7 @@ export async function chatCommand(options: ChatOptions) {
49
48
  try {
50
49
  messages.push({ role: 'user', content: message });
51
50
 
52
- const result = await compiledAgent.invoke({ messages });
51
+ const result = await agent.invoke({ messages });
53
52
  const response = result.messages[result.messages.length - 1].content;
54
53
 
55
54
  messages.push({ role: 'assistant', content: response });
@@ -54,12 +54,9 @@ async function main() {
54
54
  maxIterations: 10,
55
55
  });
56
56
 
57
- // Compile the agent
58
- const compiledAgent = agent.compile();
59
-
60
57
  // Run the agent
61
58
  logger.info('Running agent...');
62
- const result = await compiledAgent.invoke({
59
+ const result = await agent.invoke({
63
60
  messages: [
64
61
  {
65
62
  role: 'user',
@@ -49,11 +49,8 @@ async function main() {
49
49
  systemPrompt: 'You are a helpful AI assistant.',
50
50
  });
51
51
 
52
- // Compile the agent
53
- const compiledAgent = agent.compile();
54
-
55
52
  // Run the agent
56
- const result = await compiledAgent.invoke({
53
+ const result = await agent.invoke({
57
54
  messages: [{ role: 'user', content: 'Hello! What can you help me with?' }],
58
55
  });
59
56