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-1.0.0b1.tar.gz (44.0 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-1.0.0b1-py3-none-any.whl (64.1 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for tiferet_agents-1.0.0b1.tar.gz
Algorithm Hash digest
SHA256 c8461c7f560cba8307e0fa639a1d6054d0844c87571ee30649971670f37966b3
MD5 eb344646f7736a85a24c50f2097e4a53
BLAKE2b-256 dcba3a1fb8e3ee6bb1ceba16e2b82b6d23f2e8eb4374da73cb18d62256b0f45f

See more details on using hashes here.

Provenance

The following attestation bundles were made for tiferet_agents-1.0.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-1.0.0b1-py3-none-any.whl.

File metadata

File hashes

Hashes for tiferet_agents-1.0.0b1-py3-none-any.whl
Algorithm Hash digest
SHA256 bc93370184df4765a24f15fc97b92efd4e11009e4e2b209f8d37d40a79ac7594
MD5 92a34ed27ae516957f07e2cb16e7fbc1
BLAKE2b-256 62eb528652511106d4930d4deedc7086d858b8992c16cc89518513ed8a65d103

See more details on using hashes here.

Provenance

The following attestation bundles were made for tiferet_agents-1.0.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