Skip to content
veritianaPublic

About

Lightweight persistent agent runtime with small specialized workers, selective memory, and continuous project progress.

Resources

Code of conduct

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

2 Commits

Folders and files

Repository files navigation

Tenrec mark

TENREC

Kill the agent. Keep the project.

Your coding agent should not need to reread the project every time it starts again.
Tenrec keeps the working state of the project outside the agent session, so disposable workers can continue from validated state instead of replaying the entire history.

DeepSeek V4 Flash: 39–40% lower cumulative input
NVIDIA Nemotron 3 Nano: 32–35% lower cumulative input
Controlled long-running benchmark · same task/tool trajectory · all runs completed successfully

Website · Planner Demo · Benchmarks

License: MIT Python 3.11+ Tests Platform

Tenrec persistent project-state runtime


The problem is not that the agent forgot one fact

A coding workflow can look like this:

Worker #1
  plans a change
  modifies the repository
  runs tests
  finds a regression
  fixes part of it
  validates the result
  exits

Worker #2
  starts later

What should Worker #2 receive?

A session-centric system often reconstructs working state from some combination of:

conversation history
plans
progress.md
repository files
diffs
test output
logs
previous decisions
summaries

The project already produced that information.

Yet the next model call often pays to consume much of it again.

Tenrec changes the persistence boundary.

Worker #1
      ↓
candidate result
      ↓
deterministic validation
      ↓
accepted state transition
      ↓
Persistent Project State
      ↓
Worker #1 disappears
      ↓
Worker #2 starts with no conversation history
      ↓
only relevant accepted state is routed in
      ↓
work continues

Agents are temporary. The project is not.


Persist the project, not the agent

Tenrec makes the project the durable object.

Persistent Project State
├── goals
├── tasks
├── dependencies
├── accepted decisions
├── validated facts
├── artifacts
├── test evidence
├── failures
├── recovery state
├── execution progress
├── learned skills
└── compact memory

Workers are deliberately replaceable.

They can:

  • finish,
  • fail,
  • restart,
  • use a different model,
  • receive a different role,
  • or disappear completely.

The project continues.

Tenrec is therefore a persistent project-state runtime for agentic software development.


Workers generate candidates. Validation changes the project.

A worker does not automatically get to rewrite durable project state just because a model produced an answer.

Tenrec treats work as explicit state transitions:

Current Project State
        ↓
       Task
        ↓
Relevant Context
        ↓
      Worker
        ↓
Candidate Result
        ↓
Deterministic Validation
        ↓
    Governance
        ↓
Accepted State Transition
        ↓
Updated Project State

This separates two responsibilities:

LLM worker
    → generate a candidate

runtime
    → decide whether the candidate is valid

When code can be executed, a schema can be checked, a diff can be inspected or an invariant can be tested, Tenrec prefers that evidence over generated confidence.


Context is routed, not accumulated

Tenrec does not try to keep an ever-growing agent context alive.

Persistent Project State
          ↓
      current task
          ↓
 State / Memory Router
          ↓
    Context Builder
          ↓
 relevant bounded state
          ↓
   short-lived worker

The objective is not to make the model reason less.

It is to avoid repeatedly asking the model to reread project state the runtime already knows.


The crossover

Selective persistent state is not free.

At the beginning of a workflow Tenrec can carry slightly more overhead than a simple transcript because the runtime has to create and maintain structured state.

The difference appears as the workflow grows.

early run

Transcript baseline ────────────────
Tenrec              ─────────────────

                      ↓

longer run

Transcript baseline ────────────────────────────────────────
Tenrec              ───────────────────────────────

The transcript keeps accumulating history.

Tenrec keeps routing bounded project state.

This crossover appeared in the controlled long-running benchmark.


Measured consequence

Tenrec includes a controlled benchmark that keeps the task/tool trajectory fixed and changes the persistence architecture.

Model Condition Baseline input Tenrec input Reduction Peak context reduction
DeepSeek V4 Flash 0731 normal 31,364 19,033 39.3% 28.0%
DeepSeek V4 Flash 0731 forced restart 31,900 19,088 40.2% 31.5%
NVIDIA Nemotron 3 Nano 30B A3B normal 31,431 21,364 32.0% 16.8%
NVIDIA Nemotron 3 Nano 30B A3B forced restart 32,856 21,467 34.7% 18.0%

All four controlled runs completed successfully.

Forced restart

The restart benchmark kills the running process and resumes execution in a new Python process.

The difference is what each architecture has to reconstruct.

TRANSCRIPT BASELINE

restart
   ↓
reload accumulated trajectory
   ↓
continue growing context


