본문으로 건너뛰기
cccskills
무료GitHub에 공개

genai-tk

Build GenAI and agentic apps with genai-tk (tclatos/genai-tk), a YAML-driven IoC toolkit over LangChain, DeepAgents, DeerFlow, and Prefect. Use this skill whenever the user mentions genai-tk, genai_tk, `cli init`, `cli agents run`, `LangchainAgent`, `create_harness`, `get_llm`, `global_config()`, `model_id@provider`, `agents:`/`agent_defaults:` profiles, `RetrieverFactory`, `cli workflow`, or BAML extraction. Also trigger for app_conf.yaml, GENAITK_PROFILE, CodeAct, OpenSandbox, decision models, or "the toolkit".

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

연동 도구OpenAI
설치 방법 보기

포함된 파일(15)

  • SKILL.md11.6 KB
  • eval.yaml1019 B
  • genai-tk-skill.skill37.7 KB
  • graders/check.py18.6 KB
  • instructions/langchain-agent-profile.md2.2 KB
  • references/agents.md19.5 KB
  • references/baml-structured.md11.7 KB
  • references/cli-and-init.md10.4 KB
  • references/configuration.md8.3 KB
  • references/models.md11.1 KB
  • references/rag.md9.9 KB
  • references/workflows.md8.8 KB
  • rubrics/quality.md2.2 KB
  • solutions/reference-langchain-agent-profile/config/agents.yaml937 B
  • solutions/reference-langchain-agent-profile/use_agent.py342 B

SKILL.md(원문)

설치하기 전에 에이전트에게 전달되는 지시 내용을 확인할 수 있습니다.

genai-tk — GenAI & Agentic Toolkit

