Gitpod SDK: infrastructure for software engineering agents
The infrastructure building blocks for orchestrating and building software engineering (SWE) agents at scale.
Built on our CDE platform for automating and standardizing development environment setup and maintenance, Gitpod SDK provides the infrastructure building blocks for orchestrating and developing enterprise-ready SWE agents.
With the Gitpod SDK you can access:
Environments - including reading and writing to files
Automations - for automating running processes like agents
Runners - to privately host development environments
Events - for audit logs
import asyncio
from gitpod import AsyncGitpod
import gitpod.lib as util
repo_url = "https://github.com/containerd/containerd"
command_to_execute = "go test -short -v ./..."
async def execute_command_in_environment():
client = AsyncGitpod()
machine_class_id = (await util.find_most_used_environment_class(client)).id
create_params = {
"machine": {"class": machine_class_id},
"content": {"initializer": {"specs": [{"context_url": {"url": repo_url}}]}}
}
environment = (await client.environments.create(spec=create_params)).environment
await util.wait_for_environment_running(client, environment.id)
async for line in await util.run_command(client, environment.id, command_to_execute):
print(line)
await client.environments.delete(environment_id=environment.id)
if __name__ == "__main__":
asyncio.run(execute_command_in_environment())
Infrastructure for improved engineering productivity
The market for autonomous software engineering agents is emerging at pace. While more powerful agents are imminent, today’s agents lack the ability to operate with accuracy on complex tasks. We need a developer tooling “bridge” that carries us from today’s world of hands-on-keyboard development to a future of end-to-end autonomous agents that can complete features and complex bugs. The Gitpod SDK provides that bridge.
Building AI-agent infrastructure yourself is complex. Development environments alone demand careful orchestration of containers, editors, file systems, networking, authentication, and security boundaries. Each piece must be both production-grade and scalable. Adding AI agents multiplies the complexity: you must incorporate isolation, fine-grained permissions, audit logging, and secure access to development context (secrets, databases, SCM). With Gitpod you bypass these challenges, focus on the prompts and move directly to production-ready agents.
What types of agents can you build?
So the Gitpod SDK gives you infrastructure building blocks to start working with AI agents, what types of agents can you build? Here are three examples:
Refactoring: Automate agents to perform ad hoc refactoring tasks, such as language migrations, version upgrades, or codebase restructuring.
Bugs and backlog work: Configure agents to run on a schedule, working in the background 24/7 or in parallel. They can pick tasks from your issue tracker, then complete them entirely or hand them off to developers.
Code reviews: Use automated development environments to run code reviews dynamically. Instead of analyzing code statically, agents start automated environments running the exact code they are reviewing and generate valid suggestions that pass all your tests.
How to automate agent workflows
Let’s now take a look how you can implement the above use cases using the Gitpod SDK:
Spin up an environment: Create a development environment that runs in your private network with access to private models and data. The environment has your source code cloned and access to any required internal systems. Trigger this from within existing platform tools like Backstage, Claude Desktop via MCP or your own CLI.
Execute code: Introduce your agent by executing commands directly inside your development environment. You can start work on a feature with an agent to be taken over by a developer, or have the agent directly open pull requests.
Delete the environment: Gitpod development environments already automatically pause to save cost, so once your agent’s work is done you aren’t rushed to review it immediately. When the work completes, trigger a delete to remove your development environment and start fresh with a new one.
Don’t let shadow IT put your data at risk
Gitpod is built with developer experience and security as equals. We’re trusted by Fortune 500 banks, health care providers, and insurance companies to improve their engineering productivity without compromising security. All development happens in secure, compartmentalized environments within your existing network perimeter or enterprise VPC. This foundation extends naturally to Gitpod’s SDK, where you can execute agents in the same secure boundaries that include:
Complete audit trails
Integrations with your existing identity providers
Automated fine-grained secrets management using OIDC
Network-level isolation, i.e. deny-by-default policies
What’s next?
With the infrastructure fundamentals that Gitpod brings you can focus on building powerful workflows to both streamline engineering productivity and incorporate AI agents. Ensure your engineering teams—both human and agentic—can harness AI for organizational benefits without compromising security or data sovereignty.
Get started today at app.gitpod.io or learn more in our documentation. SDKs available in Python, Typescript and Go. Currently only available for Gitpod Flex users.