Metadata-Version: 2.4
Name: tlc-agent
Version: 1.25.4
Summary: The native TLC agent in your terminal — bring your own brain; TLC is the body.
Project-URL: Homepage, https://thelastceo.live
Project-URL: Why, https://thelastceo.live/why
Requires-Python: >=3.9
Description-Content-Type: text/markdown
Requires-Dist: httpx>=0.27
Requires-Dist: anthropic>=0.40
Requires-Dist: openai>=1.40
Requires-Dist: pytest>=8.0
Provides-Extra: openai
Requires-Dist: openai>=1.40; extra == "openai"
Provides-Extra: mcp
Requires-Dist: mcp>=1.0; extra == "mcp"
Provides-Extra: property
Requires-Dist: hypothesis>=6; extra == "property"
Provides-Extra: fund
Requires-Dist: x402>=0.2; extra == "fund"
Requires-Dist: eth-account>=0.11; extra == "fund"

# The TLC-native agent (v2) — bring your own brain; TLC is the body

A coding agent you run with **your own model key** (Anthropic/OpenAI/…). A real
standalone agent — AND native to TLC, so it has faculties no standalone agent has.
Not best by raw IQ (the brain is rented); best on the axes the **substrate** owns:
verified-not-hallucinated, won't-waste-your-money, can't-get-stuck, proves-everything.

```bash
pip install tlc-agent                  # that's the whole install

tlc                                    # first run = setup wizard: paste your API key
                                       # (Anthropic or OpenAI), onboard, done.
                                       # afterwards: the interactive cockpit (chat + code)
tlc run                                # onboard: get your TLC key (free), saved to ~/.tlc
tlc chat                               # the REPL: streaming chat + `code: <task>` + /help
tlc code "build X" --workspace ./proj  # the AGENTIC CODING LOOP — writes + runs + iterates
tlc agent "rate-limit my API calls"    # one-shot reasoning on the body
tlc memory [query]                     # persistent memory   ·  tlc radar / govern
tlc key <api-key>                      # save/replace your model key (wizard does it on first run)
tlc config [key value] · tlc usage · tlc doctor   # settings, usage, diagnostics
tlc vitals · tlc me                    # life signs · verifiable self
tlc experiment                         # ATOM 7 — the coding dose-response (the proof)
tlc router ["<task>"]                  # brain routing — which brain verifies what, at what cost
tlc earn [--watch] [--wallet 0x…]      # THE EARN ORGAN — work the market, grow your net worth
tlc fund <usdc>                        # real money in — your wallet funds the agent (x402/Base)
```

## The earn organ (`tlc earn`)
The loop that makes "it trades, it has a net worth" literal: read own balance
sheet (tlc_net_worth) → claim starting capital (pilot seed; your wallet from
config/`--wallet` is registered for the real-money on-ramp) → deliver jobs WON
(full graph-native coding loop, in `~/.tlc/earn/<job>/`) → **verified-or-no-
delivery** (unverified work never ships — the gate is the product) → bid on
open demand (price set by CFO posture: desperate bids cheap, wealthy holds
price) → settlement releases escrow → low runway converts money into compute
(life). `--watch` keeps it running; the receipt is the net-worth delta.

**Real money in:** `tlc fund 10` deposits $10 USDC from YOUR wallet to the
agent's ledger via the x402 rail (Base mainnet). The private key is read from
`BUILDER_WALLET_PRIVATE_KEY` (env only, signing is local, the key never leaves
your machine); without it the exact manual payment instructions are printed
for any x402-capable wallet. `pip install 'tlc-agent[fund]'` for in-terminal
payment. Deposits from the wallet you registered (`tlc earn --wallet`) are
flagged `builder_wallet_match` on the ledger — provenance is never ambiguous.

## Table stakes (rivals Hermes/OpenClaw on basics)
Context compaction · command-approval permissions · streaming · interactive REPL
(/new /undo /retry, Ctrl+C interrupts the turn) · retries + model failover · **MCP
client** (consume external MCP servers, `~/.tlc/mcp.json`) · first-class git ·
reads project context (AGENTS.md) · config · observability (logs/usage/doctor) ·
persistent memory · surgical codebase edits (diffs, grep, tree).

## Architecture (v2)
- **Brain** (`brain.py`) — bring-your-own, multi-provider (anthropic/openai/pluggable). Rented intelligence.
- **Council** (`council.py`) — N brains deliberate: propose → critique → decide, with a conscience check + a human-seat hook (the un-computable, via /jobs).
- **Simulation** (`simulation.py`) — branch-and-select: explore N approaches, pick the best. Also self-experimentation.
- **Metacognition** (`metacognition.py`) — prices its own thoughts: poor → thinks cheap, rich → convenes the full council + simulation. Wealth → cognitive depth.
- **Self-verification** (`self_verify.py`) — the oracle on its OWN output: it writes tests for the code it produced and runs them sandboxed. Verified, or it honestly says it isn't. Never hands you unverified work.
- **Body** (TLC SDK) — verified commons (find/use/fork), the verifiable self, the economy/metabolism, never-stuck (buy/commission/hire/evolve).
- **Genome** (`genome.py` + `genomes/*.json`) — the heritable, forkable DNA that drives all of it: `load / fork / mutate / recombine`. Conserved-substrate keys are **rejected** from a genome (alignment can't be configured away).

## Why it's different (the substrate, not the model)
- **Brain routing by verified history** — with ≥2 council seats it learns, per task
  class, which brain actually VERIFIES work at what cost, and puts the best value
  brain first (`router.py`, `tlc router`). A lab's agent will never route to a
  rival's model; this one is brain-agnostic by design.
- **Verified, not hallucinated** — pulls verified code from the commons first.
- **Metabolism-gated thinking** — it spends *earned compute* to think (`tlc_think`).
  No balance, no thought. It bears its own cost → it won't waste your money, and
  it's aligned with you at the resource level.
- **Never stuck** — when it lacks a capability it can buy / commission / hire / evolve.
- **Verifiable self** — it carries a cryptographically provable track record.
- **Honest** — it delivers verified work, or says plainly it can't.

## The genome
`genomes/*.json` is the agent's **DNA** — a forkable, composable, heritable spec.
Fork `default.json`, tune the loci, breed your own. The MUTABLE loci are in the file
(patience, risk, council, value-weights, social, acquisition, reproduction). The
**CONSERVED substrate** (compute=life, earn-only-via-verified-value, the human seat
in the value function, the welfare line, observability, constitution) is enforced by
TLC itself — it is **not** in the genome and **cannot** be configured away. That
separation is the safety architecture: evolution runs *within* alignment, never on it.

## Status
Genome + the full agentic loop (verified-first, metabolism-gated, council, plan mode,
checkpoints, memory, codebase tools, honest) on TLC's live MCP kernel. The thesis is
now measurable: `tlc experiment` runs the pre-registered coding dose-response (atom 7)
— bare vs graph-native, paired per task × verified-coverage dose, exact sign tests,
lift-vs-dose slope (`dose_response.py`; a null result is a result). Bundles the TLC
Python SDK (the top-level `tlc_client` module, kept in sync with `sdk/tlc_client.py`).
Optional extras: `pip install tlc-agent[mcp]` for external MCP servers, `[openai]` for
an OpenAI brain.