genai-tk is a Python 3.12+ toolkit where YAML config drives everything: LLM providers, agent profiles, retrievers, workflows, and CLI commands are declared in config/*.yaml and resolved at runtime through an Inversion-of-Control registry (ImportResolver). You extend it by adding YAML entries that point at dotted Python paths, not by editing the library.

config/app_conf.yaml ─► global_config() ─► ImportResolver ─► factories / harness ─► LangChain objects

Verified against upstream commit 7fbd7a3 (2026-10-12). The toolkit moves fast and several upstream docs lag the code (see "Upstream doc drift" below). When docs and code disagree, trust the code.

Quick Reference

TopicReference
Install, extras, cli init, full CLI command tree, CliTopCommand, cli skills, house conventionscli-and-init.md
app_conf.yaml, :merge, :profiles, GENAITK_PROFILE, typed config access, IoCconfiguration.md
get_llm / get_embeddings, model_id@provider, providers.yaml, reasoning effort, routing, decision modelsmodels.md
Agent profiles, harness layer, tools, middlewares, skills, sandbox, MCP, DeerFlow, CodeAct, trajectoriesagents.md
RetrieverFactory, ManagedRetriever, embeddings stores, chunkers, cli rag, RAG as a toolrag.md
YAML workflows, Prefect, ingest routing, markdownize convertersworkflows.md
BAML structured extraction: BamlStructuredProcessor, baml_invoke, cli bamlbaml-structured.md

Core Workflow

1. Install and scaffold

genai-tk is not on PyPI. Install from git with uv, then scaffold:

uv init my-app && cd my-app
uv add "genai-tk @ git+https://github.com/tclatos/genai-tk@main"
uv run cli init --name "My Agent App"                  # scaffolds config/, skills/, justfile; runs uv sync
uv run cli init --extra harnessing --extra browser     # also install DeepAgents/DeerFlow + Playwright
just run                                               # uv run cli agent chat

Extras: harnessing (deepagents, DeerFlow, OpenSandbox), browser, nlp, postgres, streamlit, baml, chromadb, docling, monitoring, and all (everything except monitoring). Put API keys in .env (auto-loaded, plus ~/.env for the CLI). Run uv run cli info doctor as a pre-flight check.

2. Call models

from genai_tk.core.factories import get_llm, get_embeddings

llm = get_llm()                                  # llm.models.default from the active profile
llm = get_llm("fast_model")                      # a tag under llm.models
llm = get_llm("gpt-4o-mini@openai")              # model_id@provider (resolved via models.dev)
llm = get_llm("parrot_local@fake")               # offline fake model, no API key
llm = get_llm("o3 (high)@openai")                # inline reasoning effort
llm = get_llm("claude-haiku@openrouter:speed")   # gateway routing strategy
llm = get_llm("gpt-4o-mini@openai", streaming=True, json_mode=True, cache="sqlite")

embeddings = get_embeddings()                    # embeddings.models.default

Both return plain LangChain BaseChatModel / Embeddings objects. CLI: cli core llm -i "hello" -m parrot_local@fake, cli info models, cli info llm-profile <id>. Details in models.md.

3. Define an agent in YAML, run it anywhere

Profiles live under a top-level agents: dict keyed by slug, in config/agents.yaml or config/agents/*.yaml. agent_defaults: supplies fallbacks for LangChain profiles.

# config/agents.yaml
agent_defaults:
  type: react
  default_profile: research
agents:
  research:
    harness: langchain            # langchain (default) | deerflow
    name: "Research"
    type: deep                    # react | deep | custom
    llm: gpt-4o-mini@openai
    system_prompt: "You are an expert researcher. Cite sources."
    tools:
      - genai_tk.agents.tools.langchain.search_tools_factory.create_search_function:
          verbose: false
    mcp_servers: [filesystem]     # names from mcpServers: in mcp_servers.yaml
    skill_directories: ["${paths.project}/skills"]
    enable_planning: true
    enable_file_system: true
    checkpointer: {type: memory}  # none | memory | class
from genai_tk.agents.langchain import LangchainAgent

agent = LangchainAgent("research", llm="claude-haiku@openrouter")   # slug or display name, + overrides
print(agent.run("Summarise this week's AI news"))
uv run cli agents list
uv run cli agents run research "Summarise this week's AI news"
uv run cli agents run research --chat

For a harness-agnostic API (LangChain and DeerFlow behind one event stream), use genai_tk.agents.harness.create_harness("research"). See agents.md.

4. Add RAG, workflows, or structured extraction

embeddings_store:
  chroma:
    backend: genai_tk.core.vector_backends.ChromaBackend
    embeddings: default
    config: {storage: "${paths.data_root}/vector_store"}
retrievers:
  docs: {type: genai_tk.core.retrievers.VectorRetriever, embeddings_store: chroma, top_k: 4}
uv run cli rag add-files ./docs -r docs -p "**/*.md"
uv run cli rag query "What does the doc say about X?" -r docs
uv run cli workflow run markdownize/fast --set sources=./inbox --set md_output_dir=./data/md
uv run cli baml run ExtractResume -i "John Smith; 10 years Python"         # a function from your baml_src/

Configuration in One Minute

config/app_conf.yaml is the root. It is loaded from config/app_conf.yaml relative to the current working directory (it does not walk up parent directories), so run commands from the project root.

profile: ${oc.env:GENAITK_PROFILE,local}
paths:
  project: ${oc.env:PWD}
  config: ${paths.project}/config
  data_root: ${paths.project}/data
:merge: ["**/*.yaml", "!demos/**", "!examples/agents/**"]   # gitignore-style globs under config/
:profiles:
  local:
    llm: {models: {default: gpt-4o-mini@openai, fake: parrot_local@fake}, cache: sqlite}
    embeddings: {models: {default: embeddings_768@fake}}
:env: {LOGURU_LEVEL: INFO}
from genai_tk.config_mgmt.config_mngr import global_config, switch_profile

cfg = global_config()
cfg.get_str("llm.models.default")
cfg.section("my_feature", MyFeatureConfig)      # typed Pydantic access; empty model if absent
switch_profile("pytest")                         # sets GENAITK_PROFILE and reloads

Full semantics in configuration.md.

Coding Conventions (from upstream AGENTS.md)

  • Python 3.12+: str | None, list[str]; avoid Any (use discriminated unions or TypeAlias)
  • Absolute imports only; ruff with line length 120
  • Pydantic v2 for all structured data: model_config = {...}, model_post_init(), model_dump_json(); no dataclasses, unnamed tuples, or untyped dicts
  • loguru for logging; Google-style docstrings without types or Raises:
  • Read config through typed models: global_config().section(...) / .section_dict(...)
  • Tests: use the fake_llm_id / fake_llm fixtures and fake providers instead of mocks; never hard-code model IDs
  • Domain knowledge goes in SKILL.md files loaded on demand, not in system prompts

