> ## Documentation Index
> Fetch the complete documentation index at: https://www.truefoundry.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Agent Skills

> SDK methods to create, list, retrieve, update, and delete agent skills in TrueFoundry.

## Methods

<Accordion title="get">
  Get an agent skill artifact by its ID.

  #### Parameters

  <ParamField body="agent_skill_id" type="str" required />

  #### Returns

  <ResponseField name="GetAgentSkillResponse" type="GetAgentSkillResponse">
    [🔗 GetAgentSkillResponse](/docs/truefoundry_sdk/types#getagentskillresponse)

    Successful Response
  </ResponseField>

  #### Usage

  ```python lines theme={"dark"}
  from truefoundry import TrueFoundry

  client = TrueFoundry(
      api_key="YOUR_API_KEY",
      base_url="https://yourhost.com/path/to/api",
  )

  client.agent_skills.get(
      agent_skill_id="value",
  )
  ```
</Accordion>

<Accordion title="delete">
  Delete an agent skill artifact by its ID.

  #### Parameters

  <ParamField body="agent_skill_id" type="str" required />

  #### Returns

  <ResponseField name="EmptyResponse" type="EmptyResponse">
    [🔗 EmptyResponse](/docs/truefoundry_sdk/types#emptyresponse)

    Successful Response
  </ResponseField>

  #### Usage

  ```python lines theme={"dark"}
  from truefoundry import TrueFoundry

  client = TrueFoundry(
      api_key="YOUR_API_KEY",
      base_url="https://yourhost.com/path/to/api",
  )

  client.agent_skills.delete(
      agent_skill_id="value",
  )
  ```
</Accordion>

<Accordion title="list">
  List agent skills with optional filtering by FQN, ML Repo, or name. When present, `latest_version.manifest.source` is `blob-storage` with `description` only; use GET agent skill version for full SKILL.md (inline `source` with `skill_md`).

  #### Parameters

  <ParamField body="fqn" type="typing.Optional[str]">
    Fully qualified name to filter agent skills by (format: 'agent-skill:{tenant}/{ml_repo}/{agent_skill_name}')
  </ParamField>

  <ParamField body="ml_repo_id" type="typing.Optional[str]">
    ML Repo ID filter
  </ParamField>

  <ParamField body="name" type="typing.Optional[str]">
    Agent skill name filter
  </ParamField>

  <ParamField body="offset" type="typing.Optional[int]">
    Pagination offset
  </ParamField>

  <ParamField body="limit" type="typing.Optional[int]">
    Page size
  </ParamField>

  <ParamField body="include_empty_agent_skills" type="typing.Optional[bool]">
    Whether to include agent skills that have no versions
  </ParamField>

  #### Returns

  <ResponseField name="SyncPager[AgentSkill, ListAgentSkillsResponse]" type="SyncPager[AgentSkill, ListAgentSkillsResponse]">
    [🔗 ListAgentSkillsResponse](/docs/truefoundry_sdk/types#listagentskillsresponse)

    Successful Response
  </ResponseField>

  #### Usage

  ```python lines theme={"dark"}
  from truefoundry import TrueFoundry

  client = TrueFoundry(
      api_key="YOUR_API_KEY",
      base_url="https://yourhost.com/path/to/api",
  )

  client.agent_skills.list(
      fqn="value",
      ml_repo_id="value",
      name="value",
      offset=10,
      limit=10,
      include_empty_agent_skills="value",
  )

  # Iterate through results
  for item in response:
      print(item.name)

  # Or paginate page by page
  for page in response.iter_pages():
      for item in page:
          print(item.name)
  ```
</Accordion>

<Accordion title="create_or_update">
  Create or update an agent skill version from a manifest.

  #### Parameters

  <ParamField body="manifest" type="AgentSkillManifest" required>
    [🔗 AgentSkillManifest](/docs/truefoundry_sdk/types#agentskillmanifest)

    Manifest containing metadata for the agent skill to apply
  </ParamField>

  #### Returns

  <ResponseField name="GetAgentSkillVersionResponse" type="GetAgentSkillVersionResponse">
    [🔗 GetAgentSkillVersionResponse](/docs/truefoundry_sdk/types#getagentskillversionresponse)

    The created or updated agent skill version
  </ResponseField>

  #### Usage

  ```python lines theme={"dark"}
  from truefoundry import TrueFoundry

  client = TrueFoundry(
      api_key="YOUR_API_KEY",
      base_url="https://yourhost.com/path/to/api",
  )

  client.agent_skills.create_or_update(
      manifest={"key": "value"},
  )
  ```
</Accordion>
