AgentC: Autonomous Carbon Manager
2026-06-16 · Energy & carbon · LangGraph · FastAPI · Claude · OpenAI · ChromaDB · LangSmith · Next.js · IoT

AgentC is my MSc dissertation. It is a multi-agent system that plans when devices should run, to cut Scope 2 (electricity) carbon emissions without breaking the safety and comfort limits a user sets. Agents read energy data from IoT plugs, work out the emissions, propose a daily device schedule, check it against the limits, then commit it.


What the trial showed
I tested it for 19 days on a small work-desk setup: a monitor, a standing desk, a laptop charger and a desk lamp, on power-monitoring plugs. This shows that the approach works, not what it would save at a large site.

- Emissions: about 15% below a relaxed-goal baseline in a one-week what-if comparison. The saving came from trimming standby loads.
- Safety: no safety-limit violations. The standing desk was set to always on, and when the optimizer suggested switching it off, the validator rejected the plan and sent it back.
- Autonomy: every daily run completed, including two failure tests: an impossible goal and missing telemetry.
- Learning: device profiles became more accurate as the trial went on.
How it works
A manager agent decides the next step. One worker runs at a time, writes its result to shared state and returns to the manager. Workers never call each other, which keeps a run easy to follow and debug.
The nine workers handle data collection, emission factors, IoT data, baseline estimation, usage patterns, pattern learning, simulation, goal assessment and commit. Three of them can call tools in a loop until they have what they need.
Planning
Planning is a separate sub-graph with four experts. Optimization proposes a schedule, comfort reviews it, validation checks it against the limits, and scheduling turns it into timed actions.
Comfort and validation can each send a plan back up to three times. If comfort still is not satisfied, the plan moves on to validation. If validation still rejects it, the run fails and records the violations instead of using a bad plan.
Tracking where each number came from
An emission factor can come from the organisation's records, a stored document, a web search or a default. Each factor keeps its source and a confidence level:
1class EmissionFactorEntry(BaseModel):
2 emission_factor: float
3 provenance: Literal["existing", "vector", "web", "default"]
4 confidence: Literal["high", "medium", "low", "unknown"]Calculations run in code tools. The agents decide what to calculate, and the tools produce the numbers.
Seeing what it did
Shared state uses a typed schema and LangGraph checkpointing. Each node run and edge was written to Postgres, so the Next.js dashboard could draw the agent graph while it ran. LangSmith traced every step, tool call and token.

Stack
LangGraph and LangChain, FastAPI, Postgres, InfluxDB for IoT time series, ChromaDB for retrieval, Node-RED for sensor data, Next.js and LangSmith, hosted on Railway during the trial. About 30 tools across 6 modules, with Claude and GPT models chosen per node.

What I would improve
Latency and token cost are fine for a daily schedule, but not for anything closer to real time. They are not the only limits. In the utility and energy sector, four more things push this towards small language models running on-premise at the edge:
- Privacy: these devices sit on the infrastructure, and operators want to keep that data on site.
- Control: AgentC is fully autonomous, and unexpected issues can arise. People will not give up that much control across large spaces, so a human should approve big changes.
- Reliability: operators automate these systems so they run for long periods without issues, and the agent has to hold up the same way.
- Connectivity: remote sites have network issues, so the agent cannot depend on a cloud connection.
Managers and engineers also need the causes of a problem to troubleshoot the system, so extensive explainability is a must. Text-based debugging is too hard on big systems with many cycles, so that explainability has to be fast and visual.
My thesis recommends small language models and edge agents as the next step, and that is what I am starting with AgentC Edge. It will not be AgentC moved to the edge. AgentC is a complicated multi-agent scheduler, and AgentC Edge should be very efficient. With lower latency, it can also be proactive while still being reactive.
The retry limit is also simple. A plan rejected three times for the same reason is treated the same as one rejected for three different reasons. I would handle those differently.