Quickstart: Solve a task using the CLI
mainUse the surfkit solve command to execute a task by specifying an existing agent and device.
surfkit solve "Search for the most common variety of french duck" \
--agent agent01 \
--device desktop01repository·main·Indexed 41 days ago
https://github.com/agentsea/surfkitA toolkit for building, sharing, and running multimodal AI agents that operate on physical or virtual devices. Version 0.1.427 supports local (Docker) and cloud (Kubernetes, GCE) environments. It provides a Python API and CLI for managing agent lifecycles, provisioning devices, tracking tasks via the taskara library, and publishing agents to the AgentSea Hub.
Use the surfkit solve command to execute a task by specifying an existing agent and device.
surfkit solve "Search for the most common variety of french duck" \
--agent agent01 \
--device desktop01You can use the solve function from the surfkit module to assign a task to a specific agent type on a specific device type. The function returns a task object that you can wait on to retrieve the result.
from surfkit import solve
task = solve(
"Search for the most common variety of french duck",
agent_type="pbarker/SurfPizza",
device_type="desktop",
)
task.wait_for_done()
result = task.resultIf you need full control over the underlying build tools (webpack, Babel, ESLint, etc.), you can run npm run eject.
Warning: This is a one-way operation. Once you eject, you cannot go back.
Running this command copies all configuration files and transitive dependencies directly into your project. While all other commands will still work, they will point to the newly copied scripts, and you will be responsible for maintaining the configuration.
npm run ejectThe surfkit UI project uses standard npm scripts to manage development, testing, and production builds. Use these commands from the project directory to control the application state.
# Run the app in development mode
npm start
# Run tests in interactive watch mode
npm test
# Build the app for production
npm run build
# Eject from the build tool configuration (one-way operation)
npm run ejectnpm start to launch the application in development mode. The app will be available at http://localhost:3000. The browser will automatically reload when you make changes, and lint errors will be reported in the console.npm startManage and monitor agent tasks:
surfkit create tracker: Create a new task tracker.surfkit list trackers: List existing trackers.surfkit delete tracker <name>: Delete a tracker.surfkit list tasks: List all tasks.surfkit solve "<task_description>" --agent <agent_name> --device <device_name>: Solve a task using existing infrastructure.surfkit solve "<task_description>" --device <device_name> --agent-file <path_to_yaml>: Solve a task by creating an agent ad hoc from a YAML file.Install the Surfkit toolkit using pip to begin building and running multimodal agents on devices.
pip install surfkitFor developers building custom agents, use these commands to manage the project lifecycle:
surfkit new: Initialize a new project.surfkit build: Build a Docker container for the agent.surfkit create agent --name <name> -t <type>: Create an agent locally.surfkit create agent --runtime kube -t <type>: Create an agent on Kubernetes.npm run build to create a production-ready version of the app in the build folder. This process bundles React in production mode and optimizes the build for performance by minifying files and adding content hashes to filenames.npm run buildAgents in surfkit are designed to be instantiated via configuration or default settings.
from_config(config): Use this to create an agent instance from a specific configuration object. The shape of this object is defined by the class returned by config_type().default(): Use this to create an agent instance with no custom parameters.config_type(): Returns the Type[BaseModel] that defines the schema for the agent's configuration.The Skill class represents a specific capability or toolset an agent possesses. It manages metadata (name, description, requirements), lifecycle status, associated tasks, and configuration via key-value pairs (kvs). Skills can be managed locally in a database or remotely via an API.
Key attributes include:
status: The current lifecycle stage (e.g., TRAINING, DEMO, COMPLETED).requirements: A list of strings defining what the skill must satisfy.tasks: A list of Task objects associated with this skill.kvs: A dictionary for arbitrary configuration data.remote: If set, operations are delegated to a remote API.from surfkit.skill import Skill, SkillStatus
# Initialize a new skill
skill = Skill(
name="search-airbnb",
description="Search for stays on Airbnb",
requirements=["find stays within a travel window"],
status=SkillStatus.CREATED,
owner_id="user_123"
)
# Save the skill (locally or remotely depending on self.remote)
skill.save()The generated README.md provides the following standard CLI commands for interacting with agents:
surfkit create agent -f ./agent.yaml --runtime <process|docker|kube> --name <name>surfkit list agentssurfkit solve --agent <name> --description "<task_description>" --device-type <device_type>surfkit logs --name <name>surfkit delete agent --name <name># Create an agent
surfkit create agent -f ./agent.yaml --runtime docker --name foo
# List running agents
surfkit list agents
# Use the agent to solve a task
surfkit solve --agent foo --description "Search for french ducks" --device-type desktop
# Get the agent logs
surfkit logs --name foo
# Delete the agent
surfkit delete agent --name foo