Skip to main content

Authoring SDK for Fred agents — graph, ReAct, and team agent primitives.

Project description

Fred SDK

fred-sdk is the authoring SDK for Fred agents. It provides the public APIs and abstractions required to define agents, workflows, and multi-agent compositions without depending on platform-specific runtime internals.

It is intended to be used together with fred-runtime, which provides the execution layer used to run those agents inside an application.


Overview

The Fred architecture separates agent definition from agent execution.

This separation is reflected in two complementary API layers:

1. Authoring APIs (fred-sdk)

These APIs are used to define agents declaratively.

They cover concerns such as:

  • agent identity and metadata
  • prompts and policies
  • tool declarations
  • workflow structure
  • team and multi-agent composition
  • human-in-the-loop patterns
  • abstract runtime contracts

This is the layer used by agent authors.

2. Runtime APIs (fred-runtime)

These APIs are used to execute agents inside a real application environment.

They cover concerns such as:

  • application creation
  • registry wiring
  • runtime configuration
  • checkpointing
  • tracing and observability
  • security integration
  • infrastructure adapters

This is the layer used by application and platform developers.

In summary:

  • fred-sdk defines the agent
  • fred-runtime runs the agent

What fred-sdk is for

Developers use fred-sdk to build Fred agents in a portable and structured way.

It supports several paradigms, including:

  • ReAct-style agents
  • graph-based workflows
  • team and multi-agent systems
  • human-in-the-loop workflows

The goal is to let developers focus on behavior and orchestration without wiring runtime infrastructure directly into agent definitions.


Installation

pip install fred-sdk

Quickstart

A realistic minimal example is to declare an agent with fred-sdk, then run it through an application created with fred-runtime.

Agent definition with fred-sdk

from fred_sdk.contracts.models import ReActAgentDefinition, ReActPolicy


class GeneralAssistantDefinition(ReActAgentDefinition):
    agent_id: str = "fred.samples.assistant"
    role: str = "General-purpose assistant"
    description: str = (
        "A helpful, concise assistant for general questions and conversation. "
        "No external tools or document retrieval required."
    )
    tags: tuple[str, ...] = ("general", "react")
    system_prompt_template: str = """\
You are a helpful, knowledgeable, and concise assistant.
Answer questions clearly and directly. When you are uncertain, say so.
You have no access to external tools or documents — work only from your own knowledge.
"""

    def policy(self) -> ReActPolicy:
        return ReActPolicy(system_prompt_template=self.system_prompt_template)


GENERAL_ASSISTANT_AGENT = GeneralAssistantDefinition()

This example illustrates the authoring API: the agent is defined declaratively through a public SDK model.

Application startup with fred-runtime

from fastapi import FastAPI
from fred_runtime.app import AgentPodConfig, create_agent_app, load_agent_pod_config

from fred_samples_agents.registry import REGISTRY


def create_app(config: AgentPodConfig | None = None) -> FastAPI:
    resolved_config = config if config is not None else load_agent_pod_config()
    return create_agent_app(registry=REGISTRY, config=resolved_config)


app = create_app()

This example illustrates the runtime API: the registry and configuration are assembled into an executable FastAPI application.


Understanding the two API levels

The distinction between the two layers is intentional.

In fred-sdk, developers declare agents

For example, an agent author defines:

  • the agent identifier
  • the role and description
  • the system prompt
  • the policy
  • optional tool and workflow contracts

This code should remain portable and mostly independent from deployment concerns.

In fred-runtime, developers run agents

For example, an application developer or platform team:

  • creates an agent registry
  • loads runtime configuration
  • wires checkpointing and runtime services
  • exposes the agents through an application

This code is responsible for effective execution.


Relationship with fred-runtime

fred-sdk and fred-runtime are designed to be used together, with a clean separation of responsibilities.

  • fred-sdk provides the public authoring surface
  • fred-runtime provides the execution environment

Behind the scenes, Fred uses LangChain and LangGraph for orchestration and runtime behavior, but these concerns are intentionally separated from the authoring layer as much as possible.


Design principles

  • Separation of concerns: authoring and runtime are distinct layers
  • Portability: agent definitions should not depend on a specific backend
  • Composability: simple agents, workflows, and team agents should share a coherent model
  • Extensibility: runtime implementations can evolve without changing the authoring model
  • Clarity: public APIs for agent authors should remain stable and easy to understand

Notes

  • fred-sdk depends on fred-core and fred-portable, which are installed automatically
  • The public SDK surface is exposed through fred_sdk/__init__.py for convenient top-level imports
  • Runtime-specific application bootstrapping belongs in fred-runtime, not in fred-sdk

Resources


Conceptual model

  • fred-sdk: authoring APIs used to define agents
  • fred-runtime: runtime APIs used to execute them

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

fred_sdk-0.1.6.tar.gz (126.5 kB view details)

Uploaded Source

Built Distribution

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

fred_sdk-0.1.6-py3-none-any.whl (156.6 kB view details)

Uploaded Python 3

File details

Details for the file fred_sdk-0.1.6.tar.gz.

File metadata

  • Download URL: fred_sdk-0.1.6.tar.gz
  • Upload date:
  • Size: 126.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.3 {"installer":{"name":"uv","version":"0.11.3","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for fred_sdk-0.1.6.tar.gz
Algorithm Hash digest
SHA256 bf8d9afe2385dcd0294a2d00d93167aaa7765962418603b920d6a81cb3a21396
MD5 90a066c97b4b5ceff6990690e702facf
BLAKE2b-256 097846114a2ef68aa5991394c398baa84777eeb3fca8bc2e6e7b4ff8133239af

See more details on using hashes here.

File details

Details for the file fred_sdk-0.1.6-py3-none-any.whl.

File metadata

  • Download URL: fred_sdk-0.1.6-py3-none-any.whl
  • Upload date:
  • Size: 156.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.3 {"installer":{"name":"uv","version":"0.11.3","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for fred_sdk-0.1.6-py3-none-any.whl
Algorithm Hash digest
SHA256 7f938e8fa84f216fc4e035f6a86e90bff5bbca903ec75ecd50a6bae383f78b03
MD5 e8541aa83cad3bbf1a12cd578ff3866c
BLAKE2b-256 39b6f5b73623b19b7b49af1cc9edeeab2f07e61390fc32215620d41237eed9a5

See more details on using hashes here.

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