OpsDesk AcademyGet the project Code · prompts · workflows
PART 2 OF 6 · ONE HOUR

Upgrade your app’s agent engine

Turn the helpful assistant into a bounded program.

YOUR DELIVERABLEYour own agent core, a reviewed tool registry and passing behavioral contracts.
EXTEND THE SAME APP

Start with: The working OpsDesk app from Part 1, with a saved baseline revision or source copy.

Add now: A learner-owned tool registry and bounded agent engine behind the existing app.

Download Part 2 agent instructions (.md)
SAME APP · CHOOSE YOUR WORKFLOW

Choose the depth that fits you.

All three paths build the same capabilities. The explanation and implementation method change; the required app result does not.

No IT knowledge / C-level

Browser-first. Describe the outcome, use a builder and validate the result in plain language.

Explain the words in this route
Backend
The private part of the app that calls AI and runs approved lookups; your builder can generate it.
Tool evidence
Information returned by an actual permitted lookup, not a model’s guess.
Guardrail
A rule enforced by the app before an action can run.

Bring: An owned builder account, available build credits and an explicitly selected app AI/backend option. No terminal is required for this route.

YOUR NEXT CAPABILITYA learner-owned tool registry and bounded agent engine behind the existing app.
  1. Keep the working inbox. Write the agent’s allowed job: read health and release clues; do not apply changes.
  2. Ask the builder to implement those rules in server code with a narrow tool list and limits.
  3. Try one permitted question, one change request and one unavailable capability using synthetic data.
  4. Compare the UI result with the actual action log. A refusal paragraph alone is insufficient.

Browser-first: no terminal commands are required in this route. Use supported builder backend features; access and credits remain prerequisites.

Prompt for your builder or coding assistant
Extend our existing OpsDesk app for Part 2: A learner-owned tool registry and bounded agent engine behind the existing app. Follow this No IT knowledge / C-level learner route. Explain the next action in plain language and use the builder UI; do not require me to run terminal commands. Implement backend checks in code, not just in a prompt. Use synthetic data and my explicitly selected backend. Never invent a successful answer, usage or trace. Keep keys in server secrets. Do not publish, buy credits, activate cloud services or change permissions without specific authority. Complete the route actions, verify actual results and report blockers honestly.
Check your route steps

0 of 4 steps checked · self-reported

Download this persona’s Part 2 instructions (.md)

Go deeper · what each link explains
EXPLORE THE CONNECTIONS · D3

The model proposes. Your runtime decides.

An agent is the working loop: a model, a harness and approved capabilities. Choose a story, then select any component to see its job and its boundary.

Solid arrows: request, context or result. Dashed arrows: optional retrieval or telemetry. Color follows the selected step; it does not indicate measured traffic.

Illustration, not execution. This diagram makes no model, retrieval, export or cloud calls. The verified Lovable baseline uses two synthetic tools; RAG is an optional extension. A retrieved document cannot grant permissions. Each telemetry destination needs its own configuration and independent readback.
SEE THE RESULT · PART 2

Open the engine, keep the app

Make the harness visible: authorization, bounded model loop, validated tools, final answer and trace events.

Reviewed actual OpsDesk app capture for Open the engine, keep the app
Actual Lovable rehearsal · synthetic data · reviewed pixels. Open image for detail.

Try this

Repeat the selected synthetic incident, then test an unknown tool and an argument outside the selected service scope in isolated tests.

  1. Keep the same inbox and Analyze safely action.
  2. Inspect the server tool registry and strict argument validation.
  3. Open the actual run inspector after one successful investigation.

What it should look like

An expandable inspector below the answer shows actual model/tool events. A teaching animation explains these events but is not a live trace.

What a good result says

Only service_health and release_diff can execute in the Lovable example. The observed successful run used both tools and two model calls, below its three-call limit. Rejected tool cases must be checked in code tests.

Observed checkpoint

Actual native model/tool events browser-verified; local harness contracts tested separately.

Still required

A screenshot cannot prove all tool-validation or injection-resistance properties.

App walkthrough and all expected results → · Reviewed evidence →

EXPLORE THE IDEA · SYNTHETIC ILLUSTRATION

