Skip to content

dockersamples/docker-cerebras-demo

 
 

Repository files navigation

DevDuck agents

A multi-agent system for Node.js programming assistance built with Google Agent Development Kit (ADK). This project features a coordinating agent (DevDuck) that manages two specialized sub-agents (Local Agent and Cerebras) for different programming tasks.

Architecture

The system consists of three main agents orchestrated by Docker Compose, which plays a primordial role in launching and coordinating all agent services:

🐙 Docker Compose Orchestration

  • Central Role: Docker Compose serves as the foundation for the entire multi-agent system
  • Service Orchestration: Manages the lifecycle of all three agents (DevDuck, Local Agent, and Cerebras)
  • Configuration Management: Defines agent prompts, model configurations, and service dependencies directly in the compose file
  • Network Coordination: Establishes secure inter-agent communication channels
  • Environment Management: Handles API keys, model parameters, and runtime configurations

Agent Components

🦆 DevDuck (Main Agent)

  • Role: Main development assistant and project coordinator
  • Model: llama3
  • Capabilities: Routes requests to appropriate sub-agents based on user needs

👨‍💻 Local Agent Agent

  • Role: General development tasks and project coordination
  • Model: mistral
  • Specialization: Node.js programming expert for understanding code, explaining concepts, and generating code snippets

🧠 Cerebras Agent

  • Role: Advanced computational tasks and complex problem-solving
  • Model: Llama-4 Scout (llama-4-scout-17b-16e-instruct)
  • Provider: Cerebras API
  • Specialization: Node.js programming expert for complex problem-solving scenarios

Features

  • Multi-agent coordination: Routing between specialized agents
  • Node.js programming expertise: All agents specialize in Node.js development
  • FastAPI web interface: RESTful API with web interface support
  • Docker containerization: Easy deployment with Docker Compose
  • Flexible model configuration: Support for multiple LLM providers (local and cloud)

Quick Start

Prerequisites

Configuration

  1. You need a Cerebras API Key: https://cloud.cerebras.ai/
  2. Create a .env file with the following content:
CEREBRAS_API_KEY=<your_cerebras_api_key>
CEREBRAS_BASE_URL=https://api.cerebras.ai/v1
CEREBRAS_CHAT_MODEL=llama-4-scout-17b-16e-instruct

look at the .env.sample file

✋ All the prompts are defined in the 🐙 compose file

Start the services

docker compose up
# if you updated the code, use --build

The application will be available at http://0.0.0.0:8000

Usage

The agents can be accessed through the web interface or API endpoints.

Activate Token Streaming

You can try this:

Hello I'm Phil

Local Agent generate a Node.js hello world program

Add a Person class with a greet method

Cerebras can you analyse and comment this code

Can you generate the tests

✋ For a public demo, stay simple, the above examples are working.

🎥 How to use the demo: https://youtu.be/WYB31bzfXnM

Routing Requests

  • General requests: Handled by DevDuck, who routes to appropriate sub-agents
  • Specific agent requests
    • "I want to speak with Local Agent" → Routes to Local Agent agent
    • "I want to speak with Cerebras" → Routes to Cerebras agent

Tips

If for any reason, you cannot go back from the Cerebras agent to the Local Agent agent, try this:

go back to devduck

About

A demo of running the ADK with Google and Cerebras

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 92.5%
  • Dockerfile 7.5%