Devika AI Architecture

Devika AI is an AI software engineer that breakdown the human instructions into actionable steps, conducting research, and even writing code to accomplish predefined objectives.

Devika AI Architecture Overview:

Agent Core: Acts as the central orchestrator, managing the planning, reasoning, and execution processes while facilitating communication among different sub-agents.

Agents: Specialized modules responsible for distinct tasks such as planning, research, coding, patching, and reporting.

Language Models: Harnesses state-of-the-art large language models (LLMs) like Claude, GPT-4, and GPT-3 for natural language understanding and generation.

Browser Interaction: Empowers Devika to interact with webpages, enabling seamless information gathering and action execution.

Project Management: Handles organization and persistence of project-related data.

Agent State Management: Tracks and persists the dynamic state of the AI agent across interactions.

Services: Integrates with external platforms like GitHub and Netlify to augment its capabilities.

Utilities: Provides supporting modules for configuration, logging, and various other functionalities.

1. Agent Core

The Agent Core serves as the nucleus of Devika’s operations. It coordinates the entire AI planning and execution loop, driving the interaction between different sub-agents.

When a user presents a prompt, the Agent Core initiates the process by delegating tasks to specialized agents, orchestrating their actions, and managing conversation history and context.

  • When a user provides a high-level prompt, the execute method is invoked on the Agent.
  • The prompt is first passed to the Planner agent to generate a step-by-step plan.
  • The Researcher agent then takes this plan and extracts relevant search queries and context.
  • The Agent performs web searches using Bing Search API and crawls the top results.
  • The raw crawled content is passed through the Formatter agent to extract clean, relevant information.
  • This researched context, along with the step-by-step plan, is fed to the Coder agent to generate code.
  • The generated code is saved to the project directory on disk.
  • If the user interacts further with a follow-up prompt, the subsequent_execute method is invoked.
  • The Action agent determines the appropriate action to take based on the user’s message (run code, deploy, write tests, add feature, fix bug, write report etc.)
  • The corresponding specialized agent is invoked to perform the action (Runner, Feature, Patcher, Reporter).
  • Results are communicated back to the user and the project files are updated.

2. Agents

Devika’s cognitive stems from its ensemble of specialized agents, each meticulously crafted to handle specific tasks. From generating plans and conducting research to coding, patching, and reporting, these agents work collaboratively to fulfill user requirements.

Notable agents include the Planner, Researcher, Coder, Action, Runner, Feature, Patcher, Reporter, and Decision, each playing a crucial role in the software engineering lifecycle.

3. Language Models

Powered by LLMs, Devika boasts exceptional natural language processing capabilities. By using models like Claude, GPT-4, and GPT-3, it adeptly comprehends user instructions and generates coherent responses, thereby facilitating seamless interaction and understanding.

4. Browser Interaction

Devika’s ability to interact with webpages opens up a plethora of possibilities. Through the Browser and Crawler classes, it navigates websites, extracts information, and executes actions, effectively bridging the gap between online resources and user requirements.

5. Project Management

Efficient organization and management of projects are paramount in Devika’s architecture. The ProjectManager class facilitates the creation, updating, and retrieval of project-related data, ensuring seamless collaboration and persistence across sessions.

6. Agent State Management

Tracking and managing the dynamic state of the AI agent is essential for maintaining context and facilitating seamless interactions. The AgentState class diligently monitors and persists the agent’s state, enabling real-time visibility, auditing, and resumption from interruptions.

7. Services

Integration with external services enhances Devika’s capabilities manifold. By seamlessly interfacing with platforms like GitHub and Netlify, it gains access to a plethora of functionalities, including version control, deployment, and hosting.

8. Utilities

Devika relies on a suite of utility modules to streamline its operations. From configuration management and logging to code reading and semantic analysis, these utilities play a pivotal role in augmenting Devika’s functionality and performance.


Devika represents a paradigm shift in the realm of software engineering, offering a glimpse into the future of AI-powered development assistance. Through its modular architecture, seamless integration of cutting-edge technologies, and unwavering focus on user-centric design, Devika stands poised to revolutionize the way software is engineered and developed.

As the boundaries of AI continue to be pushed, Devika paves the way for a new era of intelligent programming assistance, empowering developers to unleash their creativity and potential like never before.