No model call, permission decision, cloud action or telemetry export is performed by this illustration. Use your actual app and receipts for acceptance.
Shared engineering tasks · optional reference for the business route
00–15 MINUTES

1. Open a fresh learner workspace

A small contract makes the harness easier to understand.

  1. Keep the Part 1 app intact. Create this learner engine beside it; it will replace only the server-side agent implementation after its contracts pass.
  2. Run the scaffold command from the repository root.
  3. Read AGENTS.md, TASKS.md and tests/test_agent.py in the new workspace.
  4. Run init.sh before implementation; missing agent.py is the expected starting failure.
uv sync --frozen --extra studio
.venv/bin/python scripts/create_studio_harness.py --output local/private/course-agent
sh local/private/course-agent/init.sh
EXPECTED RESULTYou can identify the model, tool and observer interfaces.
If you get stuck

The command refuses an existing folder. Choose a new path; never delete someone’s work to reuse a name.

15–30 MINUTES

2. Ask Codex for the smallest loop

The model proposes a tool call; your program decides what happens.

  1. Open the new learner workspace in Codex.
  2. Give it the implementation prompt and inspect each change.
  3. Keep the supplied contracts unchanged.
Prompt for your coding assistant
Read AGENTS.md, TASKS.md and tests/test_agent.py. Implement agent.py using the supplied model, tools and observer contracts. Validate proposed tool names and arguments, cap steps and output, and preserve explicit failures. Do not change tests, add network access, or invent a live model result. Explain the loop with one concrete tool-call example.
EXPECTED RESULTThe core returns an answer or an explicit terminal failure; it cannot run shell commands.
If you get stuck

When a test fails, reproduce that single failure and inspect the contract before changing code.

30–45 MINUTES

3. Make the tools deliberately small

A narrow handler is easier to secure and observe.

  1. Read prompts/02-tools.md in your learner workspace.
  2. Implement only the requested registered handlers.
  3. Try an unknown tool and an invalid argument with the supplied model doubles.
sh local/private/course-agent/init.sh
EXPECTED RESULTValid calls reach one handler; invalid calls do not execute a handler.
If you get stuck

Tool output is data. A returned instruction must not alter the registry or grant permission.

45–60 MINUTES

4. Walk through an observation

An agent loop needs an observation before its next decision.

  1. Run the fixed contracts again and preserve the real output privately.
  2. Draw request → proposed tool → validation → result → next model call.
  3. Explain how a step limit stops repeated tool proposals.
  4. Adapt the passing engine behind the existing app server contract; preserve session/ticket lookup and model binding.
  5. Rerun the complete Part 1 create → select → analyze journey. Do not ship an engine that only passes isolated tests.
Prompt for your coding assistant
Review my agent.py without changing it. Trace one valid tool round-trip and one invalid tool request through the code. Identify the exact stopping conditions, observation handling and failure outcome. Do not treat passing tests as provider acceptance.
EXPECTED RESULTThe fixed contracts pass and the original app still completes a real investigation through the new engine.
If you get stuck

Passing model-double tests proves the code contract, not live model compatibility.

COMPLETE THIS PART ONLY WHEN

Good questions. Short answers.

Why build an engine if my app already works?

You are taking ownership of its decisions: which tools exist, what inputs they accept, how many steps run and when to stop. Keep the working UI and server contract while replacing only the engine behind it.

Explore the engine →
Is the harness just a system prompt?

No. The prompt guides behavior; code validates tools and arguments, checks permission, owns session state and enforces limits. The model can propose a call but cannot register a new capability.

Open the harness components →
When can I connect my new engine?

After the unchanged contracts pass. Then integrate it behind the same app action and rerun the complete ticket-to-answer journey. Isolated unit tests alone do not prove the app still works.

Keep the existing API boundary →

Explain it back

Where should an unknown tool name be rejected?

Check the explanation

In the harness before handler execution. A prompt-only instruction is not the enforcement boundary.

No answer is uploaded or graded. Your Markdown download contains the full agent instructions plus your optional notes; review it before sharing.

0 tasks checked · self-reported, reset on reload

Primary references

Continue to Part 3 →