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
5 changes: 2 additions & 3 deletions multimodal/omni-tars/code-agent/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"dev": "rslib build --watch",
"build": "rslib build",
"test": "vitest",
"dev:agent": "tarko --agent ./"
"dev:agent": "../../tarko/agent-cli/bin/cli.js run ./"
},
"dependencies": {
"@tarko/agent": "workspace:*",
Expand All @@ -36,7 +36,6 @@
"@types/node": "22.15.30",
"typescript": "^5.5.3",
"vitest": "^1.0.0",
"openai": "4.93.0",
"@tarko/agent-cli": "workspace:*"
"openai": "4.93.0"
}
}
5 changes: 2 additions & 3 deletions multimodal/omni-tars/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"build": "rslib build",
"test": "vitest",
"coverage": "vitest run --coverage",
"dev:agent": "tarko --agent ./"
"dev:agent": "../../tarko/agent-cli/bin/cli.js run ./"
},
"dependencies": {
"@tarko/agent": "workspace:*",
Expand All @@ -39,7 +39,6 @@
"@vitest/coverage-v8": "^1.0.0",
"typescript": "^5.5.3",
"vitest": "^1.0.0",
"openai": "4.93.0",
"@tarko/agent-cli": "workspace:*"
"openai": "4.93.0"
}
}
5 changes: 2 additions & 3 deletions multimodal/omni-tars/gui-agent/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"dev": "rslib build --watch",
"build": "rslib build",
"test": "vitest",
"dev:agent": "tarko --agent ./"
"dev:agent": "../../tarko/agent-cli/bin/cli.js run ./"
},
"dependencies": {
"@tarko/agent": "workspace:*",
Expand All @@ -41,7 +41,6 @@
"@types/node": "22.15.30",
"typescript": "^5.5.3",
"vitest": "^1.0.0",
"openai": "4.93.0",
"@tarko/agent-cli": "workspace:*"
"openai": "4.93.0"
}
}
5 changes: 2 additions & 3 deletions multimodal/omni-tars/mcp-agent/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"dev": "rslib build --watch",
"build": "rslib build",
"test": "vitest",
"dev:agent": "tarko --agent ./"
"dev:agent": "../../tarko/agent-cli/bin/cli.js run ./"
},
"dependencies": {
"@tarko/agent": "workspace:*",
Expand All @@ -37,7 +37,6 @@
"@types/node": "22.15.30",
"typescript": "^5.5.3",
"vitest": "^1.0.0",
"openai": "4.93.0",
"@tarko/agent-cli": "workspace:*"
"openai": "4.93.0"
}
}
3 changes: 1 addition & 2 deletions multimodal/omni-tars/omni-agent/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"dev": "rslib build --watch",
"build": "rslib build",
"test": "vitest",
"dev:agent": "tarko run ./"
"dev:agent": "../../tarko/agent-cli/bin/cli.js run ./"
},
"dependencies": {
"@omni-tars/code-agent": "workspace:*",
Expand All @@ -34,7 +34,6 @@
},
"devDependencies": {
"@rslib/core": "0.10.0",
"@tarko/agent-cli": "workspace:*",
"@tarko/agent-interface": "workspace:*",
"@tarko/interface": "workspace:*",
"@types/node": "22.15.30",
Expand Down
24 changes: 9 additions & 15 deletions multimodal/pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

21 changes: 21 additions & 0 deletions multimodal/tarko/agent-cli/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,11 @@ npm install @tarko/agent-cli
# Start interactive Web UI (default)
tarko

# Run with built-in agents
tarko run agent-tars # Agent TARS
tarko run omni-tars # Omni TARS
tarko run mcp-agent # MCP Agent

# Run with custom agent
tarko run ./my-agent.js

Expand All @@ -29,6 +34,21 @@ tarko --headless --input "Analyze current directory structure"
echo "Summarize this code" | tarko --headless
```

## Built-in Agents

Tarko CLI includes several built-in agents:

- **`agent-tars`** - Agent TARS: Advanced task automation and reasoning system
- **`omni-tars`** - Omni TARS: Multi-modal agent with comprehensive capabilities
- **`mcp-agent`** - MCP Agent: Model Context Protocol agent for tool integration

```bash
# Use built-in agents
tarko run agent-tars
tarko run omni-tars
tarko run mcp-agent
```

## Core Commands

### `tarko` / `tarko run`
Expand All @@ -37,6 +57,7 @@ Launches **interactive Web UI** for real-time conversation and file browsing.

```bash
tarko run --port 8888 --open
tarko run agent-tars --port 8888
tarko run ./my-agent.js --port 8888
```

Expand Down
3 changes: 3 additions & 0 deletions multimodal/tarko/agent-cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@
"@tarko/agent": "workspace:*",
"@tarko/agent-server": "workspace:*",
"@tarko/shared-utils": "workspace:*",
"@agent-tars/core": "workspace:*",
"@omni-tars/agent": "workspace:*",
"@tarko/mcp-agent": "workspace:*",
"dotenv": "^16.3.1"
},
"devDependencies": {
Expand Down
51 changes: 51 additions & 0 deletions multimodal/tarko/agent-cli/src/core/options.ts
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,44 @@ export function addCommonOptions(command: Command): Command {
return baseCommand;
}

/**
* Built-in agent mappings
*
* Using lazy resolution - resolve module path only when needed
*/
const BUILTIN_AGENTS: Record<string, { modulePath: string; label: string }> = {
'agent-tars': {
modulePath: '@agent-tars/core',
label: 'Agent TARS',
},
'omni-tars': {
modulePath: '@omni-tars/agent',
label: 'Omni TARS',
},
'mcp-agent': {
modulePath: '@tarko/mcp-agent',
label: 'MCP Agent',
},
};

/**
* Resolve built-in agent module path when needed
*/
function resolveBuiltinAgent(agentName: string): string {
const agent = BUILTIN_AGENTS[agentName];
if (!agent) {
throw new Error(`Unknown built-in agent: ${agentName}`);
}

try {
return require.resolve(agent.modulePath);
} catch (error: unknown) {
throw new Error(
`Failed to resolve built-in agent "${agentName}": ${error instanceof Error ? error.message : String(error)}`,
);
}
}

/**
* FIXME: Support markdown agent.
*
Expand All @@ -149,6 +187,19 @@ export async function resolveAgentFromCLIArgument(
): Promise<AgentImplementation> {
// Use default agent if no agent parameter provided
if (agentParam) {
// Check if it's a built-in agent
const builtinAgent = BUILTIN_AGENTS[agentParam];
if (builtinAgent) {
console.log(`Using built-in agent: ${builtinAgent.label}`);
return {
type: 'modulePath',
value: resolveBuiltinAgent(agentParam),
label: builtinAgent.label,
agio: AgioProvider,
};
}

// Otherwise treat as custom module path
return {
type: 'modulePath',
value: agentParam,
Expand Down
Loading