TENREC

restart
   ↓
reload persistent project state
   ↓
route relevant state
   ↓
continue

On the Nemotron forced-restart run:

Baseline input       32,856
Tenrec input         21,467

Reduction             34.7%

Post-restart input alone was reduced by approximately 39.3%.

Raw data and methodology: docs/BENCHMARKS.md

This benchmark measures context, persistence and recovery behavior. It does not claim that Tenrec writes better code than a frontier coding model.


Restart is a normal event

Tenrec does not require agent identity to survive.

Worker A
   ↓
validated state update
   ↓
process exits
   ↓
restart
   ↓
Project State reloads
   ↓
Worker B receives relevant state
   ↓
work continues

The worker is execution capacity.

The project is the durable unit.


Not just "agent memory"

Memory is only one component of project state.

A memory system may remember:

"The project uses PostgreSQL."

Tenrec also needs to know:

Task #42 is active.

Migration 003 passed validation.

Decision D17 was accepted.

auth.py changed.

Integration test X failed.

Retry #1 already happened.

Worker B should inspect files A and C.

The next valid transition is FIX → TEST.

That is operational project state, not simply conversational memory.


How is this different from LangGraph?

LangGraph is a stateful orchestration framework.

Tenrec starts from a different primary persistence boundary.

LangGraph Tenrec
Primary durable object workflow / thread state project state
Primary abstraction graph + nodes + edges project + tasks + workers
Persistence role workflow continuity project continuity across workers, sessions and models
State admission application-defined validation-gated state transitions
Context strategy state/context engineering selective routed project state
Worker identity graph execution dependent deliberately replaceable

The point is not that LangGraph lacks state.

It does not.

The distinction is the architectural default:

LangGraph persists a workflow. Tenrec persists the project.

LangGraph can model arbitrary application state. Tenrec makes project continuity, replaceable workers, selective project-state routing and validation-gated transitions the runtime's primary abstraction.


Core runtime

Goal
 ↓
Planner
 ↓
Task Graph
 ↓
Persistent Project State
 ↓
State / Memory Router
 ↓
Context Builder
 ↓
Specialized Worker
 ↓
Tools / Code / Artifacts
 ↓
Deterministic Validation
 ↓
Governance
 ↓
Accepted State Transition
 ↓
Persistent Project State

Quick start

Requirements: Python 3.11+, Git, WSL2 or Linux.

git clone https://github.com/veritiana/tenrec.git
cd tenrec
chmod +x bootstrap.sh
./bootstrap.sh
source .venv/bin/activate
python -m pytest

Current verified release:

64 passed

Initialize Tenrec inside an existing project:

cd /path/to/project
tenrec init

Preview a plan:

tenrec plan "Add OAuth2 PKCE login to this FastAPI project"

Start Tenrec Live:

tenrec serve --host 127.0.0.1 --port 7310

Open:

http://127.0.0.1:7310

Reproduce the long benchmark

NVIDIA Nemotron:

export NVIDIA_API_KEY="nvapi-..."
./benchmarks/run_nvidia_nemotron_3_nano.sh

DeepSeek V4 Flash:

export NVIDIA_API_KEY="nvapi-..."
./benchmarks/run_nvidia_deepseek_v4_flash.sh

See docs/BENCHMARKS.md for the exact methodology and committed raw result bundles.


Project state on disk

<project>/.tenrec/
├── project.json
├── config.yaml
├── tasks.db
├── memory.db
├── observability.db
├── skills/
├── audit/
└── router/

The model does not own this state.

The project does.


Open-source runtime. Paid intelligence.

Tenrec OSS remains local/self-hosted and usable as a complete runtime.

The commercial layer is intended to improve the decisions made over project state rather than lock the runtime behind a hosted service.

OSS
persistent project-state runtime
basic routing
validation
local execution

PRO
advanced State / Memory Router
adaptive Model Router
cost-aware routing
learned routing policies
advanced context budgeting

PRIVATE
isolated deployment
customer-controlled storage
customer-controlled model credentials
optional customer VPC / cloud deployment

HOSTED
optional managed deployment

Primary model: open-source runtime + paid intelligence.

Private deployment when required.

Managed hosting is optional.


Documentation


Philosophy

Kill the agent.
Keep the project.

Agents are temporary.
The project is not.

Persist the project, not the agent.
Workers generate candidates.
Validation changes the project.
Route state instead of replaying history.
Keep models replaceable.
Keep project state durable.

License

MIT — see LICENSE.

About

Lightweight persistent agent runtime with small specialized workers, selective memory, and continuous project progress.

Resources

Code of conduct

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages