Framework ยท Python with no dependencies

The agent is a tool. The center is the outcome.

Build AI apps where the LLM runs inside a fixed workflow, a person approves every action and company policy becomes tested code.

Agentic App banner: agents inside workflows that deliver business outcomes
In short

agentic-app is a Python framework for companies to build AI apps starting from a business outcome, not from the agent. It is for anyone who needs to put AI inside a real process (HR, people management, support) with control: the LLM runs inside a fixed workflow, every external action waits for human approval, rules with numbers become tested code and every run is recorded. It ships with a complete example app (manager coaching) and runs with just Python 3 installed, no key and no internet.

What it is

An app built around a decision, not a chat built around everything

The starting question is not "which agent do we build?". It is "who decides what, and how do we measure whether it got better?". The agent comes later, as one piece of the process.

The six pillars as cards: outcome first, deterministic workflow, human in command, background agents, policy as code, audit log

๐Ÿงฑ Workflow before agent

Each LLM use is one node among four others: context, code, condition and formatting. Same input, same output.

โœ‹ Nothing sends itself

The workflow only proposes. The email waits in the queue until the person reads, edits and approves it. Everything goes to the audit log.

๐Ÿ“ A rule with a number is code

The vacation manual becomes functions with strict input and 13 policy tests. Change one number, a test breaks.

The 9 pillars

The checklist the framework implements

Each pillar has a file and at least one test. Use the list to review any AI app in your company, even if you do not use this code.

1

Business outcome first

A canvas with the user, the decision and the success metric before thinking about an agent.

templates/canvas-resultado.md

2

LLM inside a workflow

Nodes context โ†’ code โ†’ condition โ†’ LLM โ†’ formatting. The model is chosen by the task, not by taste.

workflow.py ยท config.py

3

Screen calls workflow

The panel button sends the input to the workflow and the result comes back on the same screen, as an editable draft.

painel.html ยท serve.py

4

Human in command

Every external action goes through review, editing and approval. Sensitive fields, such as the recipient, stay locked.

acoes.py

5

Background agents

They watch the data (overdue goal, late 1:1, falling engagement) and suggest next steps with a run button.

workflow proximos_passos

6

Policy becomes code, not RAG

It classifies the question, loads only the right policy and gives the agent only that policy's tools. Search is left for open-ended questions.

policies/ferias.py

7

Security per workflow

Roles allowed to run it, a service identity with minimal scope and an audit log with chained hashes.

seguranca.py

8

Triggers beyond the click

Manual, scheduled (Monday 08:00) and event-based (email received), declared in the workflow's own JSON.

gatilhos.py

9

Visual output

An HTML and PDF report, generated per workflow, instead of a wall of text.

relatorio.py

How it works

A fixed path, with the LLM in a single box

The engine checks who asked, assumes the workflow identity, validates the input and runs the nodes in order. The output is validated JSON. Actions become proposals. One audit line per run.

Triggerโ†’ Role allowed to run?โ†’ Contextโ†’ Codeโ†’ Conditionโ†’ LLMโ†’ Formatting + schemaโ†’ Proposal in queueโ†’ Person approvesโ†’ Runs + audit

HR assistant, node by node

profile (context, identity svc-rh) โ†’ category (LLM classifies: vacation, parental leave or other) โ†’ condition โ†’ data (code pulls the numbers out of the question) โ†’ agent (LLM chooses among the tools of THAT policy only) โ†’ explanation (code) โ†’ formatting.

Goal follow-up, node by node

team (context) โ†’ overdue goals (code) โ†’ any pending? (condition) โ†’ drafts (LLM writes one per person) โ†’ formatting validates and proposes 6 emails. None goes out before approval.

Prerequisites

Just Python

Nothing to install with pip. No API key. The tests block the network on purpose.

Python 3.10 or newer

Linux, Mac or Windows.

# check
python3 --version

git

To download the repository.

git --version

Ollama (optional)

Only if you want to swap the fake LLM for a local model.

# optional
ollama list
Usage guide ยท step by step

From clone to your first app

The first four steps run the example. The others show what you swap for your company. The full walkthrough, with a rollout checklist, is in docs/PASSO-A-PASSO.md (in Portuguese).

1

Download and run the tests

104 checks, no network. The last line must be OK.

git clone https://github.com/inematds/agentic-app
cd agentic-app
bash tests/run.sh          # 104 checks, 0 failures โ†’ OK
2

Run the demo in the terminal

Runs the 5 workflows: RBAC denying, drafts, approval with editing, HR assistant, the Monday 08:00 scheduled run, the email-received event and the report.

python3 -m agentic_app.demo
# generates saida/relatorio.html, saida/relatorio.pdf, saida/audit.jsonl
3

Open the panel

Switch person at the top (manager, HR, employee) and see what each role can do.

python3 -m agentic_app.serve --porta 8765
# http://127.0.0.1:8765  (only on your machine)
4

Prove that policy is code

The script changes nine numbers in the manual, one at a time, and checks that some test breaks.

bash tests/prova_mutacao.sh  # 9ร— "quebrou (bom)" โ†’ OK
5

Fill in the outcome canvas

The user, the decision, today's cost and a success number with a deadline. No metric, no start.

cp templates/canvas-resultado.md docs/meu-canvas.md
6

Encode your policy with tests

One constant per number in the document, one test per limit (the exact value and its neighbor).

cp templates/politica_modelo.py agentic_app/policies/reembolso.py
cp templates/test_politica_modelo.py tests/test_reembolso.py
7

Design the workflow in JSON

Context โ†’ code โ†’ condition โ†’ LLM โ†’ formatting. The external action goes in propor_acao, with the editable fields. Move it into your app's workflows/ folder only after you register the context and the function it uses.

cp templates/workflow-modelo.json meu_workflow.json
python3 -c "from agentic_app.workflow import carregar_spec as c; c('meu_workflow.json')"
8

Define roles, identities and approvers

Who runs each workflow, which service account it acts as and who approves what it proposes.

cat templates/permissoes.json
9

Swap the LLM when the process is ready

The fake stays in the tests. For a local model, one variable. For another provider, a subclass of LLM.

AGENTIC_LLM=ollama python3 -m agentic_app.demo
Reference app

Manager coaching: 12 people, 5 workflows

Fictional data. The manager sees the team, generates follow-ups for those who missed their goal, receives suggestions from the background agent and answers vacation questions with the encoded policy.

Coaching app panel with the team engagement table
Panel: each person's status has a label and a color; drafts and suggestions appear on the same screen.
Visual team report with indicators and progress bars
Report generated by the relatorio_equipe workflow: 12 people, 16 goals, 7 overdue. Also exported as PDF.
ComponentWorkflowNodesWho runs itActs as
Goal follow-upfollowup_metas6gestor, sistemasvc-coaching
Next stepsproximos_passos6sistema, gestorsvc-coaching
1:1 invitationconvite_1a14gestorsvc-coaching
HR assistantassistente_rh10colaborador, gestor, rh, sistemasvc-rh
Reportrelatorio_equipe4gestor, rh, sistemasvc-coaching
Executive dashboard ยท 1.1.0

The board view: is it delivering, safely, and at what cost?

The manager panel is the working screen. The executive dashboard answers whoever sponsors the app, with numbers computed from the audit log, the approval queue, the outbox and the app data. No number comes from an LLM.

Executive dashboard with alerts, canvas metric against target, agent operations, control and LLM cost
Real demo screenshot: 42.9% of overdue goals were discussed within 7 days (target 90%, baseline 30%), 9 runs, 100% of external actions approved, 27 LLM calls.

๐ŸŽฏ Business result

The canvas metric against target and baseline, with a "met" or "not met" status. In the demo: goals completed 31.2%, average engagement 76.7 and 6 people at risk.

