@tarco/agent-cli
v0.0.3
Published
A flexible Agent CLI framework for building multimodal agent applications
Downloads
16
Readme
tarco Agent CLI
A flexible Agent CLI framework built on top of the Agent Kernel (@tarco/agent). Deploy and run agents with ease, featuring built-in Web UI and powerful extensibility.
Quick Start
Installation
npm install @tarco/agent-cliBasic Usage
# Start interactive Web UI (default)
tarco
# Run with built-in agents
tarco run agent-tars # Agent TARS
tarco run omni-tars # Omni-TARS
tarco run mcp-agent # MCP Agent
# Run with custom agent
tarco run ./my-agent.js
# Start headless API server
tarco serve
# Headless mode with direct input
tarco --headless --input "Analyze current directory structure"
# Pipeline input
echo "Summarize this code" | tarco --headlessBuilt-in Agents
tarco CLI includes several built-in agents:
agent-tars- Agent TARS: Advanced task automation and reasoning systemomni-tars- Omni-TARS: Multi-modal agent with comprehensive capabilitiesmcp-agent- MCP Agent: Model Context Protocol agent for tool integration
# Use built-in agents
tarco run agent-tars
tarco run omni-tars
tarco run mcp-agentCore Commands
tarco / tarco run
Launches interactive Web UI for real-time conversation and file browsing.
tarco run --port 8888 --open
tarco run agent-tars --port 8888
tarco run ./my-agent.js --port 8888tarco serve
Starts headless API server for system integration.
tarco serve --port 8888
# API available at: http://localhost:8888/api/v1/tarco run --headless
Silent mode execution with stdout output, perfect for scripting.
# Text output (default)
tarco run --headless --input "Analyze files" --format text
# JSON output
tarco run --headless --input "Analyze files" --format json
# Include debug logs
tarco run --headless --input "Analyze files" --include-logstarco request
Direct LLM requests for debugging and testing.
tarco request --provider openai --model gpt-4 --body '{"messages":[{"role":"user","content":"Hello"}]}'tarco workspace
Workspace management utilities.
tarco workspace --init # Initialize workspace
tarco workspace --open # Open in VSCode
tarco workspace --status # Show statusConfiguration
Config Files
Supports multiple formats with auto-discovery of tarco.config.{ts,yaml,json}:
// tarco.config.ts
import { AgentAppConfig } from '@tarco/interface';
const config: AgentAppConfig = {
model: {
provider: 'openai',
id: 'gpt-4',
apiKey: process.env.OPENAI_API_KEY,
},
workspace: './workspace',
server: { port: 8888 },
};
export default config;CLI Options
# Model configuration
tarco --model.provider openai --model.id gpt-4 --model.apiKey sk-xxx
# Server settings
tarco serve --port 3000
# Workspace path
tarco --workspace ./my-workspace
# Debug mode
tarco --debugPriority Order
- CLI arguments (highest)
- Workspace config
- User config file (
--config) - Remote config URL
- Default config (lowest)
Custom Development
Coming soon
Advanced Features
Event System
Built on event-driven architecture for monitoring agent execution:
const eventStream = agent.getEventStream();
// Subscribe to all events
eventStream.subscribe((event) => {
console.log('Event:', event.type, event);
});
// Subscribe to specific event types
eventStream.subscribeToTypes(['tool_call', 'tool_result'], (event) => {
console.log('Tool event:', event);
});Console Interception
Capture and process console output during execution:
import { ConsoleInterceptor } from '@tarco/agent-cli';
const { result, logs } = await ConsoleInterceptor.run(
async () => {
return await agent.run('input');
},
{
silent: true, // Suppress output
capture: true, // Capture logs
},
);Tool & MCP Server Filtering
Filter available tools and MCP servers via configuration:
// In config
const config = {
tool: {
include: ['file_*', 'web_*'],
exclude: ['dangerous_*'],
},
mcpServer: {
include: ['filesystem', 'browser'],
exclude: ['experimental_*'],
},
};# Via CLI
tarco --tool.include "file_*,web_*" --tool.exclude "dangerous_*"
tarco --mcpServer.include "filesystem" --mcpServer.exclude "experimental_*"API Reference
Refer to TypeScript definitions:
@tarco/agent-interface- Core agent interfaces@tarco/interface- Application layer interfaces@tarco/agent-cli- CLI framework interfaces
Examples
[Placeholder: Add screenshots of Web UI interface and CLI usage examples]
Contributing
Welcome to submit issues and pull requests!
- Follow existing code style
- Add necessary test cases
- Update relevant documentation
License
Apache-2.0 License
