## OpenSpace Workflow Tutorial: Build, Evolve, and Integrate Agent Skills
This article walks through a comprehensive OpenSpace workflow, covering environment setup, sparse repository cloning, live task execution, skill evolution, and MCP-based agent integration. Each section includes practical code examples you can follow to replicate the setup on your machine or in a cloud notebook.
### Environment Setup and Configuration
We begin by verifying the Python runtime, configuring API credentials, and setting up the OpenSpace environment. The following steps are performed:
– Ensure Python 3.12+ is available
– Define API keys for Anthropic, OpenAI, and optional OpenSpace Cloud
– Clone the OpenSpace repository using sparse checkout to minimize disk usage
– Install OpenSpace in editable mode
– Create workspace and skill directories
– Configure environment variables and verify tool availability
These steps ensure that all necessary components are in place before executing tasks or evolving skills.
### Live Task Execution and Skill Evolution
With the environment ready, we define an asynchronous function to run tasks through the OpenSpace Python API. A sample task instructs the system to write and test a Python function for payroll calculation with overtime logic.
Key observations:
– OpenSpace can evolve new skills during task execution
– Evolved skills are returned with metadata such as name and origin
– All skill data is persisted in an SQLite database with versioning and lineage
We inspect the database to review stored skills and understand how capability evolution is tracked over time.
### Custom Skill Creation and Reuse
To demonstrate reusability, we create a custom skill using a SKILL.md file. This skill directs the agent to generate markdown reports from CSV files using pandas. The skill includes clear instructions for error handling and retry logic.
After installing host skills and generating sample data, we run another task using the custom skill. This shows how prior knowledge can be reused and extended across related tasks.
### MCP Server Integration
OpenSpace supports integration with external agents via the MCP protocol. We launch a streamable HTTP MCP server and verify that it responds to requests. An example MCP host configuration is provided, enabling agents to connect to the OpenSpace workspace and skill directories.
This integration makes evolved skills available to a wide range of compatible tools and platforms.
### Cloud Skills and Showcase Analysis
If a cloud API key is available, we can upload skills to the OpenSpace cloud community using the command-line interface. Additionally, we inspect the showcase database to analyze how skills are categorized by origin—such as FIX, DERIVED, or CAPTURED.
This analysis helps understand how different skill types support cost-effective, reusable agent behavior.
### FAQ
**What is OpenSpace?**
OpenSpace is a framework for building, evolving, and reusing agent capabilities. It records skill evolution in a versioned SQLite database and supports integration through MCP.
**Do I need an API key to run the tutorial?**
A key is required for live LLM execution, but you can still follow the setup steps and inspect the database. Without a key, live tasks will be skipped.
**What formats are supported for custom skills?**
Custom skills are defined through SKILL.md files that describe the skill’s purpose, instructions, and expected behavior.
**Can I use OpenSpace outside of Colab?**
Yes. The workflow is environment-agnostic and can be run locally or in any Python 3.12+ environment.
**How are skills reused across tasks?**
Skills are stored in a workspace directory and versioned in SQLite. The system automatically detects and reuses relevant skills when executing new tasks.
### Conclusion
This tutorial demonstrates a complete OpenSpace workflow, from initial setup to advanced skill evolution and integration. By leveraging Python API calls, custom SKILL.md definitions, and MCP transports, we built a foundation for self-evolving, cost-efficient agent systems.
The resulting environment enables:
– Live task execution with evolving capabilities
– Persistent skill storage with lineage tracking
– Reuse of skills across related tasks
– Integration with external agents via MCP
– Optional cloud sharing and collaboration
With this foundation, you can continue experimenting with complex workflows, observe how skills FIX, DERIVE, and CAPTURE themselves over time, and scale intelligent agent systems in production-ready environments.