Upstream Doc Drift

These upstream docs or bundled skills contradict the code at 7fbd7a3. Use the right-hand column.

Docs sayCode does
Config search walks up parent directoriesOnly config/app_conf.yaml under the CWD
cli init -t agent-app|rag-app|workflow-app|minimal, --with-deer-flowFlags are --name, --extra, --with-graph, --graph-path, --force
cli mcp serve|list|generateThe group is cli mcpserver start|serve|list|generate
cli core decisioncli core classifier
get_llm(..., reasoning={...})Raises; use "model (high)@provider" or reasoning_effort="high"
Workflow DSL with steps: / uses: / needs:run: or pipeline: with id, run, after, with
cli rag add-files <retriever> <dir>, --includecli rag add-files <dir> -r <retriever> -p <pathspec>
Short retriever/backend aliases (type: vector, backend: Chroma)Fully qualified class paths are required
langchain_agents: profile listsagents: dict + agent_defaults:
baml_invoke(inputs=...), cli baml extract --recursive --includebaml_invoke(name, params, ...), -p <pathspec> (default **/*.md)
Bundled baml_extract, rag_ingest, office2pdf workflows (and cli baml extract) just workTheir YAML param names don't match the flow signatures; see workflows.md

Anti-Patterns to Avoid

  • Using pre-2026 import paths — genai_tk.core.llm_factory, genai_tk.utils.config_mngr, and genai_tk.core.retriever_factory are gone with no shims; import from genai_tk.core.factories and genai_tk.config_mgmt.config_mngr
  • Writing langchain_agents: / profiles: lists or spec: web_search tools — the old profile schema is rejected; use the agents: dict and qualified factory paths for tools
  • Putting skills: on a profile — it is silently ignored; use skill_directories: (deep agents only)
  • Bare model names in YAML — gpt-4o-mini triggers fuzzy lookup; always write model_id@provider
  • Short aliases for retrievers and vector backends — they fail to resolve; use genai_tk.core.retrievers.VectorRetriever, genai_tk.core.vector_backends.ChromaBackend, etc.
  • Hard-coding agents or LLMs in Python — add a YAML entry; LangchainAgent("slug") only loads and overrides
  • type: deep or DeerFlow without the harnessing extra — deepagents and deerflow-harness live there
  • Expecting --sandbox on cli agents run to isolate a LangChain profile — it only applies to DeerFlow; set backend: {type: docker} (or LangchainAgent(..., sandbox="docker")) for LangChain profiles
  • Running from a subdirectory — config discovery is CWD-relative; ConfigFileNotFoundError usually means you are not at the project root
  • Copying examples from upstream docs/ without checking the code — see "Upstream Doc Drift"

When to Use / Not Use

Use this skill when:

  • Working inside a genai-tk project (a config/app_conf.yaml and genai_tk imports are present)
  • Writing or fixing agent profiles, provider/LLM config, retrievers, workflows, or cli.commands entries
  • Scaffolding with cli init, extending the CLI, or wiring MCP servers, sandboxes, BAML, or trajectories
  • Migrating code written for older genai-tk versions (old imports, langchain_agents:, SmolAgents)

Do NOT use this skill when:

  • The project uses plain LangChain/LangGraph without genai-tk — use the langchain skill
  • You need a quick standalone agent without config-first machinery — the smolagents or langchain skills fit better
  • The question is about DeerFlow or DeepAgents used directly, outside genai-tk's harness

리뷰

아직 리뷰가 없습니다. 사용해 본 소감을 남겨 주세요.

댓글

로그인 없이 쓸 수 있습니다. 사용 후기, 질문, 작동하지 않은 환경 등을 편하게 남겨 주세요.

아직 댓글이 없습니다. 첫 댓글을 남겨 보세요.

보내면 바로 공개됩니다. 이메일 주소나 전화번호 같은 개인 정보는 쓰지 마세요. URL은 2개까지입니다.

0 / 1,000자

이 양식은 reCAPTCHA로 보호되며 Google 개인정보처리방침 및 서비스 약관이 적용됩니다.

같은 저장소의 스킬

Adaption AI SDK for synthetic data augmentation and dataset adaptation. Use when building data pipelines with the Adaption Python SDK, uploading datasets (local files, Hugging Face, Kaggle), running augmentation/adaptation jobs, configuring brand controls (hallucination mitigation, safety categories, length), recipe specifications (reasoning traces, deduplication, preference pairs, prompt rephrase), evaluating dataset quality, downloading results, or any workflow involving `pip install adaption`, `from adaption import Adaption`, Adaptive Data, or the adaptionlabs.ai API. Also trigger when the user mentions synthetic data generation for fine-tuning, dataset augmentation pipelines, DPO preference pair generation, or grounding-based hallucination reduction on training data.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

svngoku/coding-agents-skills122026년 10월 18일 업데이트

Design and review intuitive, scalable, maintainable HTTP APIs. Use this skill whenever the user wants to design a new REST API, review an existing API or spec, write OpenAPI 3.x definitions, or work with HTTP semantics (GET/POST/PUT/PATCH/DELETE), status codes, idempotency (Idempotency-Key), error envelopes (RFC 7807 problem+json), pagination, filtering, versioning, or API auth (API keys, OAuth2 client credentials, rate limits). Also trigger for "API design", "RESTful", "endpoints", "OpenAPI", "Swagger", "ReDoc", "contract testing", or GraphQL and gRPC design questions.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

svngoku/coding-agents-skills122026년 10월 18일 업데이트

Design relational database schemas (and choose when to go NoSQL) that stay maintainable and fast. Use this skill whenever the user mentions tables, DDL, entities and relationships, normalization (1NF/2NF/3NF), primary and foreign keys, UUID vs bigint IDs, indexes (B-tree, composite, covering, partial), EXPLAIN, constraints (CHECK, UNIQUE, exclusion), transactions and isolation levels, migrations (Alembic, Prisma, Flyway, expand-contract, backfilling), or SQL vs NoSQL (MongoDB, DynamoDB, Cassandra, graph databases). Also trigger for "design the database", "model this domain", "which database should I use", or writing ORM models and migration files for PostgreSQL, MySQL, SQLite, or SQL Server.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

svngoku/coding-agents-skills122026년 10월 18일 업데이트

ddd

무료

Domain-Driven Design system for software development. Use when designing new systems with DDD principles, refactoring existing codebases toward DDD, generating code scaffolding (entities, aggregates, repositories, domain events), facilitating Event Storming sessions, creating bounded context maps, or performing code reviews with a DDD lens. Covers both strategic design (bounded contexts, subdomains, context maps, ubiquitous language) and tactical design (entities, value objects, aggregates, domain services, repositories). Supports all major architecture patterns (Hexagonal/Ports & Adapters, CQRS, Event Sourcing, Clean Architecture) with language-agnostic guidance and concrete examples in Python and TypeScript.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

svngoku/coding-agents-skills122026년 10월 18일 업데이트

langchain

무료

Build AI agents with LangChain v1 and LangGraph in Python. Use this skill whenever the user mentions LangChain, LangGraph, create_agent, init_chat_model, @tool, ToolRuntime, agent middleware, human-in-the-loop, structured output, MCP tools (langchain.mcp, MCPAdapter), RAG, multi-agent handoffs or subagents, checkpointers, Deep Agents (create_deep_agent) or Managed Deep Agents (mda, define_deep_agent). Also trigger for migrating from create_react_agent, LLMChain, AgentExecutor or langchain-mcp-adapters, stream_events, SummarizationMiddleware, and langchain-classic.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

svngoku/coding-agents-skills122026년 10월 18일 업데이트

Decompose systems into microservices and apply canonical distributed-systems patterns. Use this skill whenever the user wants to split a monolith into services, design service boundaries, choose between microservices and a modular monolith, implement sagas or the outbox pattern, set up CQRS or event sourcing, configure an API gateway or BFF, add resilience (circuit breakers, retries, timeouts), or implement distributed tracing with OpenTelemetry. Also trigger for distributed transactions, service discovery, event-driven architecture, contract testing with Pact, canary releases, and idempotent consumers.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

svngoku/coding-agents-skills122026년 10월 18일 업데이트

svngoku의 스킬 모두 보기

이 스킬의 문제 신고