Skip to main content

Agentic extension for the Tiferet framework with LangGraph-based agent orchestration

Project description

tiferet-agents

Agentic extension for the Tiferet framework — a lightweight, domain-driven wrapper around LangGraph that brings reliable, configurable agents into the Tiferet ecosystem.

Features

  • YAML-driven agent configuration — define agents, tools, memory, and prompts entirely in YAML
  • Multi-provider LLM support — OpenAI (default), Anthropic, and Google Generative AI via optional extras
  • Tool registration — dynamically load and wire tools from module_path.class_name definitions
  • Memory — triple-shaped fact storage with semantic recall via tiferet-kb integration
  • Human-in-the-loop — per-tool requires_approval with LangGraph interrupt/resume
  • Streaming — token-by-token streaming via SendMessageStream event
  • Tiferet feature bridge — invoke Tiferet features as agent tools with create_feature_tool()
  • Error handling & retry — exponential backoff with LLM-specific error classification
  • Production checkpointers — memory, SQLite, or Postgres state persistence

Installation

pip install tiferet-agents

Optional extras

pip install tiferet-agents[anthropic]    # Anthropic provider
pip install tiferet-agents[google]       # Google Generative AI provider
pip install tiferet-agents[memory]       # tiferet-kb memory integration
pip install tiferet-agents[sqlite]       # SQLite checkpointer
pip install tiferet-agents[postgres]     # Postgres checkpointer
pip install tiferet-agents[all]          # All optional dependencies

Quick Start

1. Define an agent in YAML

# app/configs/agent.yml
agents:
  my_assistant:
    name: My Assistant
    description: A helpful conversational assistant
    provider: openai
    model: gpt-4o-mini
    system_prompt: You are a helpful assistant. Today is {current_date}.
    temperature: 0.7

2. Send a message

from tiferet_agents import SendMessage
from tiferet.events import DomainEvent

result = DomainEvent.handle(
    SendMessage,
    dependencies={
        'agent_service': agent_service,
        'conversation_service': conversation_service,
        'llm_provider_service': llm_provider_service,
    },
    agent_id='my_assistant',
    message='Hello, how are you?',
)
print(result.content)

YAML Configuration Reference

agents:
  <agent_id>:
    name: string              # Required
    description: string       # Optional
    provider: string          # Default: openai (openai|anthropic|google)
    model: string             # Default: gpt-4o-mini
    system_prompt: string     # Supports {current_date}, {current_time} variables
    temperature: float        # Default: 0.7
    max_tokens: int           # Optional
    graph_type: string        # Default: react
    checkpointer: string      # Default: memory (memory|sqlite|postgres)
    checkpointer_config:      # Optional checkpointer settings
      db_path: string         # For sqlite
    max_retries: int          # Default: 3
    memory:
      enabled: bool
      namespace: string
      recall_limit: int
      embedding_provider: str
      embedding_model: str
    tools:
      - id: string
        name: string
        module_path: string
        class_name: string
        requires_approval: bool
        params: {}

Architecture

tiferet_agents/
├── assets/       # Error codes and constants
├── domain/       # Domain objects (AgentConfiguration, Conversation, Memory)
├── events/       # Domain events (SendMessage, CRUD, approval, tools, memory)
├── interfaces/   # Service contracts (AgentService, LLMProviderService, etc.)
├── mappers/      # Aggregates and YAML transfer objects
├── repos/        # YAML-backed service implementations
└── utils/        # GraphBuilder, LLMProviderFactory, CheckpointerFactory, etc.

See AGENTS.md for contributor orientation.

License

BSD-3-Clause

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

tiferet_agents-0.1.0b1.tar.gz (38.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

tiferet_agents-0.1.0b1-py3-none-any.whl (56.4 kB view details)

Uploaded Python 3

File details

Details for the file tiferet_agents-0.1.0b1.tar.gz.

File metadata

  • Download URL: tiferet_agents-0.1.0b1.tar.gz
  • Upload date:
  • Size: 38.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for tiferet_agents-0.1.0b1.tar.gz
Algorithm Hash digest
SHA256 bfad7aaad2ac8006724a20fe7bea3bc3cb9da4fdca9cd9974645ba75dfd07a1b
MD5 2924e6e1beef1bc3cf1201d02f7fd183
BLAKE2b-256 e28782733457e402fe0e265a416ce6c7f5d4acbf583f3dfca6d6a649cc124a44

See more details on using hashes here.

Provenance

The following attestation bundles were made for tiferet_agents-0.1.0b1.tar.gz:

Publisher: python-publish.yml on greatstrength/tiferet-agents

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file tiferet_agents-0.1.0b1-py3-none-any.whl.

File metadata

File hashes

Hashes for tiferet_agents-0.1.0b1-py3-none-any.whl
Algorithm Hash digest
SHA256 5f50f4b1d9a5d16416760f8e5677faf23a095ffa32f3ddce67607acb64199ead
MD5 68bc0fd45f76bbd2c6212ff8a532a0d3
BLAKE2b-256 0c21e2e6c8bdd88092eec2e54ed4dbaa9620513bc48a2478b25863ea1af11594

See more details on using hashes here.

Provenance

The following attestation bundles were made for tiferet_agents-0.1.0b1-py3-none-any.whl:

Publisher: python-publish.yml on greatstrength/tiferet-agents

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page