Skip to content
View anentropic's full-sized avatar

Block or report anentropic

Block user

Prevent this user from interacting with your repositories and sending you notifications. Learn more about blocking users.

You must be logged in to block users.

Content in all repositories owned by your account will be closed.
Maximum 250 characters. Please don’t include any personal information such as legal names or email addresses. This note will only be visible to you.
Report abuse

Contact GitHub support about this user’s behavior. Learn more about reporting abuse.

Report abuse
anentropic/README.md

Selected projects

  • An event-sourced timeline, belief store and identity layer for long-running LLM agents.

    python on pydantic-ai framework, sqlite and doxastica.

    anagrapheus combines a belief store with event-sourced architecture.

    Imagine a game-playing agent. Across a series of turns it builds up state in external memory stores, one of which is a model of its own and other players' beliefs (doxastica). Event-sourcing gives us an audit log (sqlite) of how the current state was arrived at.

    It can be used to build agents or simulations that run for many turns, such as negotiations, games with non-player characters, or interactive fiction, where several agents hold private beliefs about each other and where a run is too expensive or too random to repeat by re-running it.

    It gives a long-running AI agent one authoritative event log, and builds everything else (beliefs, entity identity, a consolidated history, assembled prompts) as state derived from that log.

    anagrapheus rests on two ideas:

    1. One log; everything else is a fold. The event log is append-only and is the only thing that is authoritative. A fold is a function that applies events in log order to build some state. The state a fold builds is a projection: it can be dropped and rebuilt from the log at any time. Each projection records its position, the sequence number of the last event it has consumed, so it can catch up from there. Per-agent beliefs, the entity registry and the chronicle (consolidated history) are all projections.
    2. Every draw is pinned. A model call returns a different answer each time, so it is a draw. Pinning a draw records its result under a key built from what was asked: the conversation, the model, the tools and the settings. A retry with the same key gets the recorded result instead of a new draw. Replay answers every request from the recorded results and never calls the model. That is different from re-running, which calls the model again and gets new answers. If your code now asks something different, the key changes and replay stops with a PinMiss instead of quietly drawing a new answer.
  • Belief revision system based on append-only property graph.

    python on LadybugDB (graph db)

    An implementation of the "Graph-Native Cognitive Memory for AI Agents: Formal Belief Revision Semantics for Versioned Memory Architectures" paper by Young Bin Park, with a multi-scope extension (original paper is single agent).

    doxastica keeps beliefs on append-only revision chains, records what rests on what, and when something is retracted or superseded it tells you which conclusions stand on ground that just moved. Knowledge is held per scope, so several holders (several agents, or an agent and the world) can believe contradictory things at once, and where they diverge is a query rather than a guess.

  • Random data generator

    faker-jsonschema is a Faker provider that generates random data conforming to a JSON Schema.

    Pass any JSON Schema dict to faker.from_jsonschema() and get back a valid, randomly generated value.

    1800+ unit and PBT tests aiming to ensure correctness. Limitations of our strategies are acknowledged in the docs.

  • Schema evolutions validator

    java (out of necessity more than choice)

    chuckd supports JSON Schema, Avro and Protobuf. It is a cli tool designed to be run as part of a CI/CD pipeline.

    In the context of a multi-service application backend you want to be able to validate that only backwards-compatible changes are made to the message schemas which different services use to communicate with each other. So you need a "schema evolution validation tool".

    chuckd repurposes some parts of Confluent Schema Registry as a backend-agnostic cli tool, to provide validation only without needing a Kafka cluster.

    This project has an extensive build pipeline in GitHub Actions which builds binaries, Docker images, and publishes to Homebrew package manager.

  • Library for color and formatting in the terminal

    ocaml After 10+ years of intensive Python work at various companies I was curious to try something different. I was attracted to OCaml as a pragmatic functional language.

    Spectrum is a library for colour and formatting in the terminal, inspired by the many libs of that sort for Python and also chalk.js

    AFAIK it is different from any other OCaml terminal colours lib by leveraging the language's own support for styling via its format-string DSL, and also providing access to modern 256 and 24-bt colour palettes. It has been an useful learning project, exercising some interesting corners of the language including an ocamllex parser for the DSL and a customer PPX macro-preprocessor.

  • ocaml After 10+ years of intensive Python work at various companies I was curious to try something different. I was attracted to OCaml as a pragmatic functional language.

    A simple octree implementation in OCaml, intended to efficiently find nearest match for an arbitrary point among a set of points in 3D coordinate space.

    Originally written and benchmarked by hand, but subsequently optimised with AI.

  • python This library is a port of some of the parser combinators from Haskell's Megaparsec to the Python library parsy.

    It is surprising how smoothly these translated over, considering the difference between the two languages. I put this down to parsy's clever use of Python generators to mimic Haskell's monadic do notation.

    This was a yak I had to shave in order to complete https://github.com/anentropic/python-waterloo ...which is a parser (and refactor tool) to extract unchecked type info from Python docstrings and convert them to checkable type annotations.

  • rust/python For a while I was experimenting with OpenGL graphics in Python (see also https://github.com/anentropic/pyglslify)

    I wanted a way to introspect the defined inputs and outputs of GLSL shader code. glsl-shaderinfo is a Python library built in Rust using the PyO3 toolchain, leveraging a GLSL parser crate that was superior to anything I could find on PyPI.

Pinned Loading

  1. python-waterloo python-waterloo Public

    A cli tool to convert type annotations found in 'Google-style' docstrings into mypy py2 type comments (and from there into py3 type annotations).

    Python 2 1

  2. depop/popget depop/popget Public

    Simple declarative REST-API client for Python.

    Python 27 1

  3. apigraph apigraph Public

    (WIP) Derives a dependency graph from OpenAPI schema documents

    Python

  4. chuckd-example chuckd-example Public

    Example repo for integration testing the `anentropic/chuckd` GitHub Action.

  5. for-agents for-agents Public

    Claude plugins, skills etc

    Python

  6. s-layer/duckdb-semantic-views s-layer/duckdb-semantic-views Public

    Semantic Views for DuckDB.

    Rust 23