โš™๏ธ Agent operations

Runs per workflow and per trigger (click 7, schedule 1, event 1), drafts approved, edited and rejected, time to approve and background-agent suggestions accepted (1 of 10).

๐Ÿ›ก๏ธ Control and risk

Access denied per role, tools blocked by least scope, hash chain intact or broken (with the line) and the % of external actions with approval, which must be 100%.

๐Ÿ’ฐ LLM cost

Calls per workflow and per model (FakeLLM counts the same), estimated tokens and cost from the templates/indicadores.json table, which ships at zero.

๐Ÿšจ Rule-based alerts

3 to 5 short sentences built by code, ordered critical โ†’ attention โ†’ ok. A broken chain or an unapproved email goes to the top.

๐Ÿ”’ Board and admin only

The dashboard is the painel_executivo workflow, with a read-only identity. Employee and manager get 403, and the attempt becomes a workflow.negado line in the audit.

python3 -m agentic_app.demo   # section 10: executive summary
python3 -m agentic_app.serve
# http://127.0.0.1:8765/executivo?usuario=dora
Trends ยท 1.2.0

The movie, not the snapshot: where are the numbers heading?

The executive dashboard shows whether the app delivers now. The trends dashboard uses the weekly history to give each number's pace, when the target is reached (or that it is not reached this quarter) and what is getting worse before it becomes a problem.

๐Ÿ“ˆ Pace and projection

Simple linear regression over the weeks: "at the current pace, the target is reached on DD/MM" or "not reached by the end of the quarter". A target already met but worsening shows the date it is lost.

โš ๏ธ Early signals

Three weeks in a row in the bad direction become an alert. In the demo: average engagement falling for 8 weeks and 4 people with 3 drops in a row (Carla, Henrique, Elisa, Lucas).

๐Ÿ”€ What-if scenarios

An explicit rule in code: each extra one-on-one per week covers one person with an overdue goal. With 5 a week, 42.9% becomes 76.2% and the 90% target arrives on 28/12/2026.

๐Ÿ—“๏ธ History that builds itself

The snapshot_indicadores workflow writes the week's snapshot every Monday 07:00 to saida/historico.jsonl. With fewer than 4 weeks, the dashboard says "not enough history".

๐Ÿ”’ Strategy, board and admin

The painel_tendencias workflow with a read-only identity. The LLM only stitches the narrative from sentences already computed; swapping the LLM changes no number.

python3 -m agentic_app.demo   # section 11: snapshot + trends
# http://127.0.0.1:8765/tendencias?usuario=estela
Trends dashboard with narrative, early signals and line charts with moving average, target and projection
Real demo screenshot (12 weeks, labeled example history): coverage grows 1.3 p.p. a week and does not reach 90% by 31/12/2026; engagement leaves its target on 02/12/2026.
Command Center ยท 1.3.0

One screen for operators: what the agents are doing now and what is missing for the target

The executive and trends dashboards are for people who decide. The Command Center is for people who watch live and act on the spot. Two tabs: Agents (Agent Control Tower) and Business (Mission Control).

๐Ÿ›ฐ๏ธ Agent Control Tower

Traffic light per workflow (ok, attention, failure, paused), last run, next scheduled run, approval queue by age with a 24 h SLA, failures and denied access, audit chain and latest events.

๐ŸŽ›๏ธ Actions on the agents

Pause (the trigger stays in the audit and does not run; other scheduled ones keep going), resume, run now, re-run and escalate a stuck approval. Only the operacao role and admin. Operations never approves or sends.

๐ŸŽฏ Mission Control

The canvas metric against its target and how many conversations are missing (demo: 42.9%, 4 missing). Decision queue: who is at risk, where each case stands and the next action, with buttons to trigger the agent, approve or reject.

๐Ÿ”’ Every click with your own role

A button you cannot use shows up disabled with the reason, and the server checks again. Every action and every denial goes to the audit. Re-run only redoes what does not require storing the person's input.

python3 -m agentic_app.demo   # section 12: pause, escalate, dashboard
# http://127.0.0.1:8765/comando?usuario=otavio
Command Center Agents tab with a traffic light per workflow, next scheduled run and pause, run now and re-run buttons
Agents tab in the 1.4.0 layout (8 simulated weeks): cards, side filters, runs per day colored by status.
Command Center Business tab with the canvas metric, what is missing for the target and the decision queue per person
Business tab: the canvas metric per week against its target, people per situation and risk reasons.
Dashboards ยท 1.4.0

All four dashboards in the same pattern: overview first, detail next

Agents, Business, Executive and Trends now use the BI dashboard layout: big numbers on top, filters on the side, charts in the middle and, below, the detail with actions. Clicking a chart filters the rest of the page.

๐Ÿงญ One navigation bar

A bar at the top leads to the four dashboards. Each keeps its own role: whoever cannot see it gets a 403 and the attempt goes to the audit.

๐Ÿ”Ž Click to drill down

A bar, day, slice or card becomes a filter (?workflow=โ€ฆ&situacao=falha). Active filters show as chips; click again to remove. The link can be saved and shared.

๐Ÿ“Š Plain SVG

Columns, bars, donuts and lines drawn in Python, no library or CDN. Hover tooltips, a legend whenever there are two or more series, status color always with a label.

๐Ÿงช 8 simulated weeks

python3 -m agentic_app.simular runs the real engine with a simulated clock (fictitious, always the same) so the charts have something to show.

python3 -m agentic_app.simular
python3 -m agentic_app.serve
Executive dashboard in the BI layout with cards, period filter and runs per week
Executive: canvas cards, runs per week and usage per workflow, with a period filter.
Trends dashboard in the BI layout with one card per metric and projection charts
Trends: one card and one chart per metric, filterable by group and projection status.
Videos

See the framework in action

The explainer videos will show up here.

Coming soon.
Where it fits

The app and business-workflow layer

agentic-app does not replace the other INEMA kits. It sits on top of them.

agentic-starter

The company's agent in files: identity, skills, rules and measurement. It answers who the agent is and how it works here.

Open the guide

inema-agent-runtime

How agents discover, connect to and use the tools you already have. It answers how the agent reaches the tools.

Open the guide

agentic-app

The application the business person uses: screen, fixed workflow, policy as code, approval and audit. It answers what outcome the company gets.

See the code

Roadmap

What exists and what comes next

Version 1.0.0 is the complete core with one reference app. Then came the executive dashboard (1.1.0), the trends dashboard (1.2.0), the Command Center (1.3.0) and the shared BI layout across the four dashboards (1.4.0).

1.0.0
Core + Manager coachingEngine with 5 node types, FakeLLM and local Ollama, approval queue, roles and identities, hashed audit, 3 trigger types, vacation and leave policy, HTML/PDF report, web panel, 48 checks.
1.1.0
Executive dashboardCanvas result against target, agent operations, control and risk, LLM cost and rule-based alerts; board role; HTML and PDF; 62 checks.
1.2.0
TrendsWeekly history with automatic snapshot, pace by regression, projection to target, early signals, comparison between people and what-if scenarios; strategy role; 75 checks.
1.3.0
Command CenterAgent Control Tower (traffic light per workflow, queue by age with SLA, failures, events) and Mission Control (canvas metric, how much is missing, decision queue), with actions: pause, resume, run now, re-run, escalate, trigger, approve; operations role; 93 checks.
1.4.0
Overview โ†’ detail on all four dashboardsShared BI layout with one navigation bar, cards, side filters, clickable SVG charts and detail with actions; 8-week simulation; weekly snapshot fixed; 104 checks.
Next
More reference appsOther processes using the same engine, each with its own canvas, policies and tests.
Later
Production connectorsExamples of an SMTP executor, corporate login on the panel and database reads in the context node.