Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ export default {

// Base URL configuration (for providers that need it)
baseUrl: 'http://localhost:11434', // Example for Ollama

// MCP configuration
mcp: {
servers: [
Expand Down Expand Up @@ -182,4 +182,4 @@ Please see [CONTRIBUTING.md](CONTRIBUTING.md) for details on how to contribute t

## License

This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
83 changes: 0 additions & 83 deletions docs/github-comment-commands.md

This file was deleted.

1 change: 0 additions & 1 deletion docs/release-process.md

This file was deleted.

130 changes: 0 additions & 130 deletions docs/tools/agent-tools.md

This file was deleted.

17 changes: 12 additions & 5 deletions packages/agent/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,29 +69,36 @@ MyCoder Agent supports the Model Context Protocol:
## Available Tools

### File & Text Manipulation

- **textEditor**: View, create, and edit files with persistent state
- Commands: view, create, str_replace, insert, undo_edit
- Line number support and partial file viewing

### System Interaction

- **shellStart**: Execute shell commands with sync/async modes
- **shellMessage**: Interact with running shell processes
- **shellExecute**: One-shot shell command execution
- **listShells**: List all running shell processes

### Agent Management

- **agentStart**: Create sub-agents for parallel tasks
- **agentMessage**: Send messages to sub-agents
- **agentMessage**: Send messages to sub-agents and retrieve their output (including captured logs)
- **agentDone**: Complete the current agent's execution
- **listAgents**: List all running agents

The agent system automatically captures log, warn, and error messages from agents and their immediate tools, which are included in the output returned by agentMessage.

### Network & Web

- **fetch**: Make HTTP requests to APIs
- **sessionStart**: Start browser automation sessions
- **sessionMessage**: Control browser sessions (navigation, clicking, typing)
- **listSessions**: List all browser sessions

### Utility Tools

- **sleep**: Pause execution for a specified duration
- **userPrompt**: Request input from the user

Expand Down Expand Up @@ -145,10 +152,10 @@ const tools = [textEditorTool, shellStartTool];

// Run the agent
const result = await toolAgent(
"Write a simple Node.js HTTP server and save it to server.js",
'Write a simple Node.js HTTP server and save it to server.js',
tools,
{
getSystemPrompt: () => "You are a helpful coding assistant...",
getSystemPrompt: () => 'You are a helpful coding assistant...',
maxIterations: 10,
},
{
Expand All @@ -157,7 +164,7 @@ const result = await toolAgent(
model: 'claude-3-opus-20240229',
apiKey: process.env.ANTHROPIC_API_KEY,
workingDirectory: process.cwd(),
}
},
);

console.log('Agent result:', result);
Expand All @@ -169,4 +176,4 @@ We welcome contributions! Please see our [CONTRIBUTING.md](../CONTRIBUTING.md) f

## License

MIT
MIT
10 changes: 5 additions & 5 deletions packages/agent/src/core/executeToolCall.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,9 +73,9 @@ export const executeToolCall = async (
if (tool.logParameters) {
tool.logParameters(validatedJson, toolContext);
} else {
logger.info('Parameters:');
logger.log('Parameters:');
Object.entries(validatedJson).forEach(([name, value]) => {
logger.info(` - ${name}: ${JSON.stringify(value).substring(0, 60)}`);
logger.log(` - ${name}: ${JSON.stringify(value).substring(0, 60)}`);
});
}

Expand Down Expand Up @@ -103,12 +103,12 @@ export const executeToolCall = async (
if (tool.logReturns) {
tool.logReturns(output, toolContext);
} else {
logger.info('Results:');
logger.log('Results:');
if (typeof output === 'string') {
logger.info(` - ${output}`);
logger.log(` - ${output}`);
} else if (typeof output === 'object') {
Object.entries(output).forEach(([name, value]) => {
logger.info(` - ${name}: ${JSON.stringify(value).substring(0, 60)}`);
logger.log(` - ${name}: ${JSON.stringify(value).substring(0, 60)}`);
});
}
}
Expand Down
2 changes: 1 addition & 1 deletion packages/agent/src/core/toolAgent/toolAgentCore.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ describe('toolAgentCore empty response detection', () => {
const fileContent = `
if (!text.length && toolCalls.length === 0) {
// Only consider it empty if there's no text AND no tool calls
logger.verbose('Received truly empty response from agent (no text and no tool calls), sending reminder');
logger.debug('Received truly empty response from agent (no text and no tool calls), sending reminder');
messages.push({
role: 'user',
content: [
Expand Down
Loading
Loading