This is a guided walkthrough that takes you from "I just cloned the repo" to "I have the API running, I've made a small change, and I understand what I'm looking at." Plan for ~30 minutes.
See the Prerequisites section in
CONTRIBUTING.md. The non-negotiables are:
- .NET 10 SDK (preview channel) — match the CI version.
- Docker — only required for the integration test project; the API itself can run without it.
Verify:
dotnet --version # should be 10.0.x
docker info > /dev/null # should succeed silentlygit clone https://github.com/razeone/CloudEngAgent.git
cd CloudEngAgent
dotnet restoredotnet restore reads Directory.Packages.props (central package management)
and the per-project .csproj files. If you see version errors, your local SDK
is probably older than the CI one.
dotnet build --configuration Release -warnaserror-warnaserror matches CI. If this is green, your toolchain is good.
dotnet test tests/CloudEngAgent.Domain.Tests --no-build --configuration Release
dotnet test tests/CloudEngAgent.Api.Tests --no-build --configuration Release
dotnet test tests/CloudEngAgent.Mcp.Server.Tests --no-build --configuration ReleaseThese don't need Docker. If you also have Docker running, you can do:
dotnet test tests/CloudEngAgent.Infrastructure.Tests --no-build --configuration ReleaseThe MS SQL Testcontainer fixture skips gracefully when Docker isn't available
(see MsSqlContainerFixture.cs).
dotnet run --project src/CloudEngAgent.ApiYou should see logs like:
info: Microsoft.Hosting.Lifetime[14] Now listening on: http://localhost:5xxx
In a second terminal, smoke-test it:
curl -s http://localhost:5xxx/healthz # → "Healthy"
curl -s http://localhost:5xxx/v1/personas | head # → JSON list of personas
curl -s http://localhost:5xxx/v1/workflows | head # → JSON list of workflowsWhy does this work without any configuration? In Development the API auto-selects the Stub workflow engine when no LLM endpoint is configured and falls back to an in-memory run store when
ConnectionStrings:Runsis empty. Both fallbacks log a warning so you can see them in the console.
# 1. Start a run
curl -s -X POST http://localhost:5xxx/v1/runs \
-H "Content-Type: application/json" \
-d '{"workflowId":"investigate","input":{"prompt":"hello"}}'
# Response includes runId; use it below.
# 2. Mint an SSE token
TOKEN=$(curl -s -X POST http://localhost:5xxx/v1/runs/<runId>/sse-token | jq -r .token)
# 3. Stream the AG-UI events
curl -N "http://localhost:5xxx/v1/runs/<runId>/events?token=$TOKEN"You'll see the canonical AG-UI event sequence (RUN_STARTED,
TEXT_MESSAGE_*, TOOL_CALL_*, RUN_FINISHED) emitted by the stub engine.
Open these files in order — they're a good "intro reading list":
src/CloudEngAgent.Api/Program.cs— composition root, middleware pipeline, endpoint mapping.src/CloudEngAgent.Infrastructure/ServiceCollectionExtensions.cs— where adapters are wired into DI.src/CloudEngAgent.Domain/— pure types (Run,RunEvent,Persona,Workflow). No I/O, no framework refs.src/CloudEngAgent.Application/Runs/— use-case handlers (start/cancel/stream).src/CloudEngAgent.Api/Sse/— the AG-UI event writer that translatesRunEventinto SSE frames.personas/— six YAML personas; pickexplorer.yamlto see the schema in practice.
For the full architectural picture, read
architecture.md next.
A safe "hello world" change to confirm the loop:
- Open
src/CloudEngAgent.Api/Endpoints/and find the personas endpoint. - Add a new
GET /v1/pingendpoint that returns{ "pong": true }. - Add a test in
tests/CloudEngAgent.Api.Teststhat asserts the route returns200and the expected JSON. - Run
dotnet test tests/CloudEngAgent.Api.Tests. - Revert it (or keep it as a learning artifact in your local branch).
If steps 1–4 work, you have everything you need to start on a real ticket.
You can skip this until you actually need to talk to an LLM or persist runs. When you do, follow the LLM backends and Database sections of the main README. The short version:
dotnet user-secrets init --project src/CloudEngAgent.Api
# Pick whichever backend(s) you want
dotnet user-secrets set --project src/CloudEngAgent.Api "Secrets:openai-key" "sk-..."
dotnet user-secrets set --project src/CloudEngAgent.Api "Secrets:github-pat" "ghp_..."
dotnet user-secrets set --project src/CloudEngAgent.Api "Secrets:anthropic-key" "sk-ant-..."
# And/or a SQL Server connection string for the run store
dotnet user-secrets set --project src/CloudEngAgent.Api \
"ConnectionStrings:Runs" \
"Server=localhost,1433;Database=cloudeng_runs;User Id=sa;Password=...;TrustServerCertificate=true"Switch to the real workflow engine with:
dotnet run --project src/CloudEngAgent.Api -- --WorkflowEngine:Mode Realerror NU1605/ version downgrade on restore — you're probably on a stable .NET SDK. Install the 10 preview channel.-warnaserrorbuild fails after editing a file — the analyzer flagged something. Read the warning; nullability and unused-using rules are common.- API exits immediately on startup in
Productionmode — required config is missing (CORS origins, DB connection string, or a backend endpoint). Stick toDevelopmentuntil you've configured those. /v1/runs/{id}/eventsreturns 401 — you forgot to mint and pass the short-lived SSE token (POST /v1/runs/{id}/sse-tokenfirst).- Integration tests hang or fail with a Docker error — the Testcontainers MsSql image is several GB; the first pull can take a while. Re-run after the pull completes, or skip them locally and let CI cover that path.
From here:
- Pick an issue or roadmap item (see the Roadmap in the main README).
- Read
development.mdfor the recipe matching your task. - Open a draft PR early; small reviewable PRs are strongly preferred.