Enhancement/robust agent framework#16
Merged
Merged
Conversation
…ll docs - Fix cookbook-examples.md: correct import paths for FailSafeConfig, RunnerConfig - Fix import errors: use afk.agents instead of afk.agents.types - Fix RunnerConfig: add 18 missing fields (default_sandbox_profile, background tools, etc) - Fix SandboxProfile: add file_allowed_extensions, file_max_size_mb, network_allowed_domains - Fix Eval references: EvalSuite -> EvalSuiteConfig, use arun_suite() - Fix MCPServer example: takes registry, not agent - Add skill references to SKILL.md index
Before PROFILES was dict of dicts, not type-safe. Now PROFILES uses LLMProfile dataclass with typed attributes. Example: # Before (not type-safe) PROFILES[development][retry].max_retries # error # After (type-safe) PROFILES[development].retry.max_retries # ✓ Also exports LLMProfile from afk.llms module.
…variables - debugger.md: Debugger, DebuggerConfig, debug instrumentation - queues.md: TaskQueue system with TaskWorker, RetryPolicy, backends - environment-variables.md: Complete reference for all AFK_* env vars including: - LLM settings with multi-provider routing - Memory backend configs - MCP server configs - Per-provider API keys and URLs - Multiple API keys pattern
- Update PROFILES access from dict-style to attribute-style PROFILES["development"]["retry"].max_retries -> PROFILES["development"].retry.max_retries - Fix TestProfilesStructure to use hasattr/getattr instead of "in" - Change TestLLMSettingsFromEnvInvalidValues: tests now verify fallback behavior (not raise), matching LLMSettings.from_env() forgiving design
Add afk.config module with:
- EnvVarField descriptor for type-safe env var binding
- Settings base class with from_env() auto-resolution
- LLMEnv, MemoryEnv, MCPEnv, QueueEnv for each subsystem
- Support for AFK_LLM_PROVIDER_ORDER for fallback chain
This enables:
class LLMEnv(Settings):
AFK_LLM_API_KEY = EnvVarField("AFK_LLM_API_KEY", default=None)
config = LLMEnv.from_env() # resolves all AFK_LLM_* vars
Add comprehensive tests for: - DebuggerConfig defaults and custom values - Frozen dataclass behavior - All verbosity levels (basic, detailed, trace) - Debugger.runner() creates debug-enabled runners - Debugger with custom config merges correctly - Integration test: disabled debugger emits no debug payload Total: 11 tests (was 2)
…lm_client
- Add all runtime policies as explicit params to create_llm_client
- hedging_policy, circuit_breaker_policy, etc. can now be passed directly
- Update environment-variables.md with hedging and circuit breaker docs
Example:
client = create_llm_client(
provider="openai",
hedging_policy=HedgingPolicy(enabled=True, delay_s=0.1),
)
- Add BreakpointConfig for step-by-step debugging - Add breakpoints support for pausing execution - Expand test coverage to 11 tests
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Sumary:
What's New
What's Fixed
What's Added