Jonas Helming, Maximilian Koegel and Philip Langer co-lead EclipseSource. They work as consultants and software engineers for building web-based and desktop-based tools. …
Introducing Custom Chat Agents in Theia IDE: Automate Your Workflows with Ease
November 6, 2024 | 5 min ReadThe Theia IDE, built on modern web technologies, is at the forefront of open innovation for developers, providing cutting-edge capabilities, including experimental AI support powered by Theia AI. Theia AI is an extensible framework that helps tool builders create AI-powered solutions tailored to their users’ needs. As part of Theia AI’s vision for flexibility and openness, the latest feature in Theia IDE takes automation a step further by introducing custom chat agents.
Custom chat agents allow you to define, on the fly, personalized workflows directly inside your IDE. These agents aren’t your typical bots—they’re seamlessly integrated, meaning you can grant them optional access to your workspace, context, and other resources. No more copy-pasting code into external tools! You can now automate tasks like code obfuscation, error detection, documentation, or even generating complex refactoring suggestions with just a few clicks.
Defining Custom Agents: A Real-World Example
Custom agents are easy to set up. In the video below, we demonstrate how to create a custom agent that obfuscates arbitrary code while maintaining functionality. This agent takes a block of code, scrambles it into an unreadable format, and ensures it still works as intended—a perfect solution for when you need to protect intellectual property or work on sensitive codebases. As shown in the video, creating a custom agent is as simple as going to the AI Configuration View in the Theia IDE, clicking on “Add Custom Agent,” and defining the agent’s properties in a YAML file. With that, it is fully integrated in your Theia IDE, including access to variables and tool functions. You can immediately use it in the default chat.
In case you didn’t catch it in the video, here’s the example of how the agent is configured:
- id: obfuscator
name: Obfuscator
description: This is an example agent. Please adapt the properties to fit your needs.
prompt: Obfuscate the following code so that no human can understand it anymore. Preserve the functionality.
defaultLLM: openai/gpt-4o
Unlocking New Workflow Potential
Beyond code obfuscation, custom agents can be used for a wide range of tasks. Here are just a few examples:
- Code Review Assistant: Automatically scan and suggest improvements for code quality, ensuring consistency and adherence to best practices – which you can define baked on your own preference!
- Security Vulnerability Scanner Create a custom agent that scans your code for known security vulnerabilities, such as SQL injection, cross-site scripting (XSS), or buffer overflow risks. By leveraging the agent’s access to your workspace, it can analyze your project files in real time, flagging potential security issues and even suggesting fixes based on best practices.
- Test Case Generator This custom agent could automate the creation of unit tests by analyzing your code and generating appropriate test cases for each function or method. Based on the input/output behavior of your code, the agent can create tests that validate different scenarios, improving the coverage of your testing suite.
- Domain-Specific Documentation Generator: Generate documentation based on your project’s context and guidelines, including inline comments and detailed descriptions of code snippets.
Each of these agents can access variables, workspace data, or even utilize custom tools, depending on what you allow. Additionally, you have full control over which language models the agents interact with—whether it’s a cloud-based model, a self-hosted solution, or a local LLM.
A Flexible Future for Tool Builders
The introduction of custom agents also empowers tool builders using the underlying framework Theia AI. If you’re developing a specialized tool on the Theia Platform, you can incorporate this feature, enabling your users to create domain-specific agents tailored to their needs. Whether it’s for a healthcare app, a hardware design tool, or any other domain, the flexibility of custom agents opens up new possibilities for automation and efficiency.
Bringing It All Together
Custom chat agents in Theia IDE represent a powerful new way to automate workflows and extend the capabilities of the IDE. With easy configuration, full control over the AI models, and seamless integration with your workspace, these agents empower both end users and tool builders to take automation to the next level.
Want to learn more? Check out this article on Theia AI for an in-depth look at the framework behind this feature, or dive into AI support in Theia IDE for additional use cases.
We will soon publish more articles about the Theia IDE and Theia AI, so stay tuned and follow us on Twitter.
If you want to sponsor Theia IDE or use Theia AI to create your own AI solution, please get in contact with us. In particular, we are also looking for LLM providers who want to make their language models available via Theia AI and in the Theia IDE.
EclipseSource is at the forefront of technological innovation, ready to guide and support your AI initiatives based on Theia AI or any other technology. Our comprehensive AI integration services provide the specialized know-how necessary to develop customized, AI-enhanced solutions that elevate your tools and IDEs. Explore how we can assist in integrating AI into your tools with our AI technology services. Reach out to begin your AI integration project with us.